-
Notifications
You must be signed in to change notification settings - Fork 0
Visz11 patch 1 #1
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
base: master
Are you sure you want to change the base?
Conversation
The downloads in `AbstractActionInputPrefetcher#prefetchInputs` reported lost inputs that are symlinks to other artifacts with the exec path of the target, which results in a crash when the target is not also an input to the action. This is fixed by always reporting the exec path of the symlink. Fixes bazelbuild#25841 Closes bazelbuild#25847. PiperOrigin-RevId: 747819887 Change-Id: Iff9125c95a2598851b8a31ed4ca18fd7218a97aa
The downloads in AbstractActionInputPrefetcher#prefetchInputs reported lost inputs that are symlinks to other artifacts with the exec path of the target, which results in a crash when the target is not also an input to the action. This is fixed by always reporting the exec path of the symlink. Fixes bazelbuild#25841
|
/refacto-test |
|
Refacto is reviewing this PR. Please wait for the review comments to be posted. |
Code Review: Symlink Error Handling Enhancement👍 Well Done
📝 Additional Comments
|
| metadata, | ||
| priority, | ||
| reason); | ||
| action, |
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.
Missing ExecPath Propagation
Cache errors lack proper path information for symlinked inputs. Without ExecPath propagation, action rewinding fails to identify missing files correctly, potentially causing build failures.
| action, | |
| downloadFileNoCheckRx( | |
| action, | |
| execRoot.getRelative(execPath), | |
| treeRootExecPath != null ? execRoot.getRelative(treeRootExecPath) : null, | |
| dirsWithOutputPermissions, | |
| input, | |
| metadata, | |
| priority, | |
| reason) | |
| .onErrorResumeNext( | |
| t -> { | |
| if (t instanceof CacheNotFoundException cacheNotFoundException) { | |
| // Only the symlink itself is guaranteed to be an input to the action, so | |
| // report its path for rewinding. | |
| cacheNotFoundException.setExecPath(input.getExecPath()); | |
| return Completable.error(cacheNotFoundException); | |
| } | |
| return Completable.error(t); | |
| }) |
Standards
- CWE-755
- OWASP-A06
The downloads in AbstractActionInputPrefetcher#prefetchInputs reported lost inputs that are symlinks to other artifacts with the exec path of the target, which results in a crash when the target is not also an input to the action. This is fixed by always reporting the exec path of the symlink.
Fixes bazelbuild#25841