Skip to content

De-flake testIdpUpdate: atomic issuer deletion in Cassandra batch#5316

Open
blackheaven wants to merge 1 commit into
developfrom
gdifolco/fix-flaky-tests-spar-idp-update
Open

De-flake testIdpUpdate: atomic issuer deletion in Cassandra batch#5316
blackheaven wants to merge 1 commit into
developfrom
gdifolco/fix-flaky-tests-spar-idp-update

Conversation

@blackheaven

Copy link
Copy Markdown
Contributor

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

The flaky testIdpUpdate test failed intermittently with HTTP 400 where
200 was expected. Root cause: the IdP update in idpUpdateXML performed
the issuer index deletion as a separate Cassandra write after the
config insertion batch. When an issuer was reused across updates
(e.g., A -> B -> A), the tombstone from the first deletion could
shadow the later insert due to clock skew between Cassandra
coordinators, causing the finalize-login endpoint to fail its
issuer-based IdP lookup.

Server fix: move old-issuer deletion into the same logged batch as
insertIdPConfig, so insert and delete share the same batch timestamp.

Test fix: add status checks on updateIdp calls and wrap post-update
logins with 'eventually' for resilience against residual consistency
delays.
@blackheaven blackheaven requested review from a team as code owners July 3, 2026 21:33
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants