Draft
Conversation
Refactor TaskHasher into a configurable strategy pattern with versioned implementations (V1, V2) selectable via the NXF_TASK_HASH_VER environment variable. V2 (current behavior) is the default. - TaskHasher: now an interface defining compute(), getTaskGlobalVars(), getTaskBinEntries() - TaskHasherV1: original hashing (Maps by values, CacheFunnel after SerializableMarker) - TaskHasherV2: current hashing (Maps by unordered entrySet, CacheFunnel before Map) - TaskHasherFactory: Version enum + create() factory method - HashBuilder: version-aware with branching for Map/CacheFunnel handling - Session: caches resolved hash strategy version at startup Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
✅ Deploy Preview for nextflow-docs-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…der config - Extract TaskHasher classes into `nextflow.processor.hash` package - Convert TaskHasher from concrete class to interface + AbstractTaskHasher base - Replace magic version int in HashBuilder with declarative boolean flags (withOrderIndependentMaps, withCacheFunnelFirst) - TaskHasherV1/V2 now contain real configuration logic via createHashBuilder() - Move getTaskGlobalVars() and getTaskBinEntries() into TaskRun - Rename Version enum values to STD_V1/STD_V2 with string values std/v1, std/v2 - Add dedicated TaskHasherFactoryTest - LinObserver now calls TaskRun methods directly instead of depending on hasher Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.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.
Summary
TaskHasherinto a configurable strategy pattern with versioned implementations (V1, V2) selectable via theNXF_TASK_HASH_VERenvironment variableChanges
TaskHasher→ interface withcompute(),getTaskGlobalVars(),getTaskBinEntries()TaskHasherV1→ original hashing (Maps by values, CacheFunnel after SerializableMarker)TaskHasherV2→ current hashing (Maps by unordered entrySet, CacheFunnel before Map)TaskHasherFactory→Versionenum +create(TaskRun)factoryHashBuilder→ version-awarewith()method for Map/CacheFunnel handlingCacheHelper→ newhasher(value, mode, version)overloadSession→hashStrategyfield caches the resolved version at startupTest plan
./gradlew :nextflow:test --tests "nextflow.processor.TaskHasherTest"passesNXF_TASK_HASH_VER=V1env var switches strategy correctly🤖 Generated with Claude Code