Repository navigation
Conversation
uniqueg
left a comment
There was a problem hiding this comment.
Thanks! There is one confusing issue. Please have a look and let me know what you think (or open an issue if you agree). Anyway, this doesn't really affect this PR, so I will approve this.
| del payload["tes_uri"] | ||
|
|
||
| db_document.task_outgoing = TesTask(**payload) | ||
| db_document.task_incoming = TesTask(**payload) |
There was a problem hiding this comment.
I think I'm really confused. Didn't we say that we do not want to modify the incoming but only the outgoing request object? At least that is what makes sense. If we modify the incoming request, it's not the incoming request anymore. And the outgoing request is a copy of the incoming request that was modified by the middlware, and with a ranked list of TES endpoints attached. And it is also the outgoing request that should be updated according to what is happening on the remote service and what is, essentially, returned to the user when they ask for info on that task (except a few properties like the start and other times pertaining to the task itself (not for the executor).
This all looks like it is actually done the other way around (or maybe I'm being stupid).
If that is the case, please open an issue to fix in another PR.
There was a problem hiding this comment.
Actually, task_outgoing is the one that is untouched, and all the changes (middleware, the final response etc) are done in task_incoming.
There was a problem hiding this comment.
Yes, but it doesn't make sense. Don't you agree? If we modify the incoming request, it's not the incoming request anymore. Perhaps instead of naming them "incoming" and "outgoing", it might be better to call one of them just task and the other one task_original. Then task is the working copy which gets modified and always keeps all the info just as we want to return it to the user/client.
There was a problem hiding this comment.
Yes makes sense, I am creating an issue for that where we just need to rename it.
pro_tes.ga4gh.tes.task_runs.TaskRunsclass rather than the upstreampro_tes.ga4gh.tes.server.CreateTask()controller