-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
ui: do not show current time as a fall back for empty timestamps on Jobs pages #110366
Conversation
Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why on your image the alter tables don't have a completed time? Shouldn't they have it? The issue was focusing on jobs being executed, so I would also like to see examples of that
Reviewed 2 of 3 files at r1, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @gtr, @j82w, @THardy98, @xinhaoz, and @zachlite)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made backend to return job with empty finished_at
field just to simplify testing as it is pure front-end issue so that's why completed job doesn't have "Completed time".
In addition I'd like to highlight that the problem is not specifically related for running jobs. The problem in general is that frontend changed timestamp's values from 'NULL' to current time.
With current change Jobs table display the same data as SHOW JOBS
query.
Appreciate any help on how to have a long running job for testing under real conditions 🙏🏽
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @gtr, @j82w, @THardy98, @xinhaoz, and @zachlite)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuzefovich would you mind giving some repro steps from the issue you created? How to get a long running job so Andrii can test his changes?
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @gtr, @j82w, @THardy98, @xinhaoz, and @zachlite)
I don't have reproduction steps - I noticed this while looking at DB Console of one of existing CC clusters (that I was investigating for a different reason). Some context can be found in https://cockroachlabs.slack.com/archives/C04N0AS14CT/p1692666351682189. Perhaps @fqazi can help with a repro. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, timestamps for running jobs showed current time even if job is not finished because `TimestampToMoment` function used current time as a default value for Nulls. With this change it is explicitly set to Null to make sure that Job's time is not misinterpreted. Release note (ui change): Correctly display timestamps for creation, last modified, and completed time on Jobs table.
298a424
to
3e37378
Compare
Thank you for updating your pull request. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
bors r+ |
Build succeeded: |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from 3e37378 to blathers/backport-release-23.1-110366: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Previously, timestamps for running jobs showed
current time even if job is not finished because
TimestampToMoment
function used current time asa default value for Nulls.
With this change it is explicitly set to Null to
make sure that Job's time is not misinterpreted.
Resolves: #109204
Release note (ui change): Correctly display timestamps
for creation, last modified, and completed time on Jobs table.