Closed soxofaan closed 11 months ago
True, that's not ideal. Don't have a good idea yet how to resolve it though...
The only thing I could think of right now is to require e.g. a "./" at the beginning of file paths. This doesn't feel ideal though. Alternatively, back-ends would need to be given a priority list, I guess... Any opinions or ideas?
another option is requiring some kind of scheme prefix when there is risk of confusion, e.g. workspace://mymodel.foo
, which extends easily to other storage solutions or "namespaces" (s3://...
, https://...
, ... or even job:...
and job://otherbackend/...
)
Yeah, I thought about that too, but I found that even more confusing/unexpected. 🤔
Maybe define two processes? Alternatively, I'd say we say that it tries the batch job ID first and otherwise loads the file (because you can change file names but not batch job IDs.)
I thought a bit more about this and I think we can simply remove the batch job id subtype. A batch job ID can also just be provided via the uri subtype. Either you provide the canonical (i.e. "public") link and then it's just like any external data. Or you can simply provide a URI such as https://example.com/api/v1.0/jobs/12345/results
and then you can easily detect the job id from it. The clients can help with it by allowing Job objects as input for example.
I created PR #413 for it.
Solved by #413, I think.
https://github.com/Open-EO/openeo-processes/blob/be148835a725966fbf1fff65215dbf2bca82a4a7/proposals/load_ml_model.json#L23-L33
Batch job id has regex
"^[\\w\\-\\.~]+$"
and user-uploaded file has regex"^[^\r\n\\:'\"]+$"
. Both regexes will match on simple things likefoo-bar
, so a back-end will not be able to determine if givenid
is intended as job id or a user uploaded file? Or is a back-end supposed to try the available options and pick the first match?