Skip to content

Added logic to proceed in pipeline when trying to re-run jobs without commit - #1871

Merged
Despire merged 2 commits into
masterfrom
chore/ci-edit-kustomization
Jun 8, 2026
Merged

Added logic to proceed in pipeline when trying to re-run jobs without commit#1871
Despire merged 2 commits into
masterfrom
chore/ci-edit-kustomization

Conversation

@m-brando

@m-brando m-brando commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

Added logic to allow the pipeline to proceed when re-running jobs without requiring a new commit.

This improves testing speed. If the pipeline failed for a reason unrelated to the code (before the edit-kustomization job) - you had to push an empty commit to restart pipeline.
That would re-run the entire pipeline from the beginning, even if most jobs had already passed. Example: https://github.com/berops/claudie/actions/runs/18340633694/attempts/2

If you do not commit new message and re-run pipeline manualy pipeline will fail. Here is example of this: https://github.com/berops/claudie/actions/runs/18340633694/job/52285267386#step:8:20

Adding the if statement in the step Commit new kustomization.yaml to feature branch can save over 30 minutes during testing.

Summary by CodeRabbit

  • Chores
    • Refined CI pipeline to commit/push only when actual changes exist, preventing empty commits.
    • Improves pipeline stability and reduces redundant operations, keeping repository history cleaner.
    • Streamlines automation logs, minimizes noise in build output, and avoids unnecessary errors from no-op commits.
    • No impact on user-facing features or behavior.

@coderabbitai

coderabbitai Bot commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

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: Pro

Run ID: a4895ceb-c200-4042-9f1d-e6b386e96174

📥 Commits

Reviewing files that changed from the base of the PR and between e633309 and 6269b68.

📒 Files selected for processing (1)
  • .github/workflows/CI-pipeline.yml

Walkthrough

CI workflow updated to conditionally commit and push changes to kustomization.yaml only when staged modifications exist, replacing unconditional git commit/push with a guarded check and informational message when no changes are present.

Changes

CI guard for empty commits

Layer / File(s) Summary
Guard commit/push for kustomization update
.github/workflows/CI-pipeline.yml
Replaced unconditional git commit/git push with a conditional block that checks for staged changes; commits and pushes only when changes are detected, otherwise logs a no-op message.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as Developer
    participant GH as GitHub Actions (CI)
    participant Git as Git

    Dev->>GH: Push changes
    GH->>GH: Build and update kustomization.yaml
    GH->>Git: git add kustomization.yaml
    alt Changes staged
        GH->>Git: git commit -m "Auto-update kustomization.yaml"
        GH->>Git: git push
        note right of GH: Commit and push proceed
    else No staged changes
        GH->>GH: Echo "No changes to commit"
        note right of GH: Skip commit/push
    end
Loading

Possibly related PRs

  • berops/claudie#1944: Also modifies CI-pipeline.yml to introduce conditional execution/guards around CI steps.

Suggested labels

bug

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding conditional logic to allow pipeline re-runs without requiring a new commit, which is the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ci-edit-kustomization

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 and usage tips.

Comment thread .github/workflows/CI-pipeline.yml
@Despire
Despire added this pull request to the merge queue Jun 8, 2026
Merged via the queue into master with commit f8446f5 Jun 8, 2026
8 checks passed
@Despire
Despire deleted the chore/ci-edit-kustomization branch June 8, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants