-
Notifications
You must be signed in to change notification settings - Fork 748
Fix asset detection when item is not a sibling of the executed script #6605
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
Signed-off-by: Dries Schaumont <5946712+DriesSchaumont@users.noreply.github.com>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
Signed-off-by: Dries Schaumont <5946712+DriesSchaumont@users.noreply.github.com>
pditommaso
left a comment
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.
Please provide context in the PR description and unit testing to validate the (new) isAssetFile semantic
Thanks for the quick review! Updated the PR and open for new suggestions. |
Signed-off-by: Dries Schaumont <5946712+DriesSchaumont@users.noreply.github.com>
- Enhanced JavaDoc explaining asset file hashing strategy - Added context about SHA-256 content hashing for cache validity - Documented dual-check logic for baseDir and assetRoot - Improved test using Spock where block for better readability - Added inline comments explaining main-script parameter use case Related to nextflow-io#6604 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
…#6605) Signed-off-by: Dries Schaumont <5946712+DriesSchaumont@users.noreply.github.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-authored-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
See #6604
Nextflow uses the contents of a file to determine its hash regardless of the requested hashing strategy when the item is part of the git repository. This is because a different clone of the repository (as often happpens on remote executors like
batch) changes the item's timestamp, which invalidates the cache when using its metadata.When executing a workflow which resides in a subdirectory (using main-script), repository assets are not recognized when they are not a child from the same subdirectory where the script resides. This is because
isAssetFileusessession.getBaseDir()as a point of reference for where the assets are stored, but this is not the root of the repository.This PR changes the check for
isAssetFileto use the asset root directory as defined bynextflow.Const.DEFAULT_ROOT.