fix(autopatch): Updated find string in replace action #2: replaced the obsolete '%ifarch aarch64 / %bcond_without ignore_tests / %bcond_ #1

Merged
eabdullin merged 1 commits from agent-fix/a10s-20260424-014020 into a10s 2026-04-27 08:51:27 +00:00
Owner

Automated fix by autopatch agent.

Summary: Updated find string in replace action #2: replaced the obsolete '%ifarch aarch64 / %bcond_without ignore_tests / %bcond_with ignore_tests / %endif' block with '%global fail_on_tests 1' as the anchor for inserting the race detector globals.

Root cause

The upstream golang spec changed from using '%bcond_without/with ignore_tests' (conditioned on %ifarch aarch64) to a simpler '%global fail_on_tests 1' definition. The ReplaceAction was trying to find the old conditional bcond block which no longer exists in the spec. The fix updates the find string to match the new '%global fail_on_tests 1' line (which is unique in the spec), and updates the replace string to append the '%global race 1 / %ifarch riscv64 / %global race 0 / %endif' block after it. The reference branch (a10) had the same outdated config, so the fix was derived independently from spec analysis.

Original error

Type: ActionNotAppliedError

Traceback (most recent call last):
  File "/root/autopatch-tool/src/webserv.py", line 77, in debrand_packages
    result = apply_modifications(
  File "/root/autopatch-tool/src/debranding.py", line 111, in apply_modifications
    config.apply_actions(rpms_working_dir + f"/{package}")
  File "/root/autopatch-tool/src/actions_handler.py", line 925, in apply_actions
    action.execute(Path(package_path))
  File "/root/autopatch-tool/src/actions_handler.py", line 472, in execute
    process_lines(
  File "/root/autopatch-tool/src/actions_handler.py", line 233, in process_lines
    raise ActionNotAppliedError(
actions_handler.ActionNotAppliedError: Action 'ReplaceAction' was not applied successfully: No changes made for '['%ifarch aarch64', '%bcond_without ignore_tests', '%else', '%bcond_with ignore_tests', '%endif']' in /root/autopatch-tool/src/rpms-namespace/golang/golang.spec

Package: golang | Webhook branch: c10s

Automated fix by autopatch agent. **Summary:** Updated find string in replace action #2: replaced the obsolete '%ifarch aarch64 / %bcond_without ignore_tests / %bcond_with ignore_tests / %endif' block with '%global fail_on_tests 1' as the anchor for inserting the race detector globals. ### Root cause The upstream golang spec changed from using '%bcond_without/with ignore_tests' (conditioned on %ifarch aarch64) to a simpler '%global fail_on_tests 1' definition. The ReplaceAction was trying to find the old conditional bcond block which no longer exists in the spec. The fix updates the find string to match the new '%global fail_on_tests 1' line (which is unique in the spec), and updates the replace string to append the '%global race 1 / %ifarch riscv64 / %global race 0 / %endif' block after it. The reference branch (a10) had the same outdated config, so the fix was derived independently from spec analysis. ### Original error **Type:** `ActionNotAppliedError` ``` Traceback (most recent call last): File "/root/autopatch-tool/src/webserv.py", line 77, in debrand_packages result = apply_modifications( File "/root/autopatch-tool/src/debranding.py", line 111, in apply_modifications config.apply_actions(rpms_working_dir + f"/{package}") File "/root/autopatch-tool/src/actions_handler.py", line 925, in apply_actions action.execute(Path(package_path)) File "/root/autopatch-tool/src/actions_handler.py", line 472, in execute process_lines( File "/root/autopatch-tool/src/actions_handler.py", line 233, in process_lines raise ActionNotAppliedError( actions_handler.ActionNotAppliedError: Action 'ReplaceAction' was not applied successfully: No changes made for '['%ifarch aarch64', '%bcond_without ignore_tests', '%else', '%bcond_with ignore_tests', '%endif']' in /root/autopatch-tool/src/rpms-namespace/golang/golang.spec ``` --- Package: `golang` | Webhook branch: `c10s`
eabdullin added 1 commit 2026-04-24 01:40:21 +00:00
Updated find string in replace action #2: replaced the obsolete '%ifarch aarch64 / %bcond_without ignore_tests / %bcond_with ignore_tests / %endif' block with '%global fail_on_tests 1' as the anchor f
eabdullin merged commit 6f55673e6a into a10s 2026-04-27 08:51:27 +00:00
eabdullin deleted branch agent-fix/a10s-20260424-014020 2026-04-27 08:51:27 +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/golang#1
No description provided.