Skip to content

ROX-30858: optimize OSS notice generation in build workflow#19658

Open
janisz wants to merge 2 commits intomasterfrom
ROX-30858/optimize-oss-notice-generation
Open

ROX-30858: optimize OSS notice generation in build workflow#19658
janisz wants to merge 2 commits intomasterfrom
ROX-30858/optimize-oss-notice-generation

Conversation

@janisz
Copy link
Copy Markdown
Contributor

@janisz janisz commented Mar 27, 2026

Description

Move OSS notice generation from build-and-push-main matrix job to a new dedicated pre-build-oss-notice job that runs once.

Previously, OSS notice was generated 4-8+ times per workflow run (once per branding × architecture combination in the matrix). Since the THIRD_PARTY_NOTICES file is identical across all runs (same go.mod and package-lock.json), this was wasteful.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

CI

Move OSS notice generation from build-and-push-main matrix job to a new
dedicated pre-build-oss-notice job that runs once.

Previously, OSS notice was generated 4-8+ times per workflow run (once per
branding × architecture combination in the matrix). Since the THIRD_PARTY_NOTICES
file is identical across all runs (same go.mod and package-lock.json), this was
wasteful.

Changes:
- Add new pre-build-oss-notice job that generates OSS notice once
- Upload as shared artifact consumed by all build-and-push-main matrix cells
- Remove redundant UI cache, UI deps, and OSS generation from build-and-push-main
- Reduces OSS generation from 4-8+ times to exactly 1 time (75-87% reduction)

ROX-30858

Partially generated by AI.
@janisz janisz requested a review from a team as a code owner March 27, 2026 16:53
@janisz janisz requested review from davdhacs and removed request for a team March 27, 2026 16:53
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.38%. Comparing base (f3362c5) to head (5715ee6).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19658   +/-   ##
=======================================
  Coverage   49.38%   49.38%           
=======================================
  Files        2743     2743           
  Lines      207037   207037           
=======================================
+ Hits       102236   102245    +9     
+ Misses      97218    97212    -6     
+ Partials     7583     7580    -3     
Flag Coverage Δ
go-unit-tests 49.38% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- uses: ./.github/actions/download-artifact-with-retry
with:
name: oss-notice
path: image/rhel/
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.

Suggested change
path: image/rhel/
path: image/rhel/THIRD_PARTY_NOTICES

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.

Great idea! It looks like the image/rhel/THIRD_PARTY_NOTICES in the upload gets archived without the "THIRD_PARTY_NOTICES"

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 27, 2026

@janisz: 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/gke-upgrade-tests 5715ee6 link false /test gke-upgrade-tests
ci/prow/gke-ui-e2e-tests 5715ee6 link true /test gke-ui-e2e-tests
ci/prow/gke-nongroovy-e2e-tests 5715ee6 link true /test gke-nongroovy-e2e-tests
ci/prow/gke-qa-e2e-tests 5715ee6 link false /test gke-qa-e2e-tests
ci/prow/ocp-4-12-nongroovy-e2e-tests 5715ee6 link false /test ocp-4-12-nongroovy-e2e-tests
ci/prow/ocp-4-21-nongroovy-e2e-tests 5715ee6 link false /test ocp-4-21-nongroovy-e2e-tests

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants