Skip to content

Conversation

@ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Dec 3, 2025

Description

In #14225, we skipped the configtls.TestTPM_loadCertificate unit test if the tests were run with GODEBUG=fips140=only. Otherwise, the unit test failed with a panic: crypto/cipher: use of CFB is not allowed in FIPS 140-only mode error.

Turns out there was a second unit test in the same package that needed skipping for the same reason: configtls.TestTPM_tpmCertificate_errors. This PR skips it too.

Link to tracking issue

Follow up to #14225

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 3, 2025

CodSpeed Performance Report

Merging #14255 will degrade performances by 28.96%

Comparing ycombinator:fips-tpm-unit-tests-fix (c9bcee3) with main (2e5bb6d)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

❌ 3 regressions
✅ 56 untouched
⏩ 20 skipped1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
BenchmarkTraceSizeBytes 309 µs 430.9 µs -28.28%
BenchmarkLogsToProto2k 45 µs 63.3 µs -28.96%
BenchmarkTracesToProto2k 69 µs 95.8 µs -27.94%

Footnotes

  1. 20 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.14%. Comparing base (2e5bb6d) to head (c9bcee3).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14255      +/-   ##
==========================================
- Coverage   92.15%   92.14%   -0.02%     
==========================================
  Files         668      668              
  Lines       41513    41513              
==========================================
- Hits        38257    38251       -6     
- Misses       2219     2223       +4     
- Partials     1037     1039       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@dmathieu dmathieu left a comment

Choose a reason for hiding this comment

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

I don't know about this. It silently skips tests, and seeing which test is being skipped could be unclear.
I think it would be clearer (though more verbose) to explicitly skip within eaach test rather than within an helper.

@ycombinator
Copy link
Contributor Author

ycombinator commented Dec 5, 2025

I don't know about this. It silently skips tests, and seeing which test is being skipped could be unclear. I think it would be clearer (though more verbose) to explicitly skip within eaach test rather than within an helper.

Makes sense. Updated in d0cff30.

@ycombinator ycombinator requested a review from dmathieu December 5, 2025 03:44
@ycombinator ycombinator force-pushed the fips-tpm-unit-tests-fix branch from 560225c to d0cff30 Compare December 5, 2025 03:56
@dmathieu dmathieu added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Dec 5, 2025
@ycombinator ycombinator force-pushed the fips-tpm-unit-tests-fix branch 3 times, most recently from 8a96420 to 26220bd Compare December 9, 2025 17:55
@ycombinator
Copy link
Contributor Author

Hi @dmathieu @bogdandrutu, the CI failures in this PR seem unrelated to the changes in this PR. I've tried rebasing on the latest main a few times over the past week but that doesn't seem to help. Could you please guide me on how to proceed? Thanks!

@dmathieu
Copy link
Member

The failures are due to a breaking change with contrib. They need to be fixed in another PR.

@ycombinator ycombinator force-pushed the fips-tpm-unit-tests-fix branch from 26220bd to d048a21 Compare December 10, 2025 11:45
@ycombinator ycombinator force-pushed the fips-tpm-unit-tests-fix branch from d048a21 to c9bcee3 Compare December 10, 2025 19:21
@dmathieu dmathieu added the ready-to-merge Code review completed; ready to merge by maintainers label Dec 11, 2025
@codeboten codeboten added this pull request to the merge queue Dec 22, 2025
Merged via the queue into open-telemetry:main with commit 2c4964c Dec 22, 2025
80 of 81 checks passed
@ycombinator ycombinator deleted the fips-tpm-unit-tests-fix branch December 23, 2025 05:16
Syedowais312 pushed a commit to Syedowais312/opentelemetry-collector that referenced this pull request Jan 14, 2026
…DEBUG=fips140=only` is set (open-telemetry#14255)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

In open-telemetry#14225, we skipped the `configtls.TestTPM_loadCertificate` unit test
if the tests were run with `GODEBUG=fips140=only`. Otherwise, the unit
test failed with a `panic: crypto/cipher: use of CFB is not allowed in
FIPS 140-only mode` error.

Turns out there was a second unit test in the same package that needed
skipping for the same reason: `configtls.TestTPM_tpmCertificate_errors`.
This PR skips it too.

<!-- Issue number if applicable -->
#### Link to tracking issue
Follow up to open-telemetry#14225
Syedowais312 pushed a commit to Syedowais312/opentelemetry-collector that referenced this pull request Jan 15, 2026
…DEBUG=fips140=only` is set (open-telemetry#14255)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

In open-telemetry#14225, we skipped the `configtls.TestTPM_loadCertificate` unit test
if the tests were run with `GODEBUG=fips140=only`. Otherwise, the unit
test failed with a `panic: crypto/cipher: use of CFB is not allowed in
FIPS 140-only mode` error.

Turns out there was a second unit test in the same package that needed
skipping for the same reason: `configtls.TestTPM_tpmCertificate_errors`.
This PR skips it too.

<!-- Issue number if applicable -->
#### Link to tracking issue
Follow up to open-telemetry#14225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Code review completed; ready to merge by maintainers Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants