Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The workaround depends on FIPS-hardened RHEL9 importlib and pytest plugin startup behavior that cannot be reproduced here, and successful results from the three linked test-no-toolchain patch tasks have not been supplied.
No open issues 🎉
What changed in this PR
Updates Evergreen test setup to prevent pytest from aborting during plugin loading on FIPS-hardened hosts due to incompatible hash-based bytecode caches.
Changes:
- Adds
--assert=plaintoTEST_ARGSwhenREQUIRE_FIPSis set, disabling assertion rewriting. - Leaves non-FIPS test behavior unchanged.
| File | Description |
|---|---|
.evergreen/scripts/setup_tests.py |
Conditionally disables pytest assertion rewriting for FIPS hosts and documents the workaround. |
Review effort: Balanced
sleepyStick
approved these changes
Nov 23, 2026
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.
PYTHON-6287
Changes in this PR
pytest 9.2 caches rewritten modules as hash-based pycs. The FIPS-hardened RHEL9 interpreter's importlib rejects them, so pytest aborts at plugin load on
other-hosts-rhel9-fips-latest. WithREQUIRE_FIPSset,setup_tests.pynow runs pytest with--assert=plain: no rewrite hook, no hash-based pyc, no abort.Test Plan
just lint: all hooks pass, including thegenerate-configno-diff check.other-hosts-rhel9-fips-latest: threetest-no-toolchaintasks must start and run instead of failing at plugin load.Checklist
Checklist for Author
Checklist for Reviewer