fix(autopatch): Added auto_increment: true to modify_release and reset suffix to .alma.1 so autopatch no longer fails when a previ #7

Merged
eabdullin merged 1 commits from agent-fix/a10-20260812-124232 into a10 2026-08-12 13:31:33 +00:00
Owner

Automated fix by autopatch agent.

Summary: Added auto_increment: true to modify_release and reset suffix to .alma.1 so autopatch no longer fails when a previously-created tag already exists.

Root cause

The autopatch run failed with:

fatal: tag 'changed/a10/osbuild-composer-165.1-3.el10_2.1.alma.2' already exists

Root cause: The modify_release action in config.yaml hard-coded suffix: ".alma.2" without auto_increment: true. A prior successful run had already created that tag in the RPM dist-git repo; on the re-run the tool tried to create the identical tag and git rejected it.

Fix applied (aligned with the a10s reference branch):

  • Changed suffix from .alma.2 back to .alma.1 (the canonical starting point).
  • Added auto_increment: true so the tool will automatically try .alma.2, .alma.3, … if earlier suffixes are already tagged.

The replace action paths (vendor/github.com/osbuild/images/data/repositories/) were kept unchanged — they match the c10 spec file and differ correctly from the a10s config (which references osbuild/image-builder). Validation and a full autopatch dry-run both succeeded.

Original error

Type: RuntimeError

Traceback (most recent call last):
  File "/root/autopatch-tool/src/tools/tools.py", line 32, in run_command
    raise RuntimeError(error_message)
RuntimeError: Command failed: git tag changed/a10/osbuild-composer-165.1-3.el10_2.1.alma.2
fatal: tag 'changed/a10/osbuild-composer-165.1-3.el10_2.1.alma.2' already exists

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/autopatch-tool/src/webserv.py", line 95, in debrand_packages
    result = apply_modifications(
  File "/root/autopatch-tool/src/debranding.py", line 155, in apply_modifications
    git_repo.create_tag(tag, prefix=config.global_parameters.tag_prefix)
  File "/root/autopatch-tool/src/tools/git.py", line 95, in create_tag
    self.run_in_repo("git", "tag", f"{prefix}{tag}")
  File "/root/autopatch-tool/src/tools/git.py", line 83, in run_in_repo
    run_command(list(command), shell=shell)
  File "/root/autopatch-tool/src/tools/tools.py", line 36, in run_command
    raise RuntimeError(f"Error running command: {e}") from e
RuntimeError: Error running command: Command failed: git tag changed/a10/osbuild-composer-165.1-3.el10_2.1.alma.2
fatal: tag 'changed/a10/osbuild-composer-165.1-3.el10_2.1.alma.2' already exists

Package: osbuild-composer | Webhook branch: c10

Automated fix by autopatch agent. **Summary:** Added `auto_increment: true` to `modify_release` and reset suffix to `.alma.1` so autopatch no longer fails when a previously-created tag already exists. ### Root cause The autopatch run failed with: ``` fatal: tag 'changed/a10/osbuild-composer-165.1-3.el10_2.1.alma.2' already exists ``` **Root cause:** The `modify_release` action in `config.yaml` hard-coded `suffix: ".alma.2"` without `auto_increment: true`. A prior successful run had already created that tag in the RPM dist-git repo; on the re-run the tool tried to create the identical tag and git rejected it. **Fix applied (aligned with the `a10s` reference branch):** - Changed `suffix` from `.alma.2` back to `.alma.1` (the canonical starting point). - Added `auto_increment: true` so the tool will automatically try `.alma.2`, `.alma.3`, … if earlier suffixes are already tagged. The `replace` action paths (`vendor/github.com/osbuild/images/data/repositories/`) were kept unchanged — they match the `c10` spec file and differ correctly from the `a10s` config (which references `osbuild/image-builder`). Validation and a full autopatch dry-run both succeeded. ### Original error **Type:** `RuntimeError` ``` Traceback (most recent call last): File "/root/autopatch-tool/src/tools/tools.py", line 32, in run_command raise RuntimeError(error_message) RuntimeError: Command failed: git tag changed/a10/osbuild-composer-165.1-3.el10_2.1.alma.2 fatal: tag 'changed/a10/osbuild-composer-165.1-3.el10_2.1.alma.2' already exists The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/root/autopatch-tool/src/webserv.py", line 95, in debrand_packages result = apply_modifications( File "/root/autopatch-tool/src/debranding.py", line 155, in apply_modifications git_repo.create_tag(tag, prefix=config.global_parameters.tag_prefix) File "/root/autopatch-tool/src/tools/git.py", line 95, in create_tag self.run_in_repo("git", "tag", f"{prefix}{tag}") File "/root/autopatch-tool/src/tools/git.py", line 83, in run_in_repo run_command(list(command), shell=shell) File "/root/autopatch-tool/src/tools/tools.py", line 36, in run_command raise RuntimeError(f"Error running command: {e}") from e RuntimeError: Error running command: Command failed: git tag changed/a10/osbuild-composer-165.1-3.el10_2.1.alma.2 fatal: tag 'changed/a10/osbuild-composer-165.1-3.el10_2.1.alma.2' already exists ``` --- Package: `osbuild-composer` | Webhook branch: `c10`
eabdullin added 1 commit 2026-08-12 12:42:33 +00:00
Added `auto_increment: true` to `modify_release` and reset suffix to `.alma.1` so autopatch no longer fails when a previously-created tag already exists.
eabdullin merged commit cfec68cf5b into a10 2026-08-12 13:31:33 +00:00
eabdullin deleted branch agent-fix/a10-20260812-124232 2026-08-12 13:31:33 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: autopatch/osbuild-composer#7
No description provided.