Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DB] Align run start_time column and body field #1607

Merged
merged 10 commits into from
Jan 4, 2022

Conversation

Hedingber
Copy link
Contributor

@Hedingber Hedingber commented Jan 4, 2022

Fixes: https://jira.iguazeng.com/browse/ML-145
When storing run the logic was that on creation the start time column is either coming from the body or datetime.now() (by that precedence), and on update, nothing happens with it.
When running a job the first the triggering client is storing the run, it's the first store, so it's creation, no start time is in the body, therefore the time is just now. but then, when the job starting, on the MLClientCtx initialization, the start time is being set to now, and then when the job is finishing, the context store the run again, this time causing an update, but now the column doesn't change, while the body is being changed to have a different time (it takes some time for the pod to come up and actually start running the code)
So bottomline the start_time column and the field inside the body were inconsistent.
After consulting with @yaronha we agreed that it does make more sense to have the time from when the code execution actually started (without considering the time to pull the image and such) as the start time, therefore we needed to make sure that on update, if something is in the body, it applies to the column as well (we do keep defaulting to now on creation as some runtimes won't have any MLRun context used in them)
In a followup PR I'll add a data migration that will go over all runs and align the column to have the body field if it exists

@Hedingber Hedingber changed the title [DB] Align runs start_time column and body field [DB] Align run start_time column and body field Jan 4, 2022
@Hedingber Hedingber merged commit 05a3197 into mlrun:development Jan 4, 2022
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.

None yet

1 participant