Skip to content

Revert "prowgen: utilize sparse checkout"#5145

Merged
openshift-merge-robot merged 1 commit intoopenshift:mainfrom
Prucek:revert-sparse-checkout
Apr 29, 2026
Merged

Revert "prowgen: utilize sparse checkout"#5145
openshift-merge-robot merged 1 commit intoopenshift:mainfrom
Prucek:revert-sparse-checkout

Conversation

@Prucek
Copy link
Copy Markdown
Member

@Prucek Prucek commented Apr 29, 2026

Summary

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Summary by CodeRabbit

Release Notes

  • Refactor

    • Simplified Prow job decoration by replacing sparse file checkout with skip-clone behavior, reducing job configuration complexity.
    • Updated private job secret mounting to explicitly configure OAuth credentials as pod volumes rather than through decoration configuration.
    • Removed sparse checkout-related helper functions and streamlined cloning decision logic.
  • Tests

    • Updated test fixtures and removed sparse checkout-related test cases to reflect simplified cloning behavior.

This reverts the sparse checkout feature (PR openshift#4990 and fix openshift#5143).
Sparse checkout with shallow clones breaks prow's merge strategy
for presubmit jobs — git refuses to merge unrelated histories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-merge-bot
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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 6013e061-6030-4bb9-acc8-e7ac9e801e74

📥 Commits

Reviewing files that changed from the base of the PR and between d6675f7 and 633bf07.

📒 Files selected for processing (48)
  • cmd/ci-operator-prowgen/testdata/zz_fixture_postsubmit_TestFromCIOperatorConfigToProwYaml_Custom_test_timeout.yaml
  • cmd/ci-operator-prowgen/testdata/zz_fixture_postsubmit_TestFromCIOperatorConfigToProwYaml_Input_is_YAML_and_it_is_correctly_processed.yaml
  • cmd/ci-operator-prowgen/testdata/zz_fixture_postsubmit_TestFromCIOperatorConfigToProwYaml_Using_a_variant_config__one_test_and_images__one_existing_job._Expect_one_presubmit__pre_post_submit_images_jobs._Existing_job_should_not_be_changed..yaml
  • cmd/ci-operator-prowgen/testdata/zz_fixture_postsubmit_TestFromCIOperatorConfigToProwYaml_one_test_and_images__no_previous_jobs._Expect_test_presubmit__pre_post_submit_images_jobs.yaml
  • cmd/ci-operator-prowgen/testdata/zz_fixture_presubmit_TestFromCIOperatorConfigToProwYaml_Custom_test_timeout.yaml
  • cmd/ci-operator-prowgen/testdata/zz_fixture_presubmit_TestFromCIOperatorConfigToProwYaml_Input_is_YAML_and_it_is_correctly_processed.yaml
  • cmd/ci-operator-prowgen/testdata/zz_fixture_presubmit_TestFromCIOperatorConfigToProwYaml_Using_a_variant_config__one_test_and_images__one_existing_job._Expect_one_presubmit__pre_post_submit_images_jobs._Existing_job_should_not_be_changed..yaml
  • cmd/ci-operator-prowgen/testdata/zz_fixture_presubmit_TestFromCIOperatorConfigToProwYaml_one_test_and_images__no_previous_jobs._Expect_test_presubmit__pre_post_submit_images_jobs.yaml
  • pkg/prowgen/jobbase.go
  • pkg/prowgen/jobbase_test.go
  • pkg/prowgen/prowgen.go
  • pkg/prowgen/prowgen_test.go
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_Promotion_configuration_causes_promote_job_with_unique_targets.yaml
  • pkg/prowgen/testdata/zz_fixture_TestGenerateJobs_promotion_postsubmit_and_periodic_.yaml
  • pkg/prowgen/testdata/zz_fixture_TestGeneratePeriodicForTest_periodic_with_from_repository_build_root__ExtraRefs_has_sparse_checkout_files.yaml
  • pkg/prowgen/testdata/zz_fixture_TestGeneratePeriodicForTest_periodic_with_from_repository_build_root_and_images__ExtraRefs_has_sparse_checkout_files_with_dockerfiles.yaml
  • pkg/prowgen/testdata/zz_fixture_TestNewProwJobBaseBuilderForTest_simple_container_based_test_with_timeout_and_no_decoration.yaml
  • pkg/prowgen/testdata/zz_fixture_TestProwJobBaseBuilder_job_with_from_repository_build_root__has_sparse_checkout_with_.ci_operator.yaml.yaml
  • pkg/prowgen/testdata/zz_fixture_TestProwJobBaseBuilder_job_with_from_repository_build_root_and_images__adds_dockerfiles_to_sparse_checkout.yaml
  • pkg/prowgen/testdata/zz_fixture_TestProwJobBaseBuilder_job_with_image_builds_in_of_openshift_release_main__does_not_have_no_builds__label.yaml
  • pkg/prowgen/testdata/zz_fixture_TestProwJobBaseBuilder_private_job_with_cloning__including_podspec.yaml
  • test/integration/ci-operator-prowgen/output/jobs/private-org/duper/private-org-duper-master-presubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/private-org/super/private-org-super-master-presubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/private/duper/private-duper-master-periodics.yaml
  • test/integration/ci-operator-prowgen/output/jobs/private/duper/private-duper-master-postsubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/private/duper/private-duper-master-presubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-periodics.yaml
  • test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-postsubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-presubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-master-removed-promotion-presubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-release-3.11-postsubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-release-3.11-presubmits.yaml
  • test/integration/ci-operator-prowgen/output/jobs/super/duper/super-duper-release-4.19-periodics.yaml
  • test/integration/pj-rehearse/candidate/ci-operator/jobs/super/duper/super-duper-ciop-cfg-change-presubmits.yaml
  • test/integration/pj-rehearse/candidate/ci-operator/jobs/super/duper/super-duper-cluster-profile-presubmits.yaml
  • test/integration/pj-rehearse/candidate/ci-operator/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/expected.yaml
  • test/integration/pj-rehearse/master/ci-operator/jobs/super/duper/super-duper-ciop-cfg-change-presubmits.yaml
  • test/integration/pj-rehearse/master/ci-operator/jobs/super/duper/super-duper-cluster-profile-presubmits.yaml
  • test/integration/pj-rehearse/master/ci-operator/jobs/super/duper/super-duper-master-presubmits.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/repo-init/expected/ci-operator/jobs/openshift/ci-tools/openshift-ci-tools-master-postsubmits.yaml
  • test/integration/repo-init/expected/ci-operator/jobs/openshift/ci-tools/openshift-ci-tools-master-presubmits.yaml
  • test/integration/repo-init/expected/ci-operator/jobs/openshift/origin/openshift-origin-main-postsubmits.yaml
  • test/integration/repo-init/expected/ci-operator/jobs/openshift/origin/openshift-origin-main-presubmits.yaml

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting


📝 Walkthrough

Walkthrough

This PR refactors cloning behavior in CI/operator Prow job generation by replacing sparse-checkout-based logic with a simpler skip_cloning approach. Core changes remove the sparseCheckoutFiles helper, simplify the cloning decision to depend solely on build root image configuration, and update decorations across test fixtures and integration tests to use skip_cloning: true instead of sparse checkout.

Changes

Cohort / File(s) Summary
Core Cloning Logic Refactoring
pkg/prowgen/jobbase.go, pkg/prowgen/jobbase_test.go, pkg/prowgen/prowgen.go, pkg/prowgen/prowgen_test.go
Removed sparseCheckoutFiles and fromRepositorySet helpers; replaced with unified skipCloning logic that derives cloning decision from FromRepository build root config. Deleted test suites validating sparse checkout behavior. Removed sparse checkout propagation to periodic job ExtraRefs. Simplified periodic test table by removing FromRepository test cases.
CI Operator Prowgen Test Fixtures
cmd/ci-operator-prowgen/testdata/zz_fixture_*.yaml
Updated 8 postsubmit and presubmit job fixture files to replace decoration_config.sparse_checkout_files: [Dockerfile] with decoration_config.skip_cloning: true.
Prow Job Generation Test Fixtures
pkg/prowgen/testdata/zz_fixture_*.yaml
Deleted 3 periodic job test fixture files (*periodic_with_from_repository_build_root*.yaml, *TestProwJobBaseBuilder_job_with_from_repository*.yaml); updated remaining fixtures to replace sparse checkout with skip_cloning: true. Removed sparse checkout from ExtraRefs configurations.
Integration Test Job Outputs
test/integration/ci-operator-prowgen/output/jobs/*/*.yaml, test/integration/pj-rehearse/*/ci-operator/jobs/*/*.yaml, test/integration/repo-init/expected/ci-operator/jobs/*/*.yaml
Updated ~40 presubmit, postsubmit, and periodic job YAML files to replace decoration_config.sparse_checkout_files: [Dockerfile] with decoration_config.skip_cloning: true. Updated private job configurations to add explicit secret volumes for OAuth credentials while removing decoration-level OAuth secret references.
Integration Test Expected Output
test/integration/pj-rehearse/expected.yaml
Updated multiple ProwJob entries to replace gcs_configuration.sparse_checkout_files: [Dockerfile] with skip_cloning: true and removed corresponding sparse_checkout_files from extra_refs and refs.pulls.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

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

Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

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

@openshift-merge-robot openshift-merge-robot merged commit 3d0c952 into openshift:main Apr 29, 2026
0 of 2 checks passed
@openshift-ci openshift-ci Bot requested review from deepsm007 and pruan-rht April 29, 2026 13:04
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 29, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Prucek

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:

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 29, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 29, 2026

@Prucek: all tests passed!

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants