Repository navigation
Add temporary FLAKE_DEBUG probe for stagings 404 - #5512
Open
philippthun wants to merge 1 commit into
Open
philippthun wants to merge 1 commit into
philippthun wants to merge 1 commit into
Conversation
The GET /staging/packages/:guid endpoint intermittently returns 404 for a package that was just created in the same request-scoped transaction. The failure is transient and contention-sensitive; it has not reproduced under local stress, so it must be diagnosed from a live CI occurrence. Add instrumentation that fires only on the nil path. On the controller side, log on the connection the SELECT actually used: whether the row is physically present (raw_match), how many package rows are visible at all (total_count), whether the transaction is still open (in_txn), and the db/connection/thread identity. On the test side, log the same identity for the inserting connection so a swap between insert and read is detectable. Revert both probes once CI has logged one occurrence.
johha
reviewed
Oct 7, 2026
|
|
||
| package = PackageModel.find(guid:) | ||
| raise ApiError.new_from_details('NotFound', guid) if package.nil? | ||
| if package.nil? |
Contributor
There was a problem hiding this comment.
Can we add a 2nd condition here so that this can only run in tests? Maybe some existing rspec env var?
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
GET /staging/packages/:guidendpoint intermittently returns 404 for a package that was just created in the same request-scoped transaction. The failure is transient and contention-sensitive; it has not reproduced under local stress, so it must be diagnosed from a live CI occurrence.Add instrumentation that fires only on the nil path. On the controller side, log on the connection the SELECT actually used: whether the row is physically present (raw_match), how many package rows are visible at all (total_count), whether the transaction is still open (in_txn), and the db/connection/thread identity. On the test side, log the same identity for the inserting connection so a swap between insert and read is detectable.
Revert both probes once CI has logged one occurrence.
This change was developed with AI assistance; all code was reviewed and tested by me.
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests