-
Notifications
You must be signed in to change notification settings - Fork 14
Optionally check configureExecutable config value path actually exists #348
Conversation
Codecov Report
@@ Coverage Diff @@
## master #348 +/- ##
==========================================
+ Coverage 91.53% 91.55% +0.01%
==========================================
Files 31 31
Lines 1146 1148 +2
Branches 108 101 -7
==========================================
+ Hits 1049 1051 +2
Misses 97 97
Continue to review full report at Codecov.
|
a1b82e2
to
45608b1
Compare
45608b1
to
27bfd86
Compare
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.
Minor changes, but I could also use @tfenne's input. I think it may be time to move dagr out from using it's own Configuration
class and use the commons Configuration class. If we do the latter, we could either add some of the missing methods directly (ex. configureExecutable
) to the commons Configuration class, or extend it to a new trait/class (for things that want to configure executables) and put that there.
Regardless, I think this PR is fine (once comments have been addressed) and we can choose to do the migration later. @tfenne thoughts?
I did my best wordsmithing although I feel like improvements could still be made. A re-review would be great! I agree The parameter rename raises a few API design questions for me that might be useful context for when we eventually move to
|
I'm not entirely sure how I feel about this PR to be completely honest. My main concern is that a mistake in config could lead to totally unexpected consequences. E.g. I frequently have multiple versions of bwa on my system, and one of them lives on my default PATH. If I add to config something like Re: the name of
|
@tfenne, I understand your concern. Activating the feature in this PR would open you up to system path fallbacks if you included typos in your Dagr configuration. Ultimately, I'm looking for a way to configure a Dagr pipeline using hard-coded paths as default, but permitting a system path search as a fallback if the executable is missing so I can leverage alternate dependencies that are installed using a package/environment manager like conda. This would allow me greater ease in end-to-end testing over a variety of tool dependency versions using the same Dagr pipelines (same release, same JAR). I usually run Dagr pipelines on blank cloud instances so multiple system binaries risk is small for me but I also understand these pipelines run just as well on personal environments. Is this PR blocked from your perspective? Happy to keep chipping away at this feature if it's a desired addition! |
@clintval why not have an empty dagr config, then use the system path to express priority order searching for binaries? |
Good suggestions all around. I'm 👍 on #350. |
I have a use case which is not supported by Dagr's current methods for executable configuration.
I want to configure a default location where executables can be placed such that Dagr always uses them if they can be found. If the executables do not exist on disk at the path specified in configuration, then I want Dagr to fallback onto the system path.
With this PR, two alternate behaviors can be allowed without changing Dagr configuration. This will make sharing Dagr pipelines easier!
Dependency Strategies I want to Advertise
To get up and running very quickly, install dependencies with this command:
Then execute the pipeline:
To use a specific version of the pipeline dependencies or to use a different version than provided on your system path, simply place the executables at the following location:
Then execute the pipeline:
I'm not thrilled about providing the argument
mustExist
, would you rather this logic be allowed through a new function? Open to suggestions!