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

Fix set state if running query bug #560

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

bgentry
Copy link
Contributor

@bgentry bgentry commented Aug 23, 2024

While doing some work on a related query, I noticed that the unique_key is being cleared here specifically if the new state is explicitly cancelled, but not if the state is being set to cancel because of a cancellation attempt that didn't get picked up before the job completed.

I didn't yet add test coverage for this but wanted to at least commit it before I forgot. Probably worth it given that this is super nuanced and could easily break in the future?

I also took the occasion to upgrade to sqlc v1.27 in this PR because I picked it up from Homebrew, but I'm opening a separate PR for that too.

@bgentry bgentry requested a review from brandur August 23, 2024 18:47
@bgentry bgentry mentioned this pull request Aug 23, 2024
@bgentry bgentry force-pushed the bg-fix-set-state-if-running-query-bug branch from 20ba899 to 06bbfdc Compare August 23, 2024 18:48
@bgentry bgentry changed the base branch from master to bg-sqlc-v1.27 August 23, 2024 18:48
Base automatically changed from bg-sqlc-v1.27 to master August 24, 2024 22:05
While doing some work on a related query, I noticed that the
`unique_key` is being cleared here specifically if the new state is
explicitly `cancelled`, but _not_ if the state is being set to cancel
because of a cancellation attempt that didn't get picked up before the
job completed.

I didn't yet add test coverage for this but wanted to at least commit it
before I forgot.
@bgentry bgentry force-pushed the bg-fix-set-state-if-running-query-bug branch from 06bbfdc to 11c3b12 Compare August 28, 2024 15:31
@bgentry bgentry marked this pull request as ready for review August 28, 2024 15:31
@bgentry bgentry enabled auto-merge (squash) August 28, 2024 15:31
@bgentry bgentry merged commit 958d4a6 into master Aug 28, 2024
14 checks passed
@bgentry bgentry deleted the bg-fix-set-state-if-running-query-bug branch August 28, 2024 15:35
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.

2 participants