Skip to content

PYTHON-6004 Scope OIDC test failpoints to the auth_oidc appName - #3044

Merged
blink1073 merged 1 commit into
mongodb:mainfrom
blink1073:PYTHON-6004
Sep 8, 2026
Merged

PYTHON-6004 Scope OIDC test failpoints to the auth_oidc appName#3044
blink1073 merged 1 commit into
mongodb:mainfrom
blink1073:PYTHON-6004

Conversation

@blink1073

@blink1073 blink1073 commented Sep 8, 2026

Copy link
Copy Markdown
Member

PYTHON-6004

Changes in this PR

The OIDC auth tests used failCommand with appName as a top-level configureFailPoint field, which the server ignores. The failpoint was unscoped, so it could fire on the wrong connection and the reauthentication tests (test_4_1, test_4_2) flaked on Atlas-backed OIDC environments.

  • Scoped the OIDC failpoints to the auth_oidc client by moving appName into data.
  • Added appName=auth_oidc to MONGODB_URI_SINGLE so test clients advertise that name in every environment, including k8s.

Test Plan

Ran the OIDC tasks on Evergreen. Passing build, executed twice. ### TODO

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)? N/A
  • Is there test coverage? Existing OIDC tests
  • Is any followup work tracked in a JIRA ticket? If so, add link(s). N/A

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused changes correctly scope failpoints and consistently configure matching client metadata.

Pull request overview

Scopes OIDC failpoints to test clients, preventing unrelated connections from consuming one-shot failures.

Changes:

  • Moves failpoint appName filtering into data.
  • Adds auth_oidc to single-client URIs across OIDC environments.
  • Keeps synchronous and asynchronous tests aligned.
File summaries
File Description
.evergreen/scripts/oidc_tester.py Configures OIDC app names in test environments.
test/asynchronous/test_auth_oidc.py Scopes asynchronous OIDC failpoints.
test/test_auth_oidc.py Mirrors the asynchronous test change.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@blink1073
blink1073 marked this pull request as ready for review September 8, 2026 14:11
@blink1073
blink1073 requested a review from a team as a code owner September 8, 2026 14:11
@blink1073
blink1073 merged commit 6ba1e27 into mongodb:main Sep 8, 2026
90 checks passed
@blink1073
blink1073 deleted the PYTHON-6004 branch September 8, 2026 17:27
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.

3 participants