From 0d713abd5aefa8209131c206e885c2a926488e67 Mon Sep 17 00:00:00 2001 From: Alexander Tarasov Date: Wed, 30 Sep 2026 11:04:30 +0200 Subject: [PATCH 1/3] ref(install): Read the JS SDK loader registry with python3 instead of cat The sentry image is moving to a distroless base without coreutils. python3 isn't a sentry subcommand, so the entrypoint execs it directly, just like cat. --- install/setup-js-sdk-assets.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/setup-js-sdk-assets.sh b/install/setup-js-sdk-assets.sh index cba66442689..44c0f84407c 100644 --- a/install/setup-js-sdk-assets.sh +++ b/install/setup-js-sdk-assets.sh @@ -16,8 +16,9 @@ if [[ "${SETUP_JS_SDK_ASSETS:-}" == "1" ]]; then jq="$CONTAINER_ENGINE run --rm -i sentry-self-hosted-jq-local" - loader_registry=$($dcr --no-deps --rm -T web cat /usr/src/sentry/src/sentry/loader/_registry.json) - # The `loader_registry` should start with "Updating certificates...", we want to delete that and the subsequent ca-certificates related lines. + # Read the file with python3 rather than `cat`, which the sentry image may not have. + loader_registry=$($dcr --no-deps --rm -T web python3 -c 'import sys; print(open(sys.argv[1]).read())' /usr/src/sentry/src/sentry/loader/_registry.json) + # The `loader_registry` may start with "Updating certificates...", we want to delete that and the subsequent ca-certificates related lines. # We want to remove everything before the first '{'. loader_registry=$(echo "$loader_registry" | sed '0,/{/s/[^{]*//') From 719214c6fd80e5c591e448a5b91eed6f516b2aef Mon Sep 17 00:00:00 2001 From: Alexander Tarasov Date: Wed, 30 Sep 2026 11:11:20 +0200 Subject: [PATCH 2/3] ref(install): Simplify the registry read and drop the extra comment --- install/setup-js-sdk-assets.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/setup-js-sdk-assets.sh b/install/setup-js-sdk-assets.sh index 44c0f84407c..127a838218a 100644 --- a/install/setup-js-sdk-assets.sh +++ b/install/setup-js-sdk-assets.sh @@ -16,9 +16,8 @@ if [[ "${SETUP_JS_SDK_ASSETS:-}" == "1" ]]; then jq="$CONTAINER_ENGINE run --rm -i sentry-self-hosted-jq-local" - # Read the file with python3 rather than `cat`, which the sentry image may not have. - loader_registry=$($dcr --no-deps --rm -T web python3 -c 'import sys; print(open(sys.argv[1]).read())' /usr/src/sentry/src/sentry/loader/_registry.json) - # The `loader_registry` may start with "Updating certificates...", we want to delete that and the subsequent ca-certificates related lines. + loader_registry=$($dcr --no-deps --rm -T web python3 -c 'print(open("/usr/src/sentry/src/sentry/loader/_registry.json").read())') + # The `loader_registry` should start with "Updating certificates...", we want to delete that and the subsequent ca-certificates related lines. # We want to remove everything before the first '{'. loader_registry=$(echo "$loader_registry" | sed '0,/{/s/[^{]*//') From 9a85fccdd171e46f778cfe4476b9483f9a34d46f Mon Sep 17 00:00:00 2001 From: Alexander Tarasov Date: Wed, 30 Sep 2026 11:20:42 +0200 Subject: [PATCH 3/3] ref(install): Read the loader registry with json.tool --- install/setup-js-sdk-assets.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/setup-js-sdk-assets.sh b/install/setup-js-sdk-assets.sh index 127a838218a..f576e273c43 100644 --- a/install/setup-js-sdk-assets.sh +++ b/install/setup-js-sdk-assets.sh @@ -16,7 +16,7 @@ if [[ "${SETUP_JS_SDK_ASSETS:-}" == "1" ]]; then jq="$CONTAINER_ENGINE run --rm -i sentry-self-hosted-jq-local" - loader_registry=$($dcr --no-deps --rm -T web python3 -c 'print(open("/usr/src/sentry/src/sentry/loader/_registry.json").read())') + loader_registry=$($dcr --no-deps --rm -T web python3 -m json.tool /usr/src/sentry/src/sentry/loader/_registry.json) # The `loader_registry` should start with "Updating certificates...", we want to delete that and the subsequent ca-certificates related lines. # We want to remove everything before the first '{'. loader_registry=$(echo "$loader_registry" | sed '0,/{/s/[^{]*//')