qiime2/provenance-lib

Improve support for replay in upstream Usage driver code

Opened this issue · 1 comments

replay.py monkeypatches parts of these drivers which don't currently support replay adequately. Wherever possible, these patches should be removed in favor of support in the home repositories.

Some issues

The ArtifactAPIDriver doesn't check parameter names against registered functions, so may fail silently, producing normal-looking results with bad parameter names. This should probably be addressed

The CLIDriver does check param names against their registered names, which causes failures when param names change between capture and the currently installed version

The ArtifactAPIDriver does not allow replay unless all outputs are passed to Usage.action()

EDIT: My thinking has changed on this over time. There are enough differences between the expectations of replay drivers and existing Usage drivers that upstream support is probably not worth pursuing in most cases. One possible exception I see is in the lack of support in Usage.action for replaying archive versions that don't capture output-name, described below. Usage.action is far enough up the chain of inheritance to make working around it ugly, and a reasonable improvement wouldn't take much effort.

I'm going to keep this issue open as a reference to the framework issue, but have renamed it appropriately.

This has been temporarily solved by subclassing the UsageDrivers locally. However, some of this functionality should still probably be made available in the parent drivers.

We are also now monkeypatching Usage.action to support replay of archive versions that don't support output-name. This isn't easily subclassable without superficially rewriting a lot of the concrete driver code in their local child classes. This would just make them harder to maintain, so monkeypatch it is. Opened as an issue on the framework, in case we can shift this over.