Skip to content

fix(hack): enhance hack/propagate.sh with git optimization, support custom argocd-operator branch#1196

Open
chengfang wants to merge 2 commits into
redhat-developer:masterfrom
chengfang:hack.propagate.sh
Open

fix(hack): enhance hack/propagate.sh with git optimization, support custom argocd-operator branch#1196
chengfang wants to merge 2 commits into
redhat-developer:masterfrom
chengfang:hack.propagate.sh

Conversation

@chengfang

@chengfang chengfang commented Jun 29, 2026

Copy link
Copy Markdown

What type of PR is this?
/kind enhancement

What does this PR do / why we need it:
enhance hack/propagate.sh to detect any manifest drift between argocd-operator and gitops-operator

Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:

Fixes #?
https://redhat.atlassian.net/browse/GITOPS-10196

Test acceptance criteria:

  • Unit Test
  • E2E Test

How to test changes / Special notes to the reviewer:

…ustom argocd-operator branch, and inclusion in Makefile targets

Signed-off-by: Cheng Fang <cfang@redhat.com>

Co-authored-by: Claude <noreply@anthropic.com>
@openshift-ci openshift-ci Bot added the kind/enhancement New feature or request label Jun 29, 2026
@openshift-ci openshift-ci Bot requested review from chetan-rns and varshab1210 June 29, 2026 19:57
@openshift-ci

openshift-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jgwest 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 commented Jun 29, 2026

Copy link
Copy Markdown

Hi @chengfang. Thanks for your PR.

I'm waiting for a redhat-developer member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 89e9b20a-b0d8-4733-a377-cbfe3f8b1ca7

📥 Commits

Reviewing files that changed from the base of the PR and between aa61962 and 2fffa4f.

📒 Files selected for processing (1)
  • Makefile
🚧 Files skipped from review as they are similar to previous changes (1)
  • Makefile

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a new command to compare and propagate manifests, with support for choosing the source branch.
    • Added options to use a custom branch and skip the build step when running the propagation workflow.
  • Improvements

    • Streamlined the manifest sync process by limiting repository fetches to the selected branch.

Walkthrough

The Makefile gains a new propagate-manifests target with a configurable branch variable. The propagation script now accepts --from-branch and --skip-make, clones the source repository shallowly from the selected branch, and optionally skips make bundle.

Changes

Manifest Propagation Enhancement

Layer / File(s) Summary
propagate.sh argument parsing, clone, and conditional build
hack/propagate.sh
Adds FROM_BRANCH and SKIP_MAKE variables, CLI parsing with usage(), a shallow single-branch clone, and conditional make bundle execution.
Makefile propagate-manifests target
Makefile
Adds ARGOCD_OPERATOR_BRANCH ?= master and a propagate-manifests phony target that invokes ./hack/propagate.sh --from-branch $(ARGOCD_OPERATOR_BRANCH).

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main script changes: git optimization and support for a custom argocd-operator branch.
Description check ✅ Passed The description is clearly related to the manifest-drift detection and branch support changes in this PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@chengfang

Copy link
Copy Markdown
Author

/ok-to-test

@openshift-ci

openshift-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown

@chengfang: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/ok-to-test

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Makefile`:
- Line 270: The default bundle generation path is too tightly coupled to remote
manifest syncing because the bundle target invokes propagate-manifests, which
shells into the live git clone flow in hack/propagate.sh. Update the Makefile so
bundle only performs local, reproducible generation steps (operator-sdk,
manifests, kustomize), and move the remote sync behavior behind a separate
explicit target or opt-in step. Keep the existing bundle-related targets
consistent by adjusting any adjacent bundle/propagate-manifests definitions so
make bundle no longer depends on GitHub availability or upstream branch tip.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: b935e3b2-694b-44fa-b487-102e637d23af

📥 Commits

Reviewing files that changed from the base of the PR and between 93a8216 and aa61962.

📒 Files selected for processing (2)
  • Makefile
  • hack/propagate.sh
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • argoproj-labs/argocd-operator (manual)

Comment thread Makefile Outdated
@olivergondza

Copy link
Copy Markdown
Collaborator

/ok-to-test

Comment thread Makefile Outdated

ARGOCD_OPERATOR_BRANCH ?= master

# To run propagate-manifests target with the default argocd-operator master brach:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# To run propagate-manifests target with the default argocd-operator master brach:
# To run propagate-manifests target with the default argocd-operator master branch:

@olivergondza olivergondza changed the title fix(hack): enhance hack/propagate.sh with git optimization, support custom argocd-operator branch, and inclusion in Makefile targets fix(hack): enhance hack/propagate.sh with git optimization, support custom argocd-operator branch Jul 1, 2026
@olivergondza

Copy link
Copy Markdown
Collaborator

CC @svghadi, @jgwest

…rget to avoid affecting existing usage

Signed-off-by: Cheng Fang <cfang@redhat.com>
@chengfang chengfang force-pushed the hack.propagate.sh branch from 30aca5f to 2fffa4f Compare July 1, 2026 19:55
@openshift-ci

openshift-ci Bot commented Jul 1, 2026

Copy link
Copy Markdown

@chengfang: 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/v4.19-ci-index-gitops-operator-bundle 2fffa4f link true /test v4.19-ci-index-gitops-operator-bundle
ci/prow/v4.14-ci-index-gitops-operator-bundle 2fffa4f link true /test v4.14-ci-index-gitops-operator-bundle
ci/prow/v4.19-e2e 2fffa4f link true /test v4.19-e2e

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

kind/enhancement New feature or request ok-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants