Skip to content

Commit 7a26c0a

Browse files
committed
Fix the deletion of namespaces logic
1 parent 1b4c3c9 commit 7a26c0a

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

apps/jjb/operator_custom_tests.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
- Default (from catalog)
5151
- Auto-retry
5252
- run-tests
53-
description: "Test execution mode: Default uses catalog configuration (hdfs-operator uses auto-retry, others use run-tests), Auto-retry forces auto-retry-tests.py with intelligent retry logic, run-tests forces traditional run-tests script"
53+
description: "Test execution mode: Default uses catalog configuration, Auto-retry uses a script to automatically retry failing tests, run-tests just runs the tests once"
5454
wrappers:
5555
- credentials-binding:
5656
- text:

apps/src/modules/catalog.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ def get_auto_retry_config(operator_id):
188188
{
189189
'attempts_parallel': int,
190190
'attempts_serial': int,
191-
'keep_failed_namespaces': bool
191+
'delete_failed_namespaces': bool
192192
}
193193
"""
194194
operator_test = get_operator_test(operator_id)
195195

196196
# Default configuration
197-
default_config = {"attempts_parallel": 0, "attempts_serial": 3, "keep_failed_namespaces": False}
197+
default_config = {"attempts_parallel": 0, "attempts_serial": 3, "delete_failed_namespaces": True}
198198

199199
if not operator_test or "auto_retry" not in operator_test:
200200
return default_config

apps/src/operator-test-runner.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def run_tests(operator, operator_version, test_script_params):
225225
log(
226226
f"Auto-retry configuration: attempts_parallel={retry_config['attempts_parallel']}, "
227227
f"attempts_serial={retry_config['attempts_serial']}, "
228-
f"keep_failed_namespaces={retry_config['keep_failed_namespaces']}"
228+
f"delete_failed_namespaces={retry_config['delete_failed_namespaces']}"
229229
)
230230

231231
# Extract parallel value from test_script_params (default to 0)
@@ -249,9 +249,8 @@ def run_tests(operator, operator_version, test_script_params):
249249
f"--output-dir {TARGET_FOLDER}test-results",
250250
]
251251

252-
# Add keep-failed-namespaces flag if configured to keep them
253-
if retry_config["keep_failed_namespaces"]:
254-
command_parts.append("--keep-failed-namespaces")
252+
if retry_config["delete_failed_namespaces"]:
253+
command_parts.append("--delete-failed-namespaces")
255254

256255
# Add extra args from test_script_params (excluding --parallel which we already handled)
257256
extra_params = []

0 commit comments

Comments
 (0)