Open greenberga opened 3 weeks ago
Name | Link |
---|---|
Latest commit | 23c5b647931dad07a75612638ae166d75e1791c4 |
Latest deploy log | https://app.netlify.com/sites/nextflow-docs-staging/deploys/665e1123560c2e000878ef53 |
@bentsherman I spent some time looking into this issue. There's a good chance I'm missing something, but as far as I can tell, the TaskConfig
isn't aware of the hash mode. I can pull the cache
property from task.config
, but it's still a closure (i.e., it hasn't been evaluated).
Further, isn't the hash mode slightly different than whether or not to cache? The mode itself can be standard
, lenient
, deep
, or sha256
—but you can also set a boolean, in which case the mode will be null
:
Assuming there is some step where a script's process directives are merged with the directives from a config's process
scope directives, it seems like you'd want to evaluate the closure at that point, in the context of the task. Let me know if that doesn't make sense. Thanks!
I think you just need to move the getHashMode()
method from the process config to the task config, something like this:
HashMode getHashMode() {
HashMode.of(get('cache')) ?: HashMode.DEFAULT()
}
The get('cache')
will handle the closure evaluation.
@bentsherman thanks for the point in the right direction. get('cache')
does indeed seem to evaluate the closure properly. The only thing I can't quite figure out is why it's enough to move HashMode
retrieval from the ProcessConfig
to the TaskConfig
. Whether get('cache')
returns true
or false
, HashMode
will be STANDARD
.
Closes #5022