From 806be6156e4a87c84b9f8e04b08ef4e430140b9b Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 10 Jul 2026 12:18:39 +0200 Subject: [PATCH 1/2] fix: Processing URL and namespace replacement --- .scripts/update_refs.sh | 2 +- demos/signal-processing/create-nifi-ingestion-job.yaml | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.scripts/update_refs.sh b/.scripts/update_refs.sh index 6b2f57b2..c17daf29 100755 --- a/.scripts/update_refs.sh +++ b/.scripts/update_refs.sh @@ -80,7 +80,7 @@ echo "$MESSAGE" # shellcheck disable=SC2016 # We intentionally don't want to expand the variable. find demos stacks -type f \ -exec grep --color=always -l githubusercontent {} \; \ - -exec sed -i -E 's#(stackabletech/demos)/main/#\1/\${UPDATE_BRANCH_REF}/#' {} \; \ + -exec sed -i -E 's#(stackabletech/demos)/(refs/heads/)?main/#\1/\${UPDATE_BRANCH_REF}/#' {} \; \ | prepend "\t" # Now, for all modified files, we can use envsubst diff --git a/demos/signal-processing/create-nifi-ingestion-job.yaml b/demos/signal-processing/create-nifi-ingestion-job.yaml index dd67cedf..e1666ba3 100644 --- a/demos/signal-processing/create-nifi-ingestion-job.yaml +++ b/demos/signal-processing/create-nifi-ingestion-job.yaml @@ -87,12 +87,13 @@ data: service_login(username=USERNAME, password=PASSWORD) print("Logged in") - # This file path needs adjustment for versioned demos on release branch - response = requests.get("https://raw.githubusercontent.com/stackabletech/demos/refs/heads/main/demos/signal-processing/DownloadAndWriteToDB.json") + # This URL must keep the "stackabletech/demos/main/" form (not "refs/heads/main") so that + # .scripts/update_refs.sh can rewrite it to the release branch at release time. + response = requests.get("https://raw.githubusercontent.com/stackabletech/demos/main/demos/signal-processing/DownloadAndWriteToDB.json") filename = "/tmp/DownloadAndWriteToDB.json" - with open(filename, "wb") as f: - f.write(response.content) + with open(filename, "w") as f: + f.write(response.text.replace("{{ NAMESPACE }}", os.environ["NAMESPACE"])) pg_id = get_root_pg_id() From 3486ffd850d7b54792e698a19f64ef795d0b4e4d Mon Sep 17 00:00:00 2001 From: Andrew Kenworthy Date: Fri, 10 Jul 2026 12:23:30 +0200 Subject: [PATCH 2/2] improved comment --- demos/signal-processing/create-nifi-ingestion-job.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/demos/signal-processing/create-nifi-ingestion-job.yaml b/demos/signal-processing/create-nifi-ingestion-job.yaml index e1666ba3..45d75ff1 100644 --- a/demos/signal-processing/create-nifi-ingestion-job.yaml +++ b/demos/signal-processing/create-nifi-ingestion-job.yaml @@ -87,8 +87,9 @@ data: service_login(username=USERNAME, password=PASSWORD) print("Logged in") - # This URL must keep the "stackabletech/demos/main/" form (not "refs/heads/main") so that - # .scripts/update_refs.sh can rewrite it to the release branch at release time. + # At release time, .scripts/update_refs.sh rewrites the branch in this URL to the release + # branch. Keep the URL in a form its regex matches, or release-branch installs will + # download this file from main (see the 26.3 regression). response = requests.get("https://raw.githubusercontent.com/stackabletech/demos/main/demos/signal-processing/DownloadAndWriteToDB.json") filename = "/tmp/DownloadAndWriteToDB.json"