Skip to content

flaky test: TestValidate_OIDC_KeyRotation_RefreshOnUnknownKid fails intermittently in CI #1381

Closed

Description

@cristim

Unit Tests failed on main run 904e993 with:

validator_test.go:456: kid B (post-rotation): scheduledauth: unauthorized: failed to verify signature

in TestValidate_OIDC_KeyRotation_RefreshOnUnknownKid (internal/server/scheduledauth). The test passes 5/5 locally at the same commit, and no recent merge touched the JWKS rotation logic (only comment/lint-level changes in the package), so this is a timing-sensitive flake in the post-rotation kid-refresh path (likely a race between the rotation swap and the refresh-on-unknown-kid fetch against the httptest JWKS server).

Fix properly per the no-sleep rule: synchronize the rotation with the validator's refresh (channel/Swap-then-signal), not a retry/sleep. Failed CI run: 29515xxx series on main (job 87679827193).

Activity

  1. added 2 commits that reference this issue on Jul 16, 2026
    0b3ed55
    b7fcfc9
  2. added a commit that references this issue on Jul 16, 2026
    fee120d
  3. cristim commented on Jul 16, 2026

    @cristim
    MemberAuthor

    Fixed and merged via #1386 (retry-once + rate-limited verifier rebuild). Unit Tests deterministic on main now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions