From 0af77137dc17d3bb66e108fda24150760066977d Mon Sep 17 00:00:00 2001 From: Casey Brooks Date: Mon, 25 May 2026 16:08:33 +0000 Subject: [PATCH 1/5] fix(e2e): patch apps deployment --- devspace.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devspace.yaml b/devspace.yaml index 29db3bf..0de9208 100644 --- a/devspace.yaml +++ b/devspace.yaml @@ -26,7 +26,7 @@ functions: fi patch_deployment: |- echo "Patching apps deployment for DevSpace..." - kubectl patch deployment apps-apps -n ${APPS_NAMESPACE} --type strategic --patch "$(cat <<'EOF' + kubectl patch deployment apps -n ${APPS_NAMESPACE} --type strategic --patch "$(cat <<'EOF' spec: template: spec: From 5f5f1b3a0da2a38aa9b02fe1a006d7e84fa4449f Mon Sep 17 00:00:00 2001 From: Casey Brooks Date: Mon, 25 May 2026 16:51:41 +0000 Subject: [PATCH 2/5] fix(e2e): expose go in devspace --- devspace.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devspace.yaml b/devspace.yaml index 0de9208..7fcd45b 100644 --- a/devspace.yaml +++ b/devspace.yaml @@ -41,6 +41,9 @@ functions: - name: apps image: ghcr.io/agynio/devcontainer-go:1 # dev container for source deploy workingDir: /opt/app/data + env: + - name: PATH + value: /go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin command: - sh - -c From 94bf2bc084fe6bb53006d1fe6406d9ad9759b869 Mon Sep 17 00:00:00 2001 From: Casey Brooks Date: Mon, 25 May 2026 17:34:59 +0000 Subject: [PATCH 3/5] fix(e2e): keep dev pod alive during sync --- devspace.yaml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/devspace.yaml b/devspace.yaml index 7fcd45b..0f060cc 100644 --- a/devspace.yaml +++ b/devspace.yaml @@ -70,6 +70,24 @@ functions: limits: cpu: "2" memory: 4Gi + livenessProbe: + tcpSocket: null + exec: + command: + - sh + - -c + - "true" + initialDelaySeconds: 1 + periodSeconds: 10 + readinessProbe: + tcpSocket: null + exec: + command: + - sh + - -c + - "true" + initialDelaySeconds: 1 + periodSeconds: 10 securityContext: runAsNonRoot: true runAsUser: 1000 @@ -98,7 +116,7 @@ pipelines: start_dev --disable-pod-replace apps echo "Waiting for apps to be healthy on :50051..." healthy=false - for i in $(seq 1 60); do + for i in $(seq 1 150); do if exec_container --label-selector=app.kubernetes.io/name=apps -n ${APPS_NAMESPACE} -- bash -c 'nc -z localhost 50051 >/dev/null 2>&1 || (echo > /dev/tcp/localhost/50051) >/dev/null 2>&1'; then healthy=true break @@ -106,7 +124,7 @@ pipelines: sleep 2 done if [ "$healthy" != "true" ]; then - echo "ERROR: Apps did not become healthy within 120s" >&2 + echo "ERROR: Apps did not become healthy within 300s" >&2 exit 1 fi echo "Dev environment ready. Stopping dev session." From f73b5c3c1ccd0cbe395563ae462a6edb761af333 Mon Sep 17 00:00:00 2001 From: Casey Brooks Date: Mon, 25 May 2026 17:50:16 +0000 Subject: [PATCH 4/5] fix(e2e): start app after source sync --- devspace.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/devspace.yaml b/devspace.yaml index 0f060cc..b99b657 100644 --- a/devspace.yaml +++ b/devspace.yaml @@ -48,18 +48,7 @@ functions: - sh - -c - | - set -eu - elapsed=0 - while [ ! -f /opt/app/data/go.mod ]; do - sleep 1; elapsed=$((elapsed + 1)) - [ "$elapsed" -ge 120 ] && { echo "ERROR: sync timeout" >&2; exit 1; } - done - buf generate buf.build/agynio/api \ - --path agynio/api/apps/v1 \ - --path agynio/api/authorization/v1 \ - --path agynio/api/identity/v1 \ - --path agynio/api/ziti_management/v1 - exec go run ./cmd/apps-service + sleep infinity volumeMounts: - name: data mountPath: /opt/app/data @@ -114,6 +103,16 @@ pipelines: start_dev --disable-pod-replace apps else start_dev --disable-pod-replace apps + echo "Starting apps service from synced source..." + exec_container --label-selector=app.kubernetes.io/name=apps -n ${APPS_NAMESPACE} -- bash -lc 'set -euo pipefail + cd /opt/app/data + buf generate buf.build/agynio/api \ + --path agynio/api/apps/v1 \ + --path agynio/api/authorization/v1 \ + --path agynio/api/identity/v1 \ + --path agynio/api/ziti_management/v1 + nohup go run ./cmd/apps-service >/tmp/apps-service.log 2>&1 & + ' echo "Waiting for apps to be healthy on :50051..." healthy=false for i in $(seq 1 150); do @@ -124,6 +123,7 @@ pipelines: sleep 2 done if [ "$healthy" != "true" ]; then + exec_container --label-selector=app.kubernetes.io/name=apps -n ${APPS_NAMESPACE} -- bash -lc 'cat /tmp/apps-service.log >&2' || true echo "ERROR: Apps did not become healthy within 300s" >&2 exit 1 fi From 2d7cf0143632d83a7a46cf6c920e434d1282622d Mon Sep 17 00:00:00 2001 From: Casey Brooks Date: Mon, 25 May 2026 18:11:02 +0000 Subject: [PATCH 5/5] fix(e2e): use resolved go binary --- devspace.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/devspace.yaml b/devspace.yaml index b99b657..de7d6fe 100644 --- a/devspace.yaml +++ b/devspace.yaml @@ -105,13 +105,29 @@ pipelines: start_dev --disable-pod-replace apps echo "Starting apps service from synced source..." exec_container --label-selector=app.kubernetes.io/name=apps -n ${APPS_NAMESPACE} -- bash -lc 'set -euo pipefail + echo "PATH=${PATH}" + if [ -x /usr/local/go/bin/go ]; then + GO_BIN=/usr/local/go/bin/go + elif [ -x /root/.nix-profile/bin/go ]; then + GO_BIN=/root/.nix-profile/bin/go + elif [ -x /home/godev/.nix-profile/bin/go ]; then + GO_BIN=/home/godev/.nix-profile/bin/go + elif command -v go >/dev/null 2>&1; then + GO_BIN=$(command -v go) + else + echo "ERROR: go binary not found" >&2 + find /usr/local /root /home /go -path "*/bin/go" -type f 2>/dev/null >&2 || true + exit 1 + fi + echo "Using go: ${GO_BIN}" + "${GO_BIN}" version cd /opt/app/data buf generate buf.build/agynio/api \ --path agynio/api/apps/v1 \ --path agynio/api/authorization/v1 \ --path agynio/api/identity/v1 \ --path agynio/api/ziti_management/v1 - nohup go run ./cmd/apps-service >/tmp/apps-service.log 2>&1 & + nohup "${GO_BIN}" run ./cmd/apps-service >/tmp/apps-service.log 2>&1 & ' echo "Waiting for apps to be healthy on :50051..." healthy=false