From 0cb806bbafcdbd10e21b796ee25515f0a2619c49 Mon Sep 17 00:00:00 2001 From: Federico Maleh Date: Tue, 8 Sep 2026 17:20:39 -0300 Subject: [PATCH 1/2] fix(k8s): guard np_trace_flush when tracing SDK is not loaded --- CHANGELOG.md | 3 +++ .../tests/wait_deployment_active.bats | 19 +++++++++++++++++++ k8s/deployment/wait_deployment_active | 4 +++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 292cb498..9d6fdcab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.16.3] - 2026-09-08 +- Fix: k8s deployment logs no longer show a "np_trace_flush: command not found" error when tracing is disabled + ## [1.16.2] - 2026-09-08 - Fix: the scheduled-task worker image now runs the k8s scope with the scheduled_task overlay (`NP_OVERRIDES_PATH`), like the legacy channel does — it previously executed the overlay's partial workflows as the whole scope — and ships aws-cli, which the k8s scripts need from the assume_role step onwards - The publish pipeline now registers every scope image artifact with its release tag, so packages can resolve a worker image by tag (`lookup = true` + `meta.tag`) instead of copying digests around diff --git a/k8s/deployment/tests/wait_deployment_active.bats b/k8s/deployment/tests/wait_deployment_active.bats index 368c8ba8..a1d32547 100644 --- a/k8s/deployment/tests/wait_deployment_active.bats +++ b/k8s/deployment/tests/wait_deployment_active.bats @@ -992,3 +992,22 @@ JSON [ "${#capped}" -eq 140 ] case "$capped" in *"...") ;; *) return 1 ;; esac } + +# ============================================================================= +# Tracing SDK Absent +# ============================================================================= +@test "wait_deployment_active: reports readiness without np_trace_flush when the tracing SDK is not loaded" { + np_scope_progress() { :; } + np_scope_consumes() { :; } + np_scope_produces() { :; } + np_scope_affordance() { :; } + export -f np_scope_progress np_scope_consumes np_scope_produces np_scope_affordance + + export CONTEXT='{"asset":{"url":"registry.example.com/app:1.0.0","type":"docker-image"},"application":{"id":"app-789"},"scope":{"id":"scope-123"},"deployment":{"created_at":"2026-09-08T10:00:00Z"}}' + + run bash "$BATS_TEST_DIRNAME/../wait_deployment_active" + + [ "$status" -eq 0 ] + assert_contains "$output" "✅ All pods in deployment 'd-scope-123-deploy-456' are available and ready!" + [[ "$output" != *"np_trace_flush: command not found"* ]] +} diff --git a/k8s/deployment/wait_deployment_active b/k8s/deployment/wait_deployment_active index e2e3c839..98441b2f 100755 --- a/k8s/deployment/wait_deployment_active +++ b/k8s/deployment/wait_deployment_active @@ -369,7 +369,9 @@ while true; do np_scope_affordance "{\"kind\":\"deploy-log\",\"application_id\":\"$_wda_app_id\",\"scope_id\":\"$_wda_scope_id\",\"type\":\"application\"${_wda_start_ms:+,\"start_time\":$_wda_start_ms}}" fi - NP_TRACE_FLUSH_TIMEOUT=10 np_trace_flush + if command -v np_trace_flush >/dev/null 2>&1; then + NP_TRACE_FLUSH_TIMEOUT=10 np_trace_flush + fi fi break fi From 94c5f201c63eb715879b66d4df169976f9c7c3d1 Mon Sep 17 00:00:00 2001 From: Federico Maleh Date: Tue, 8 Sep 2026 17:31:50 -0300 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + k8s/specs/requirements/aws/main.tf | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d6fdcab..948ece76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [1.16.3] - 2026-09-08 +- Add: remove resource level restriction for `elasticloadbalancing:Describe*` permissions as AWS does not support it. - Fix: k8s deployment logs no longer show a "np_trace_flush: command not found" error when tracing is disabled ## [1.16.2] - 2026-09-08 diff --git a/k8s/specs/requirements/aws/main.tf b/k8s/specs/requirements/aws/main.tf index 5917ba36..0f0c5ac0 100644 --- a/k8s/specs/requirements/aws/main.tf +++ b/k8s/specs/requirements/aws/main.tf @@ -100,11 +100,6 @@ resource "aws_iam_policy" "nullplatform_elb_policy" { "Version" : "2012-10-17", "Statement" : [ { - # DescribeListeners/DescribeRules/DescribeTargetHealth don't support - # resource-level permissions (AWS's own managed policy - # AmazonECSInfrastructureRolePolicyForLoadBalancers uses Resource: "*" - # for these too), so scoping them to an ARN pattern silently never - # matches and the calls get denied. "Effect" : "Allow", "Action" : [ "elasticloadbalancing:DescribeLoadBalancers",