Skip to content

Improve error reporting when workflow isn't found#49

Merged
manuq merged 2 commits intomainfrom
push-qllrlqxvnoys
Aug 6, 2025
Merged

Improve error reporting when workflow isn't found#49
manuq merged 2 commits intomainfrom
push-qllrlqxvnoys

Conversation

@wjt
Copy link
Member

@wjt wjt commented Aug 6, 2025

Previously, unless you looked at the output of the script (and interpreted the Python backtrace), in the case where the wrong workflow name is given, it has never run, or doesn't exist, the only visible error was "Process completed with exit code 1."

It is not possible to remove the "Process completed with exit code 1." message, but it is possible to show an error message as an annotation next to it. Do so, with a clearer message.

Fixes #48

@wjt wjt requested a review from manuq August 6, 2025 09:48
@wjt
Copy link
Member Author

wjt commented Aug 6, 2025

(The refactoring is prep for a later change.)

Copy link
Contributor

@manuq manuq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both the factor out commit and the commit that adds the hint to the error message look good to me! The pre-commit is failing with An unexpected error has occurred: FileNotFoundError: /home/runner/.local/bin/uv which has nothing to do with the changes.

Comment on lines -123 to +130
raise ValueError(f"Workflow '{self.workflow_name}' not found")
raise ConfigurationError(
f"Workflow '{self.workflow_name}' not found. "
"Has this project been built at least once?"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@wjt
Copy link
Member Author

wjt commented Aug 6, 2025

It does indeed have nothing to do with these changes; I'm investigating it now.

wjt added 2 commits August 6, 2025 17:36
Previously, unless you looked at the output of the script (and
interpreted the Python backtrace), in the case where the wrong workflow
name is given, it has never run, or doesn't exist, the only visible
error was "Process completed with exit code 1."

It is not possible to remove the "Process completed with exit code 1."
message, but it is possible to show an error message as an annotation
next to it. Do so, with a clearer message.

Fixes #48
@wjt wjt force-pushed the push-qllrlqxvnoys branch from 9bdb56c to 69897e0 Compare August 6, 2025 16:41
@manuq manuq merged commit 82b3b12 into main Aug 6, 2025
1 check passed
@manuq manuq deleted the push-qllrlqxvnoys branch August 6, 2025 16:46
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.

Crash more gracefully if build workflow is not found

2 participants

Comments