Skip to content

fix: return internal task ID & refactor db model - #128

Merged
uniqueg merged 3 commits into
devfrom
fix_#122
Feb 2, 2023
Merged

uniqueg merged 3 commits into
devfrom
fix_#122

Conversation

@Ayush5120

Copy link
Copy Markdown
Contributor
  1. Fixed Return proTES task ID rather than external task ID #122
  2. Now the proTES task id is returned instead of the remote task id ( Actual TES id where the task is executed).
  3. Modified task_incoming logs in such a way that logs (that is, outputs and TES Executor logs) are updated from Actual TES, and the rest of the things (start_time, end_time, etc) are updated from the proTES.
  4. Currently the information about the TES URI (where the task is submitted) and remote task id is stored in task incoming logs ( inside metadata), it is not the best way but it was essential to do this now because the endpoint POST /tasks/{id}:cancel relies on remote task id, this could be further fixed in Return execution trace in task log #123

@Ayush5120 Ayush5120 changed the title Fix #122 Fix #122 Return proTES task ID rather than external task ID Jan 31, 2023
@uniqueg uniqueg changed the title Fix #122 Return proTES task ID rather than external task ID fix: return internal task ID & refactor database model Feb 1, 2023
db_document.task_incoming.logs = [
TesTaskLog(**logs) for logs in logs
]
db_document.task_incoming.state = TesState.UNKNOWN

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not feeling well and it's not easy to process these changes for me right now. But this seems odd to me. The task state in the incoming task model instance (which we use to return responses to the client) does of course need to be updated from the remote, just like the logs. It shouldn't just remain in state UNKNOWN.

But maybe I'm missing something here, it's really hard to concentrate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the state is set to UNKNOWN in the initial setting, while it will be again updated once the task is submitted and it will change from UNKNOWN to QUEUE->RUNNING->COMPLETED once the background async tracking of the task starts.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, fine then :) I'll just merge then, so that you can go on. We can debug/refactor later, if needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same goes for the TESexecutor Logs (i.e, logs inside logs ), and logs outputs will update asynchronously, while the other things in logs will remain the same as set in here.

@uniqueg uniqueg changed the title fix: return internal task ID & refactor database model fix: return internal task ID & refactor db model Feb 2, 2023
@uniqueg
uniqueg merged commit 740a9f0 into dev Feb 2, 2023
@uniqueg
uniqueg deleted the fix_#122 branch February 2, 2023 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return proTES task ID rather than external task ID

2 participants