Skip to content

jobs: allow Reverting jobs to have status and progress updates#45096

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
thoszhang:job-reverting-progress
Feb 13, 2020
Merged

jobs: allow Reverting jobs to have status and progress updates#45096
craig[bot] merged 1 commit intocockroachdb:masterfrom
thoszhang:job-reverting-progress

Conversation

@thoszhang
Copy link
Copy Markdown

Previously only Running jobs could have their status and progress updated.
This PR updates JobMetadata.CheckRunning() to also allow those updates on
Reverting jobs, as part of bringing the contract of reverting jobs in line
with running jobs.

Release note: None

Previously only `Running` jobs could have their status and progress updated.
This PR updates `JobMetadata.CheckRunning()` to also allow those updates on
`Reverting` jobs, as part of bringing the contract of reverting jobs in line
with running jobs.

Release note: None
@thoszhang thoszhang requested a review from spaskob February 13, 2020 20:05
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@spaskob spaskob left a comment

Choose a reason for hiding this comment

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

thanks!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @spaskob)

@thoszhang
Copy link
Copy Markdown
Author

bors r+

craig bot pushed a commit that referenced this pull request Feb 13, 2020
45096: jobs: allow Reverting jobs to have status and progress updates r=lucy-zhang a=lucy-zhang

Previously only `Running` jobs could have their status and progress updated.
This PR updates `JobMetadata.CheckRunning()` to also allow those updates on
`Reverting` jobs, as part of bringing the contract of reverting jobs in line
with running jobs.

Release note: None

Co-authored-by: Lucy Zhang <lucy-zhang@users.noreply.github.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Feb 13, 2020

Build succeeded

@craig craig bot merged commit 9ba9dd5 into cockroachdb:master Feb 13, 2020
spaskob added a commit to spaskob/cockroach that referenced this pull request Feb 19, 2020
In the test there is a race condition between
checking that job cannot update progress and
switchinbg the job to status Reverting. I removed
the check as it is unnecessary since we already
check in the end of the test that the job is marked
as Canceled.

In the future is advisable to stress test all PRs
that touch jobs infrastructure.

Fixes cockroachdb#45131, Fixes cockroachdb#45204.

Release note: none.
craig bot pushed a commit that referenced this pull request Feb 20, 2020
45208: jobs: fix flake introduced by #45096 r=spaskob a=spaskob

In the test there is a race condition between
checking that job cannot update progress and
switching the job to status Reverting. I removed
the check as it is unnecessary since we already
check in the end of the test that the job is marked
as Canceled.

In the future it is advisable to stress test all PRs
that touch jobs infrastructure to avoid flakes.

Fixes #45131.
Fixes #45204.

Release note: none.

Co-authored-by: Spas Bojanov <pachob@gmail.com>
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.

4 participants