Skip to content

Commit

Permalink
Add failed substatus for InvalidValue runs.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 704459216
  • Loading branch information
jacklacey11 authored and copybara-github committed Dec 10, 2024
1 parent 6bae0d9 commit 9adf2f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions perfkitbenchmarker/benchmark_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ class FailedSubstatus:
# Failure when a retryable command execution exceeds the retry limit.
RETRIES_EXCEEDED = 'RETRIES_EXCEEDED'

# Failure when config values are invalid.
INVALID_VALUE = 'INVALID_VALUE'

# List of valid substatuses for use with --retries.
# UNCATEGORIZED failures are not retryable. To make a specific UNCATEGORIZED
# failure retryable, please raise an errors.Benchmarks.KnownIntermittentError.
Expand Down
2 changes: 2 additions & 0 deletions perfkitbenchmarker/pkb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,8 @@ def RunBenchmark(
spec.failed_substatus = (
benchmark_status.FailedSubstatus.RETRIES_EXCEEDED
)
elif _IsException(e, errors.Config.InvalidValue):
spec.failed_substatus = benchmark_status.FailedSubstatus.INVALID_VALUE
else:
spec.failed_substatus = benchmark_status.FailedSubstatus.UNCATEGORIZED
spec.status_detail = str(e)
Expand Down

0 comments on commit 9adf2f6

Please sign in to comment.