Adds an execution Error Code to Flakeguard #1617
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New error code for Flakeguard to help us identify when we find flakes, or when we hit errors finding flakes.
Exit Code 1: Flakeguard ran successfully and found some flakes
Exit Code 2: Flakeguard hit some issues and was not able to complete
Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The changes introduce enhancements and bug fixes to various commands in the Flakeguard tool suite, focusing on error handling, logging improvements, and exit code standardization. These modifications aim to make the tool more robust and user-friendly by providing clearer error messages, ensuring consistent exit behavior across commands, and improving the overall reliability and maintainability of the codebase.
What
tools/flakeguard/cmd/aggregate_results.go
:"os"
for exit code management and error handling.RunE
withRun
to manage errors and exit codes manually.log.Error()
andos.Exit()
for error handling, improving clarity and control over exit behavior.tools/flakeguard/cmd/check_test_owners.go
:"os"
for handling exit codes.RunE
withRun
for manual error and exit code management.log.Error()
andos.Exit()
for error handling.tools/flakeguard/cmd/find.go
:"os"
for improved error and exit code handling.Run
fromRunE
and manage errors and exit codes manually.log.Error()
andos.Exit()
for error handling.tools/flakeguard/cmd/generate_report.go
:"os"
for enhanced error handling and exit code management.RunE
toRun
to manually handle errors and exit codes.log.Error()
andos.Exit()
for error handling, enhancing clarity.tools/flakeguard/cmd/run.go
:FlakyTestsExitCode
andErrorExitCode
for standardized exit codes.Run
instead ofRunE
for explicit error and exit code control.log.Error()
andos.Exit()
for uniform error handling.tools/flakeguard/reports/presentation.go
:RenderError
function for consistent error reporting.tools/flakeguard/runner/runner_test.go
: