Fix asset detection when item is not a sibling of the executed script#6605
Merged
pditommaso merged 8 commits intonextflow-io:masterfrom Nov 28, 2025
Merged
Fix asset detection when item is not a sibling of the executed script#6605pditommaso merged 8 commits intonextflow-io:masterfrom
pditommaso merged 8 commits intonextflow-io:masterfrom
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
requested changes
Nov 24, 2025
Member
pditommaso
left a comment
There was a problem hiding this comment.
Please provide context in the PR description and unit testing to validate the (new) isAssetFile semantic
Contributor
Author
Thanks for the quick review! Updated the PR and open for new suggestions. |
jorgee
reviewed
Nov 24, 2025
jorgee
reviewed
Nov 24, 2025
Signed-off-by: Dries Schaumont <5946712+DriesSchaumont@users.noreply.github.com>
jorgee
reviewed
Nov 25, 2025
- 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>
pditommaso
approved these changes
Nov 25, 2025
jorgee
approved these changes
Nov 25, 2025
pditommaso
added a commit
that referenced
this pull request
Nov 28, 2025
…#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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.