Skip to content

[WIP]OCPBUGS-76334: Remove library-go bump from TLS 1.3 test fixes#30894

Open
wangke19 wants to merge 1 commit intoopenshift:mainfrom
wangke19:fix/tls13-no-library-go-bump
Open

[WIP]OCPBUGS-76334: Remove library-go bump from TLS 1.3 test fixes#30894
wangke19 wants to merge 1 commit intoopenshift:mainfrom
wangke19:fix/tls13-no-library-go-bump

Conversation

@wangke19
Copy link
Contributor

@wangke19 wangke19 commented Mar 17, 2026

Summary

This PR re-adds the TLS 1.3 test improvements from PR #30746 (which was reverted in #30895) but uses a local tlsutil package instead of depending on library-go/pkg/crypto. This provides the test enhancements without the dependency issues that caused the original revert.

Background

PR #30746 introduced valuable TLS 1.3 (Modern profile) test support but bundled it with a library-go dependency bump that caused test instability in 4.22 payloads. PR #30895 reverted #30746 to restore stability. This PR reintroduces only the test improvements without the problematic dependency changes.

What This PR Does

1. Re-adds TLS 1.3 test improvements from #30746

  • ✅ Support for testing Modern TLS profile (TLS 1.3 only)
  • ✅ FIPS mode detection for ChaCha20-Poly1305 cipher handling
  • ✅ ECDSA cipher suite handling (expect failure with RSA keys)
  • ✅ Improved test logging and error messages

2. Creates local crypto helper package (test/extended/apiserver/tlsutil/)

Extracted six simple utility functions into a local package:

  • DefaultTLSVersion() - Returns tls.VersionTLS12
  • ValidTLSVersions() - Returns list of TLS version names
  • TLSVersionOrDie(name) - Converts version name to uint16
  • DefaultCiphers() - Returns list of default cipher suites
  • ValidCipherSuites() - Returns list of cipher suite names
  • CipherSuite(name) - Converts cipher suite name to uint16

These are all simple lookup/conversion functions with no transitive dependencies beyond crypto/tls.

3. No library-go dependency bump

  • Uses local tlsutil package instead of library-go/pkg/crypto
  • No changes to go.mod, go.sum, or vendor/ for library-go
  • Removes coupling between test logic and library-go versions

Benefits

Restores TLS 1.3 test coverage - Modern profile validation is back
Removes dependency coupling - Test logic no longer tied to library-go versions
Avoids supply chain risk - No dependency updates in test improvements
Maintains stability - Based on #30895 revert, adds only test logic
Better separation of concerns - Test improvements isolated from dependency management

Testing

Related

Commit Structure

Single commit that:

  1. Creates tlsutil package with crypto helpers
  2. Updates test to use tlsutil instead of library-go
  3. Re-adds Modern TLS profile support, FIPS handling, ECDSA handling

Note: This PR is now based on upstream/main which includes the revert (#30895), so the library-go dependency revert is no longer needed as a separate commit.

@openshift-ci-robot
Copy link

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 17, 2026
@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 17, 2026
@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Mar 17, 2026
@openshift-ci-robot
Copy link

@wangke19: This pull request references Jira Issue OCPBUGS-76334, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

This PR removes the unnecessary library-go dependency bump from PR #30746 by extracting the crypto utility functions into a local tlsutil package. This allows us to keep the valuable TLS 1.3 test improvements without the supply chain implications of bumping library-go.

Problem

PR #30746 bundled two distinct changes:

  1. Test logic improvements: TLS 1.3 support, ECDSA handling, FIPS mode handling
  2. Dependency update: library-go bump (v0.0.0-20251015151611 → v0.0.0-20260223145824)

The library-go bump was not required for the test functionality and has shown instability in CI (see Slack discussion in #forum-testplatform).

Solution

1. Create local crypto helper package (test/extended/apiserver/tlsutil/)

Extracted the six simple utility functions the test uses from library-go:

  • DefaultTLSVersion() - Returns tls.VersionTLS12
  • ValidTLSVersions() - Returns list of TLS version names
  • TLSVersionOrDie(name) - Converts version name to uint16
  • DefaultCiphers() - Returns list of default cipher suites
  • ValidCipherSuites() - Returns list of cipher suite names
  • CipherSuite(name) - Converts cipher suite name to uint16

These are all simple lookup/conversion functions with no transitive dependencies beyond crypto/tls.

2. Revert library-go version

  • Reverted from v0.0.0-20260223145824-7b234b47a906 back to v0.0.0-20251015151611-6fc7a74b67c5
  • Updated go.mod, go.sum, and vendor/ accordingly

3. Personal fork handling

The personal fork replace directive for filepath-securejoin is retained because:

  • It's required for runc v1.2.5 compatibility with filepath-securejoin v0.6.0
  • The v0.6.0 requirement comes from opencontainers/selinux@v1.13.0 (transitive dependency)
  • Migration to organization fork is tracked in issue #30890

Benefits

Removes unnecessary dependency coupling - Test logic no longer tied to library-go versions
Avoids supply chain risk - No personal fork in library-go dependency chain
Maintains test improvements - All TLS 1.3, ECDSA, and FIPS handling logic preserved
Better separation of concerns - Dependency updates separated from test logic

Testing

  • go build ./test/extended/apiserver/... passes
  • Code compiles successfully with reverted library-go version
  • No functional changes to test logic (only dependency source changed)

Related

Commits

Following the two-commit structure:

  1. Code changes: Extract crypto utilities to local package, update imports
  2. Dependencies: Revert library-go, update go.mod/go.sum/vendor/

/hold

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Excluded labels (none allowed) (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3200a239-1aae-4600-8317-151951484ab1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Updates the OpenShift library-go dependency version and redirects Kubernetes modules to OpenShift staging equivalents in go.mod. Refactors TLS utilities by extracting version and cipher suite management into a new tlsutil package, with test code updated to use the new utilities instead of direct crypto package references.

Changes

Cohort / File(s) Summary
Dependency Management
go.mod
Bumps library-go dependency to an earlier pseudo-version and updates module replace directives to redirect Kubernetes API packages to OpenShift staging equivalents.
TLS Utilities Refactoring
test/extended/apiserver/tlsutil/crypto.go
New utility module providing TLS version and cipher suite mappings, with functions for version/cipher resolution, validation, and defaults (DefaultTLSVersion, DefaultCiphers, TLSVersion, TLSVersionOrDie, CipherSuite, ValidTLSVersions, ValidCipherSuites).
TLS Test Updates
test/extended/apiserver/tls.go
Migrates TLS utilities from crypto package to tlsutil, updating all references to TLS version and cipher suite functions and adjusting imports accordingly.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested a review from deads2k March 17, 2026 16:19
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 17, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wangke19
Once this PR has been reviewed and has the lgtm label, please assign xueqzhan for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot requested a review from sjenning March 17, 2026 16:19
@openshift-ci openshift-ci bot added the vendor-update Touching vendor dir or related files label Mar 17, 2026
@wangke19 wangke19 changed the title OCPBUGS-76334: Remove library-go bump from TLS 1.3 test fixes [WIP]OCPBUGS-76334: Remove library-go bump from TLS 1.3 test fixes Mar 17, 2026
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 17, 2026
@wangke19 wangke19 force-pushed the fix/tls13-no-library-go-bump branch from b365eb9 to 478de61 Compare March 17, 2026 17:46
@wangke19
Copy link
Contributor Author

/unhold

Fixed gofmt issue - imports are now properly sorted.

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 17, 2026
wangke19 added a commit to wangke19/origin that referenced this pull request Mar 17, 2026
…faults-support"

This reverts commit 5c29d3af01fbee9cc0c6f748a8d2f1aac5c80a8e.

Reason for revert:
PR openshift#30746 is causing test instability in 4.22 payloads. Multiple test
failures have been observed in periodic-ci-openshift-release-master-nightly-4.22-e2e-aws-ovn-upgrade
jobs as reported in #forum-testplatform Slack channel.

Example failures:
- https://prow.ci.openshift.org/view/gs/test-platform-results/logs/aggregated-aws-ovn-upgrade-4.21-to-4.22-ci-openshift-release-analysis-aggregator/2033742335904321536
- https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-openshift-release-master-nightly-4.22-upgrade-from-stable-4.21-e2e-aws-ovn-upgrade/2033742330044878848
- https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-openshift-release-master-nightly-4.22-upgrade-from-stable-4.21-e2e-aws-ovn-upgrade/2033742330229428224
- https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-openshift-release-master-nightly-4.22-upgrade-from-stable-4.21-e2e-aws-ovn-upgrade/2033742330355257344

The PR bundled test logic improvements with an unnecessary library-go
dependency bump, which has introduced instability. A follow-up PR (openshift#30894)
will reintroduce the test improvements without the dependency changes.

This revert is needed to:
1. Restore test stability in 4.22 CI
2. Separate test logic from dependency management concerns
3. Allow proper evaluation of the test improvements in isolation

Related:
- Original PR: openshift#30746
- Replacement PR: openshift#30894
- JIRA: OCPBUGS-76334
- Slack: #forum-testplatform discussion on 2026-03-17
@openshift-ci-robot
Copy link

Scheduling required tests:
/test e2e-aws-csi
/test e2e-aws-ovn-fips
/test e2e-aws-ovn-microshift
/test e2e-aws-ovn-microshift-serial
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-gcp-csi
/test e2e-gcp-ovn
/test e2e-gcp-ovn-upgrade
/test e2e-metal-ipi-ovn-ipv6
/test e2e-vsphere-ovn
/test e2e-vsphere-ovn-upi

@openshift-ci-robot
Copy link

@wangke19: This pull request references Jira Issue OCPBUGS-76334, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

This PR removes the unnecessary library-go dependency bump from PR #30746 by extracting the crypto utility functions into a local tlsutil package. This allows us to keep the valuable TLS 1.3 test improvements without the supply chain implications of bumping library-go.

Problem

PR #30746 bundled two distinct changes:

  1. Test logic improvements: TLS 1.3 support, ECDSA handling, FIPS mode handling
  2. Dependency update: library-go bump (v0.0.0-20251015151611 → v0.0.0-20260223145824)

The library-go bump was not required for the test functionality and has shown instability in CI, with multiple test failures observed in periodic-ci-openshift-release-master-nightly-4.22-e2e-aws-ovn-upgrade jobs (see Slack discussion in #forum-testplatform on 2026-03-17).

Solution

1. Create local crypto helper package (test/extended/apiserver/tlsutil/)

Extracted the six simple utility functions the test uses from library-go:

  • DefaultTLSVersion() - Returns tls.VersionTLS12
  • ValidTLSVersions() - Returns list of TLS version names
  • TLSVersionOrDie(name) - Converts version name to uint16
  • DefaultCiphers() - Returns list of default cipher suites
  • ValidCipherSuites() - Returns list of cipher suite names
  • CipherSuite(name) - Converts cipher suite name to uint16

These are all simple lookup/conversion functions with no transitive dependencies beyond crypto/tls.

2. Revert library-go version

  • Reverted from v0.0.0-20260223145824-7b234b47a906 back to v0.0.0-20251015151611-6fc7a74b67c5
  • Updated go.mod, go.sum, and vendor/ accordingly

3. Personal fork handling

The personal fork replace directive for filepath-securejoin is retained because:

  • It's required for runc v1.2.5 compatibility with filepath-securejoin v0.6.0
  • The v0.6.0 requirement comes from opencontainers/selinux@v1.13.0 (transitive dependency)
  • Migration to organization fork is tracked in issue #30890

Benefits

Removes unnecessary dependency coupling - Test logic no longer tied to library-go versions
Avoids supply chain risk - No personal fork in library-go dependency chain
Maintains test improvements - All TLS 1.3, ECDSA, and FIPS handling logic preserved
Better separation of concerns - Dependency updates separated from test logic
Restores test stability - Addresses CI failures in 4.22 payloads

Parallel Processing Options

Two approaches are available for quick resolution:

Option A - This PR (surgical fix):

Option B - Revert + Replace:

Both PRs can be evaluated in parallel to speed up the process.

Testing

  • go build ./test/extended/apiserver/... passes
  • Code compiles successfully with reverted library-go version
  • No functional changes to test logic (only dependency source changed)
  • gofmt formatting verified

Related

Commits

Following the two-commit structure:

  1. Code changes: Extract crypto utilities to local package, update imports
  2. Dependencies: Revert library-go, update go.mod/go.sum/vendor/

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 17, 2026

@wangke19: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-metal-ipi-ovn-ipv6 478de61 link true /test e2e-metal-ipi-ovn-ipv6
ci/prow/e2e-aws-ovn-microshift 478de61 link true /test e2e-aws-ovn-microshift

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

…-go dependency

This commit re-adds the TLS 1.3 (Modern profile) test improvements from PR openshift#30746
but uses a local tlsutil package instead of depending on library-go/pkg/crypto.

Changes from original PR openshift#30746:
- Add support for testing Modern TLS profile (TLS 1.3 only)
- Add FIPS mode detection for ChaCha20-Poly1305 cipher handling
- Add ECDSA cipher suite handling (expect failure with RSA keys)
- Improve test logging and error messages

Changes from original implementation:
- Created test/extended/apiserver/tlsutil/ package with crypto helpers
- Replaced library-go/pkg/crypto dependency with local tlsutil
- No dependency on library-go version bump

The test now properly validates both Intermediate (TLS 1.2+) and Modern
(TLS 1.3 only) TLS profiles, with appropriate handling for FIPS mode
restrictions and RSA vs ECDSA cipher compatibility.
@wangke19 wangke19 force-pushed the fix/tls13-no-library-go-bump branch from 478de61 to 36974ff Compare March 18, 2026 13:05
@wangke19
Copy link
Contributor Author

Rebased on latest upstream/main which now includes PR #30895 (the revert of #30746).

Changes in this rebase:

The PR is now a clean addition of test improvements on top of the reverted state, with no dependency changes.

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. vendor-update Touching vendor dir or related files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants