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

jobs: create jobs ignoring user session timezone #123632

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dt
Copy link
Member

@dt dt commented May 4, 2024

Release note (bug fix): fixes a bug where jobs created in session with non-zero session timezone offsets could hang before starting or report incorrect creation times when viewed in SHOW JOBS and the console.

Epic: none.

Release note (bug fix): fixes a bug where jobs created in session with non-zero
session timezone offsets could hang before starting or report incorrect creation
times when viewed in SHOW JOBS and the console.

Epic: none.
@dt dt requested a review from msbutler May 4, 2024 22:29
@dt dt requested review from a team as code owners May 4, 2024 22:29
Copy link

blathers-crl bot commented May 4, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@dt
Copy link
Member Author

dt commented May 4, 2024

TODO test

Copy link
Collaborator

@stevendanna stevendanna left a comment

Choose a reason for hiding this comment

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

👍 Definitely seems like one we want a test for as you mention, but the overall fix looks good.

Comment on lines +708 to +709
cols := []string{"id", "created", "status", "created_by_type", "created_by_id", "job_type"}
placeholders := []string{"$1", "now() at time zone 'utc'", "$2", "$3", "$4", "$5"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

[existing] Not sure these variables+sprintf contribute to the readability much. But no need to change them here.

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.

Backup job stays in 'running' status when using 'detached' option and timezone is ahead of UTC
3 participants