Skip to content

ci: fix PR branch pull step on stable pushes#45019

Merged
aanm merged 1 commit intomainfrom
pr/artyop/fix-pr-branch-pull-step
Mar 27, 2026
Merged

ci: fix PR branch pull step on stable pushes#45019
aanm merged 1 commit intomainfrom
pr/artyop/fix-pr-branch-pull-step

Conversation

@Artyop
Copy link
Copy Markdown
Contributor

@Artyop Artyop commented Mar 27, 2026

On workflow_dispatch event, pr-number also carry the name of the branch instead of the PR number when the branch isn't associated with any PR. Such example can be found on stable branch workflow-dispatch : https://github.com/cilium/cilium/actions/runs/23629031538/job/68824091132

In order to avoid error on the PR research with git CLI, we check when the context-ref equals the pr-number. Knowing it's a case where the branch isn't associated with any PR, we then use the context-ref as a base branch to carry on the workflow.

Fixes: https://github.com/cilium/cilium/actions/runs/23629031538/job/68824124379

On workflow_dispatch event, pr-number also carry the name of the
branch instead of the PR number when the branch isn't associated with
any PR. Such example can be found on stable branch workflow-dispatch :
https://github.com/cilium/cilium/actions/runs/23629031538/job/68824091132

In order to avoid error on the PR research with git CLI, we check
when the context-ref equals the pr-number. Knowing it's a case where the
branch isn't associated with any PR, we then use the context-ref as a
base branch to carry on the workflow.

Signed-off-by: Antony Reynaud <antony.reynaud@isovalent.com>
@Artyop Artyop requested review from a team as code owners March 27, 2026 09:33
@Artyop Artyop requested review from liyihuang and smagnani96 March 27, 2026 09:33
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 27, 2026
@Artyop Artyop requested review from aanm and nebril March 27, 2026 09:33
@Artyop Artyop added area/CI Continuous Integration testing issue or flake release-note/ci This PR makes changes to the CI. labels Mar 27, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 27, 2026
@Artyop Artyop added the needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch label Mar 27, 2026
@Artyop
Copy link
Copy Markdown
Contributor Author

Artyop commented Mar 27, 2026

/test

@aanm aanm added this pull request to the merge queue Mar 27, 2026
Merged via the queue into main with commit 149b3a0 Mar 27, 2026
116 of 117 checks passed
@aanm aanm deleted the pr/artyop/fix-pr-branch-pull-step branch March 27, 2026 11:45
Artyop added a commit that referenced this pull request Mar 27, 2026
Fixing bad changes in #45019
pr-number doesn't have the value of the stable branch but a replacement
using hyphens instead of the standard dot.

Instead of comparing pr-number and context-ref, verify that pr-number
is an actual pr-number, if it isn't, assuming the dispatch isn't coming
from a PR but Ariane's dispatch, so use the context-ref instead.

Fixes #44914

Signed-off-by: Antony Reynaud <antony.reynaud@isovalent.com>
github-merge-queue bot pushed a commit that referenced this pull request Mar 27, 2026
Fixing bad changes in #45019
pr-number doesn't have the value of the stable branch but a replacement
using hyphens instead of the standard dot.

Instead of comparing pr-number and context-ref, verify that pr-number
is an actual pr-number, if it isn't, assuming the dispatch isn't coming
from a PR but Ariane's dispatch, so use the context-ref instead.

Fixes #44914

Signed-off-by: Antony Reynaud <antony.reynaud@isovalent.com>
viktor-kurchenko pushed a commit that referenced this pull request Mar 30, 2026
[ upstream commit 0b72c00 ]

Fixing bad changes in #45019
pr-number doesn't have the value of the stable branch but a replacement
using hyphens instead of the standard dot.

Instead of comparing pr-number and context-ref, verify that pr-number
is an actual pr-number, if it isn't, assuming the dispatch isn't coming
from a PR but Ariane's dispatch, so use the context-ref instead.

Fixes #44914

Signed-off-by: Antony Reynaud <antony.reynaud@isovalent.com>
Signed-off-by: viktor-kurchenko <viktor.kurchenko@isovalent.com>
@viktor-kurchenko viktor-kurchenko added backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. and removed needs-backport/1.19 This PR / issue needs backporting to the v1.19 branch labels Mar 30, 2026
github-merge-queue bot pushed a commit that referenced this pull request Apr 1, 2026
[ upstream commit 0b72c00 ]

Fixing bad changes in #45019
pr-number doesn't have the value of the stable branch but a replacement
using hyphens instead of the standard dot.

Instead of comparing pr-number and context-ref, verify that pr-number
is an actual pr-number, if it isn't, assuming the dispatch isn't coming
from a PR but Ariane's dispatch, so use the context-ref instead.

Fixes #44914

Signed-off-by: Antony Reynaud <antony.reynaud@isovalent.com>
Signed-off-by: viktor-kurchenko <viktor.kurchenko@isovalent.com>
@github-actions github-actions bot added backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. and removed backport-pending/1.19 The backport for Cilium 1.19.x for this PR is in progress. labels Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/CI Continuous Integration testing issue or flake backport-done/1.19 The backport for Cilium 1.19.x for this PR is done. release-note/ci This PR makes changes to the CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants