OCPBUGS-85084: fix(ci): use explicit lease in dependabot commit fix push#8476
Conversation
The --force-with-lease push in the dependabot commit fix workflow fails with "stale info" because actions/checkout creates a shallow detached HEAD clone that lacks remote tracking information. Use the explicit --force-with-lease=<ref>:<expected-sha> form to supply the known original SHA directly, eliminating the need for local tracking refs. Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@jparrill: This pull request references Jira Issue OCPBUGS-85084, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
📝 WalkthroughWalkthroughThis change modifies a reusable GitHub Actions workflow to enhance the git push operation. The workflow now passes the 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
|
/area ci-tooling |
|
/jra refresh |
|
/verified bypass |
|
@jparrill: The DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
Pipeline controller notification No second-stage tests were triggered for this PR. This can happen when:
Use |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, jparrill The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/jira refresh |
|
@jparrill: This pull request references Jira Issue OCPBUGS-85084, which is valid. 3 validation(s) were run on this bug
DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/override e2e-azure-v2-self-managed |
|
@jparrill: /override requires failed status contexts, check run or a prowjob name to operate on.
Only the following failed contexts/checkruns were expected:
If you are trying to override a checkrun that has a space in it, you must put a double quote on the context. DetailsIn response to this:
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. |
1abf815
into
openshift:main
|
@jparrill: Jira Issue OCPBUGS-85084: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-85084 has been moved to the MODIFIED state. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
Fix included in release 5.0.0-0.nightly-2026-05-12-025124 |
Summary
--force-with-leasepush failure ("stale info") in the dependabot commit message fix workflow--force-with-lease=<ref>:<expected-sha>instead of relying on local tracking refs that don't exist in the shallow detached HEAD clone created byactions/checkoutRoot Cause Analysis
The
dependabot-commit-fix-reusable.yamlworkflow (introduced in #8435) rewrites dependabot commit messages to pass gitlint, then pushes the amended commit. Every push has failed since the workflow was introduced.Why it fails:
actions/checkoutwithref: <SHA>+fetch-depth: 2creates a shallow clone in detached HEAD staterefs/remotes/origin/<branch>)--force-with-leasewithout an explicit expected value needs the local remote-tracking ref to compare against the current remote state(stale info)and rejects the pushEvidence: All 6 workflow runs triggered by dependabot Gitlint failures on 2026-05-08 failed with the same error:
Fix: Use
--force-with-lease=${HEAD_BRANCH}:${HEAD_SHA}which explicitly provides the expected remote SHA, bypassing the need for local tracking refs. Verified empirically by reproducing the exactactions/checkoutshallow clone scenario locally.Test plan
@dependabot rebaseon build(deps): bump github.com/Azure/azure-sdk-for-go/sdk/azcore from 1.21.0 to 1.21.1 in the azure-github-dependencies group across 1 directory #8460) to re-run Gitlint → fix workflow chain🤖 Generated with Claude Code
Validation
@dependabot rebaseat build(deps): bump github.com/Azure/azure-sdk-for-go/sdk/azcore from 1.21.0 to 1.21.1 in the azure-github-dependencies group across 1 directory #8460 once this PR got merged.Summary by CodeRabbit