Skip to content

fix(cd): create 'automated' label before back-merge PR to avoid failure - #300

Merged
pszymkowiak merged 1 commit into
developfrom
fix/back-merge-label
Jul 24, 2026
Merged

fix(cd): create 'automated' label before back-merge PR to avoid failure#300
pszymkowiak merged 1 commit into
developfrom
fix/back-merge-label

Conversation

@pszymkowiak

Copy link
Copy Markdown
Contributor

Problem

The post-release back-merge-develop job in cd.yml runs gh pr create … --label automated, but the automated label does not exist in this repo. gh pr create validates labels before creating the PR, so the step fails with:

could not add label: 'automated' not found

This happened on every release: the back-merge branch was pushed but no PR was opened, so develop silently fell behind on release-version metadata (manifest + CHANGELOG + Cargo.toml). Observed and recovered manually on icm-v0.10.54 (back-merge completed via #298).

Fix

Create the automated label idempotently right before gh pr create:

gh label create automated --color ededed --description "Automated PR (back-merge / release tooling)" 2>/dev/null || true
  • Keeps the automated label semantics (useful for filtering tooling PRs).
  • Removes the failure mode without masking real gh pr create errors.

Test

YAML validated. Functional validation happens on the next release: the back-merge PR should open automatically with the automated label and no failure.

The post-release back-merge job runs `gh pr create --label automated`, but
the label does not exist in the repo. `gh pr create` validates labels before
creating the PR, so the whole step failed ("could not add label: 'automated'
not found") on every release — the back-merge branch was pushed but no PR was
opened, leaving develop behind on version metadata.

Create the label idempotently right before the PR is opened. Keeps the
`automated` label semantics (useful for filtering tooling PRs) while removing
the failure mode; real `gh pr create` errors still surface.

Observed on the icm-v0.10.54 release.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pszymkowiak

Copy link
Copy Markdown
Contributor Author

Verified: the automated label is currently absent on this repo (gh label list — confirmed), so gh pr create --label "automated" in the back-merge step (cd.yml:217) was indeed failing and aborting the back-merge PR. The fix (gh label create automated … 2>/dev/null || true) is idempotent and placed right before the pr create that needs it. Patched cd.yml parses as valid YAML. Only touches cd.yml (no conflict with recent develop). LGTM — ready to merge.

@pszymkowiak
pszymkowiak merged commit c8e0ce9 into develop Jul 24, 2026
7 checks passed
@rtk-ai-icm-ci rtk-ai-icm-ci Bot mentioned this pull request Jul 24, 2026
@pszymkowiak
pszymkowiak deleted the fix/back-merge-label branch July 28, 2026 20:31
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.

1 participant