-
Notifications
You must be signed in to change notification settings - Fork 110
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
Checksum-based dependency evaluation #30
Comments
We might not have the time to implement it right now. I'd be more than happy to review other people's contributions. If you need this feature, please chime in and say +1. |
Thanks for considering this. Actually, content-based dependencies is a means of getting general evaluation hooks into a system like Drake. That's the main use case. For example, your workflow depends on code in a source tree, so you emit the current version to a file on every run, but only redo the downstream dependencies from that file if the content of that file changes (i.e. if the version changes). |
Then probably we should implement #11 first. But in the meantime. In simple cases, you can probably just add your binary/JAR as a step's dependency. For more complicated ones, you can simulate the desired behavior the way I suggested in the mailing list:
It's not ideal, because Drake would consider it a legitimate step and ask you to build it every time, instead of knowing that it's just evaluation and telling "Nothing to do" if everything is up-to-date. But it should work. |
It does sound like solving the general case is more important. Thanks, I'll try the workaround. |
Just a quick update. The workaround recipe above doesn't quite work, since a dependency like:
will only run when the md5 does not yet exist. However, the point of content-based dependency (rather than time-based) is to recalculate it every time. Here's a full working example:
Is there a flag that can be used to force a rebuild of a particular step every time? That'd make this nicer, giving access to the |
Sorry, I was under the wrong impression that |
In the meantime, you can work around it by telling drake to force-rebuild every step that uses your md5 method, e.g.:
|
I was just about to advise that you rewrite this:
as this:
But then I realized that it would make Drake to run this step when |
There was a request for this.
Related to #11 (support general evaluator hooks).
It could be baked into Drake directly. This evaluator would ignore the timestamps of the input and output files, and only re-run the step if MD5 of the step's inputs have changed since the last run. The MD5's would probably have to be created alongside the files (input.md5-drake or something like that), and will need to be moved/renamed with the files when branching, backups, etc. Forced rebuild should probably update the MD5s?
The text was updated successfully, but these errors were encountered: