Replacing artifact IDs in task data with something more expressive
We are requiring artifact ids in many places in task data. It would be much better if we could specify the desired artifact(s) in more expressive manners:
- it's more user-friendly for actual debusine users
- it's also a good step towards user-provided workflows, if you can specify "how to identify the artifact" inside the (static) task data, then the actual work left for the workflow orchestrator is quite limited
This issue is about:
- figuring out the kind of queries that we want to see supported
- how it should be represented in JSON
- deciding whether we leave the "query resolution" up to workers, or if those queries are resolved before workers are fed the work request, and workers only see the final artifact IDs
Things that we want to be able to express
- Single artifact and list of artifacts (different task have different needs, sometimes you need to specify a single artifact, sometimes you need to be able to provide a list)
- User-provided artifact IDs (like now, we want to keep that possibility)
- Query against a collection (the collection can be explicitly listed by name, or it can be implicit with a default value, the default value might change depending on the parameter of the task that is described)
- Single artifact with a specific name
- Single artifact with an alternate lookup name
- Single artifact with a list of names / alternate lookup names to try in order
- Multiple artifacts with a common name prefix (expected to be useful for workflows)
- All artifacts matching a category and/or a set of JSON query filter against the data field
Proposed JSON representation
Edited by Colin Watson