From cfcf7fb1af4bc0b880efe0485c36616c2eab5cb1 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Thu, 26 Jun 2025 09:00:40 +0200 Subject: [PATCH 1/2] acc: Minor fixes in script in restricted-execution The second summary command does not return json, so passing it to jq is confusing (jq also does not fail on empty input). Use musterr to show that error is intentional. --- acceptance/bundle/python/restricted-execution/script | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acceptance/bundle/python/restricted-execution/script b/acceptance/bundle/python/restricted-execution/script index 07bb754467..e738f1c7d9 100644 --- a/acceptance/bundle/python/restricted-execution/script +++ b/acceptance/bundle/python/restricted-execution/script @@ -10,7 +10,7 @@ rm -rf envs.txt export DATABRICKS_BUNDLE_RESTRICTED_CODE_EXECUTION=1 title "With DATABRICKS_BUNDLE_RESTRICTED_CODE_EXECUTION=1, no envs are accessible" -trace errcode uv run $UV_ARGS -q $CLI bundle summary | jq '.experimental' -errcode cat envs.txt +trace musterr uv run $UV_ARGS -q $CLI bundle summary +trace musterr cat envs.txt rm -fr .databricks __pycache__ From 47316e0e6adaad5402019e3fd74b255f559a152d Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Thu, 26 Jun 2025 09:28:08 +0200 Subject: [PATCH 2/2] update output --- acceptance/bundle/python/restricted-execution/output.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/acceptance/bundle/python/restricted-execution/output.txt b/acceptance/bundle/python/restricted-execution/output.txt index 77c658ae21..48f2127f1f 100644 --- a/acceptance/bundle/python/restricted-execution/output.txt +++ b/acceptance/bundle/python/restricted-execution/output.txt @@ -13,10 +13,12 @@ value_from_env === With DATABRICKS_BUNDLE_RESTRICTED_CODE_EXECUTION=1, no envs are accessible ->>> errcode uv run [UV_ARGS] -q [CLI] bundle summary +>>> musterr uv run [UV_ARGS] -q [CLI] bundle summary Error: Running Python code is not allowed when DATABRICKS_BUNDLE_RESTRICTED_CODE_EXECUTION is set -Exit code: 1 +Exit code (musterr): 1 + +>>> musterr cat envs.txt cat: envs.txt: No such file or directory -Exit code: 1 +Exit code (musterr): 1