From 9adf2f6d9ef5c8ff0fab01ae48830f5626711107 Mon Sep 17 00:00:00 2001 From: Jack Lacey Date: Mon, 9 Dec 2024 16:35:46 -0800 Subject: [PATCH] Add failed substatus for `InvalidValue` runs. PiperOrigin-RevId: 704459216 --- perfkitbenchmarker/benchmark_status.py | 3 +++ perfkitbenchmarker/pkb.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/perfkitbenchmarker/benchmark_status.py b/perfkitbenchmarker/benchmark_status.py index 7e12d40944..cdc3277e30 100644 --- a/perfkitbenchmarker/benchmark_status.py +++ b/perfkitbenchmarker/benchmark_status.py @@ -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. diff --git a/perfkitbenchmarker/pkb.py b/perfkitbenchmarker/pkb.py index e542d95ec3..32657e89fe 100644 --- a/perfkitbenchmarker/pkb.py +++ b/perfkitbenchmarker/pkb.py @@ -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)