-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fix output base under /tmp. #20603
Fix output base under /tmp. #20603
Conversation
Resolved symlink action outputs and param files are both fixed.
} else if (!inputArtifact.isSourceArtifact() && sandboxSourceRoots != null) { | ||
FileArtifactValue metadata = inputMetadataProvider.getInputMetadata(actionInput); | ||
if (!metadata.isRemote() && metadata.getMaterializationExecPath().isPresent()) { | ||
inputPath = processResolvedSymlink( |
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.
@lberki I think that the missing case that is causing #20621 is that of a symlink to a source artifact. Since processResolvedSymlink
doesn't take the source root mapping into account, it will return those symlinks unchanged, which is not correct.
I think that we would need to exercise the same logic as in L534-L545, but only if the symlink resolves to a source artifact. I am not sure how to check for the latter.
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.
Ah, I guess we can just check whether the resolved path lies under the exec root. If you don't get to work on this before the holidays, I can give it a try tomorrow.
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.
You're absolutely right and in fact I discovered this independently due to some test breakages (our tests are winning!)-- by the time you wrote this, I had the fix. I pushed the latest version to #20603 . It works for me (protobuf, source tree + output base under /tmp
, no disk cache). Mind also trying?
(don't look at the source code if you value your eyes, it's "hack to get all test cases green" quality and I'm not sure if all test cases are actually green)
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.
+1 for the test coverage, this is actually working now. I won't give a +1 for the control flow, but it's getting the job done ;-)
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.
Yeah, I'm kinda embarrassed having it on the public Internet, even in a pull request :)
d1ab02e
to
9dc505e
Compare
Update: this version fixes all known bugs modulo one, which is that the root directory of tree artifacts is It can be fixed by replacing it with It's arguably silly to count @tjgq what do? I'm inclined to update the test to allow for two |
See my reply in the internal CL :) I don't believe a contract is being violated. Two system calls are strictly required, so we should just fix the test assertion. |
Resolved symlink action outputs and param files are both fixed.