Skip to content

ci-operator-prowgen: Add boskos credentials on multistage tests in any case#5058

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
danilo-gemoli:feat/ci-operator-prowgen/add-lease-client-multistage-regardless
Mar 31, 2026
Merged

ci-operator-prowgen: Add boskos credentials on multistage tests in any case#5058
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
danilo-gemoli:feat/ci-operator-prowgen/add-lease-client-multistage-regardless

Conversation

@danilo-gemoli
Copy link
Copy Markdown
Contributor

We have recently introduced the new "intra-leasing step" feature that allows any step to acquire a lease at execution time, but it requires the boskos' credentials to work.
This means that the previous constraint "make boskos' credentials available when a multistage test uses a cluster profile or the leases stanza right away" doesn't hold anymore.
In this new scenario, a multistage test might need access to boskos regardless.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

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 openshift-ci bot requested review from jmguzik and smg247 March 27, 2026 14:45
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 27, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ba79492e-87bc-4d1b-a0a2-0195f0a33580

📥 Commits

Reviewing files that changed from the base of the PR and between 375ce8f and 90c0134.

📒 Files selected for processing (18)
  • cmd/ci-operator-prowgen/testdata/zz_fixture_presubmit_TestFromCIOperatorConfigToProwYaml_Custom_test_timeout.yaml
  • pkg/controller/prpqr_reconciler/testdata/zz_fixture_prowjobs_TestReconcile_basic_aggregated_case.yaml
  • pkg/prowgen/jobbase.go
  • pkg/prowgen/prowgen.go
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_literal_multi_stage_test.yaml
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test.yaml
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_CSI_enabled.yaml
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_claim.yaml
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_releases.yaml
  • test/integration/ci-operator-prowgen/output/jobs/sharded/repo/sharded-repo-main-presubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-presubmits.yaml
  • test/integration/pj-rehearse/candidate/ci-operator/jobs/super/trooper/super-trooper-master-periodics.yaml
  • test/integration/pj-rehearse/candidate/ci-operator/jobs/super/trooper/super-trooper-master-presubmits.yaml
  • test/integration/pj-rehearse/candidate/ci-operator/jobs/uses/observer/uses-observer-master-presubmits.yaml
  • test/integration/pj-rehearse/expected.yaml
  • test/integration/pj-rehearse/master/ci-operator/jobs/super/trooper/super-trooper-master-periodics.yaml
  • test/integration/pj-rehearse/master/ci-operator/jobs/super/trooper/super-trooper-master-presubmits.yaml
  • test/integration/pj-rehearse/master/ci-operator/jobs/uses/observer/uses-observer-master-presubmits.yaml
💤 Files with no reviewable changes (1)
  • pkg/prowgen/prowgen.go
✅ Files skipped from review due to trivial changes (7)
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_claim.yaml
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_CSI_enabled.yaml
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test.yaml
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_literal_multi_stage_test.yaml
  • test/integration/ci-operator-prowgen/output/jobs/sharded/repo/sharded-repo-main-presubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-presubmits.yaml
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_releases.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/prowgen/jobbase.go

Walkthrough

Removed the conditional lease-detection helper and moved LeaseClient() pod-spec addition into the specific multi-stage test switch branches; updated numerous test fixtures and generated job YAML to add a lease-server credentials CLI arg and a secret-backed /etc/boskos volume/volumeMount.

Changes

Cohort / File(s) Summary
Core logic
pkg/prowgen/jobbase.go, pkg/prowgen/prowgen.go
Deleted the private testContainsLease helper and relocated LeaseClient() addition so it is unconditionally added inside MultiStageTestConfigurationLiteral / MultiStageTestConfiguration switch cases.
Prowgen test fixtures
pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_literal_multi_stage_test.yaml, pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test.yaml, pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_CSI_enabled.yaml, pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_claim.yaml, pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_multi_stage_test_with_releases.yaml
Added --lease-server-credentials-file=/etc/boskos/credentials to ci-operator args and a read-only boskos secret volume/volumeMount mapping credentialscredentials under /etc/boskos.
Generated/Integration job outputs
test/integration/ci-operator-prowgen/output/jobs/sharded/repo/sharded-repo-main-presubmits.yaml, test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-presubmits.yaml
Added lease credentials arg and boskos secret-backed volume/volumeMount to affected presubmit job pod specs.
Presubmit fixtures (ci-operator-prowgen)
cmd/ci-operator-prowgen/testdata/zz_fixture_presubmit_TestFromCIOperatorConfigToProwYaml_Custom_test_timeout.yaml
Injected lease credentials arg and boskos secret volume/volumeMount into the unit presubmit pod spec.
PRPQR reconciler fixture
pkg/controller/prpqr_reconciler/testdata/zz_fixture_prowjobs_TestReconcile_basic_aggregated_case.yaml
Added lease credentials arg and boskos secret volume/volumeMount to the aggregated ProwJob pod spec.
PJ-rehearse candidate changes
test/integration/pj-rehearse/candidate/.../ci-operator/jobs/super/trooper/..., test/integration/pj-rehearse/candidate/.../ci-operator/jobs/uses/observer/...
Multiple presubmit and periodic job fixtures updated to add the lease credentials arg and boskos secret-backed volume/volumeMounts.
PJ-rehearse expected & master outputs
test/integration/pj-rehearse/expected.yaml, test/integration/pj-rehearse/master/.../ci-operator/jobs/...
Updated expected and master rehearse outputs to include the lease credentials arg and corresponding boskos secret volume/volumeMount across affected job specs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@danilo-gemoli
Copy link
Copy Markdown
Contributor Author

/test e2e

@danilo-gemoli danilo-gemoli force-pushed the feat/ci-operator-prowgen/add-lease-client-multistage-regardless branch from 375ce8f to 90c0134 Compare March 30, 2026 08:04
@danilo-gemoli
Copy link
Copy Markdown
Contributor Author

/test e2e

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 30, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danilo-gemoli, deepsm007

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [danilo-gemoli,deepsm007]

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

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 489209d and 2 for PR HEAD 90c0134 in total

@danilo-gemoli
Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

@danilo-gemoli: The following test 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/breaking-changes 90c0134 link false /test breaking-changes

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.

@danilo-gemoli
Copy link
Copy Markdown
Contributor Author

/override ci/prow/images

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

@danilo-gemoli: Overrode contexts on behalf of danilo-gemoli: ci/prow/images

Details

In response to this:

/override ci/prow/images

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.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e

@danilo-gemoli
Copy link
Copy Markdown
Contributor Author

/override ci/prow/images

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 31, 2026

@danilo-gemoli: Overrode contexts on behalf of danilo-gemoli: ci/prow/images

Details

In response to this:

/override ci/prow/images

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.

@openshift-merge-bot openshift-merge-bot bot merged commit b95bdc9 into openshift:main Mar 31, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants