Skip to content

Do not swallow RunTimeoutError while collecting facts - #643

Open
silug wants to merge 1 commit into
OpenVoxProject:mainfrom
silug:fact-handler-reraise-runtimeout
Open

Do not swallow RunTimeoutError while collecting facts#643
silug wants to merge 1 commit into
OpenVoxProject:mainfrom
silug:fact-handler-reraise-runtimeout

Conversation

@silug

@silug silug commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Short description

Puppet::Agent::RunTimeoutError inherits from Exception so that it escapes the usual rescue StandardError handlers and aborts the run. The fact handler, however, rescues Exception and only re-raises SystemExit and NoMemoryError, so a run timeout that fires during fact collection was wrapped into a plain Puppet::Error ("Could not retrieve local facts: execution expired") and the run carried on to send a report as if nothing had happened.

Re-raise RunTimeoutError alongside SystemExit and NoMemoryError so the agent aborts the run as intended.

Fixes part of #485

Generated by Claude Code

Checklist

I have:

`Puppet::Agent::RunTimeoutError` inherits from `Exception` so that it
escapes the usual `rescue StandardError` handlers and aborts the run. The
fact handler, however, rescues `Exception` and only re-raises SystemExit
and NoMemoryError, so a run timeout that fires during fact collection was
wrapped into a plain Puppet::Error ("Could not retrieve local facts:
execution expired") and the run carried on to send a report as if nothing
had happened.

Re-raise RunTimeoutError alongside SystemExit and NoMemoryError so the
agent aborts the run as intended.

Fixes part of OpenVoxProject#485

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Steven Pritchard <steven.pritchard@gmail.com>
@silug
silug marked this pull request as ready for review September 4, 2026 15:57
@silug
silug enabled auto-merge September 4, 2026 15:57
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