Skip to content
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

dirtools: fix handling symlink inside output dir #6536

Merged
merged 3 commits into from May 13, 2024

Conversation

sluongng
Copy link
Contributor

@sluongng sluongng commented May 9, 2024

Switch from dirHelper.IsOutputPath to dirHelper.ShouldUploadFile to detect cases where the symlink was not explicitly declared as a command output, but a parent directory was.

Move this check outside of the if clause as we need to do this regardless of REAPI protocol version.

Use only the symlink file name instead of the full path as when we add the symlink to its parent directory.

Closes https://github.com/buildbuddy-io/buildbuddy-internal/issues/3347

@sluongng
Copy link
Contributor Author

sluongng commented May 9, 2024

Will add some tests to better catch these cases in the future.

Previously we were verifying the outputs inside ActionResult against the
mock data we created on disk. Change to verify them against the
outputs declared in the Action.Command.
Verify that we properly handle the symlink in output directory.
@sluongng sluongng merged commit 0a2a50c into master May 13, 2024
18 checks passed
@sluongng sluongng deleted the sluongng/dirtools-fix branch May 13, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants