-
Notifications
You must be signed in to change notification settings - Fork 59
Fix comment on workdir (very confusing) #3181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Not sure I know the initial intention here or exactly the nature of the confusion, but I think this is meant to convey what the workdir state would be for subsequent builder tasks, (i.e. so that we can know where |
Yeah there's a somewhat confusing issue in that
Meanwhile The issue is that for the vast majority of tasks, |
I'm not sure I'm completely following, but is it right that what's confusing here is that we have a different default workdir for builder tasks vs runner tasks? |
That's not quite it, the confusing but is that this field is just useless and not used anywhere. The correct field is |
@prbot approve freider |
Please request a reviewer to follow up with a post-merge review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved 👍. @freider will follow-up review this.
See https://github.com/modal-labs/modal/pull/22955 for comment in other location of the code |
The context here is that for some planned future work the client needs to receive the image workdir in the response data from images. We need to fill this metadata field with whatever the best information available - be that from the manifest or otherwise. Also, why is it wrong for 99% of images? (disregarding that we override it for runner tasks) |
Thanks for the insight @freider, I can update the comment / document better what it means when I think for now any workdir should return a Either way I think we shouldn't have two different workdir on the backend -- for client code it's up for discussion! In the backend, the source of truth is the manifest in all cases. |
Extremely confusing field called
workdir
onImageMetadata
which is not actually used by any of our systems,ImageManifest.workdir
is the actual workdir. This is wrong in 99% of images.