Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: check if context is nil when logging coordination delete errors#13192

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
kylecarbs wants to merge1 commit intomainfrompgerr

Conversation

kylecarbs
Copy link
Member

I'm not exactly sure how to handle this idiomatically...

See:https://github.com/coder/coder/actions/runs/8976564938/job/24653672411

@kylecarbskylecarbs self-assigned thisMay 6, 2024
@kylecarbs
Copy link
MemberAuthor

@spikecurtis we could check directly for thesql: database is closed error, but I'm weary to do so as the error isn't exported in the stdlib sql package.

@spikecurtis
Copy link
Contributor

Really, we shouldn't even be starting a PGCoordinator to test the licensing APIs of Coderd. This is a canonical example of a test that is doing way to much and so errors in an unrelated part of the code are causing it to flake.

That said, PGCoordinator doesn't have a synchronousClose(). It just cancels the context. Considering that it does this cleanup work like deleting the row from the database, we really should fix the close to be synchronous. In a real deployment we would have failed to delete the row and left a bunch of cruft in the database for other Coordinators to have to filter out. So, this is a real product bug, not just a test bug.

kylecarbs reacted with thumbs up emoji

@github-actionsgithub-actionsbot added the staleThis issue is like stale bread. labelMay 15, 2024
spikecurtis added a commit that referenced this pull requestMay 24, 2024
c.f.#13192 (comment)We need to wait for PGCoordinator to finish its work before returning on `Close()`, so that we delete database state (best effort -- if this fails others will filter it out based on heartbeats).
@github-actionsgithub-actionsbot deleted the pgerr branchNovember 7, 2024 00:06
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@spikecurtisspikecurtisAwaiting requested review from spikecurtis

Assignees

@kylecarbskylecarbs

Labels
staleThis issue is like stale bread.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@kylecarbs@spikecurtis

[8]ページ先頭

©2009-2025 Movatter.jp