Skip to content

#1280 error handling improvements#1299

Draft
djdanielsson wants to merge 8 commits into
redhat-cop:develfrom
djdanielsson:error_handling
Draft

#1280 error handling improvements#1299
djdanielsson wants to merge 8 commits into
redhat-cop:develfrom
djdanielsson:error_handling

Conversation

@djdanielsson

Copy link
Copy Markdown
Collaborator

this was Claude-4.6-opus solution for #1280 figured I would throw it in there while also making some tweaks to fix the error handling issue that #1295 showed it didn't account for.

@djdanielsson djdanielsson requested a review from a team as a code owner March 16, 2026 20:48
@djdanielsson djdanielsson marked this pull request as draft March 16, 2026 20:48
@djdanielsson

Copy link
Copy Markdown
Collaborator Author

I have not tested this yet, wanted to see what people thought of it because it was generated. I will try and test it in the next few days.

@branic

branic commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

In a quick look there are some questions I have about new variables that have been introduced, but I haven't gone through the changes in detail. I'll let you get some testing done before I do an in-depth review.

@djdanielsson

Copy link
Copy Markdown
Collaborator Author

ok this one is tested and works but still not sure i love it, would like to see what others think of it

@Tompage1994

Copy link
Copy Markdown
Collaborator

@djdanielsson As you know I'm lazy. I trust it works. But can you provide a sample output of what we will see with this change?

@djdanielsson djdanielsson deleted the error_handling branch April 16, 2026 14:18
@djdanielsson djdanielsson restored the error_handling branch April 16, 2026 14:21
@djdanielsson djdanielsson reopened this Apr 16, 2026
@djdanielsson djdanielsson temporarily deployed to requires-approval April 16, 2026 14:22 — with GitHub Actions Inactive
…ist, defaulting to [collect_async_status.yml, handle_error.yml] — register removed from default path to reduce output

collect_async_status.yml (new): Extracted async polling; uses failed_when gated by cas_collect_logs instead of ignore_errors: true
register_value.yml (new): Extracted value registration; self-guarded, opt-in via cas_task_files
handle_error.yml: Added self-guard (when: result is defined and failed), added no_log, switched from aap_configuration_collect_logs to cas_collect_logs, added API response detail and status code to error output
defaults/main.yml: Added cas_collect_logs (falls back to aap_configuration_collect_logs, default false)
README.md: Documented composable task files, cas_task_files, cas_collect_logs, error output fields
tests/: Replaced ignore_errors: true with failed_when: false
…factor

Apply the same msg/detail/error lookup chain from redhat-cop#1305 to the
refactored handle_error.yml so modules that put errors in detail or
error keys still produce useful messages when redhat-cop#1299 merges.

Co-authored-by: Cursor <cursoragent@cursor.com>
@djdanielsson djdanielsson temporarily deployed to requires-approval May 29, 2026 21:51 — with GitHub Actions Inactive
@djdanielsson djdanielsson temporarily deployed to requires-approval June 16, 2026 18:20 — with GitHub Actions Inactive
ansible-core devel now requires Python >=3.13, so the py3.12-devel
tox environment cannot install dependencies and fails during CI setup.

Co-authored-by: Cursor <cursoragent@cursor.com>
@djdanielsson djdanielsson temporarily deployed to requires-approval June 17, 2026 13:59 — with GitHub Actions Inactive
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.

3 participants