What's broken?
The smoke test script fails due to a missing function named track_smoketest_completed() in tracker.sh.
However, the function is available in tracker-legacy.sh
A workaround is to add the function from tracker-legacy.sh to tracker.sh, afterwards the smoke test runs successfully.
If the workaround is the solution I would like to contribute or get guidance for a cleaner solution.
Steps to reproduce
- Open codespace for adventure 01 - Beginner
- Solve the task by overwriting
adventures/01-echoes-lost-in-orbit/beginner/manifests/appset.yaml with
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: echo-server
namespace: argocd
spec:
generators:
- git:
repoURL: https://github.com/off-on-dev/open-source-challenges.git
revision: HEAD
directories:
- path: adventures/01-echoes-lost-in-orbit/beginner/manifests/overlays/*
template:
metadata:
name: echo-server-{{path.basename}}
labels:
app.kubernetes.io/managed-by: argocd
spec:
project: default
source:
repoURL: https://github.com/off-on-dev/open-source-challenges.git
targetRevision: HEAD
path: adventures/01-echoes-lost-in-orbit/beginner/manifests/overlays/{{path.basename}}
destination:
server: https://kubernetes.default.svc
namespace: echo-{{path.basename}}
syncPolicy:
automated:
selfHeal: true
prune: true
syncOptions:
- CreateNamespace=true
- Apply the solution
kubectl apply -n argocd -f adventures/01-echoes-lost-in-orbit/beginner/manifests/appset.yaml
- Execute smoke test:
adventures/01-echoes-lost-in-orbit/beginner/smoke-test.sh
Full output:
╔════════════════════════════════════════════════════════════╗
║ ║
║ Challenge 01: Echoes Lost in Orbit ║
║ Level 1: Broken Echoes ║
║ Smoke Test Verification ║
║ ║
╚════════════════════════════════════════════════════════════╝
Checking prerequisites...
✓ All prerequisites met
Running smoke tests...
🔬 Checking Staging Environment
✓ Namespace 'echo-staging' exists
✓ Service echo-server-staging in 'echo-staging' exists
⏳ HTTP GET http://localhost:8081/healthz...
✓ App is reachable at http://localhost:8081/healthz and returned expected content
✅ Staging is healthy!
🔬 Checking Production Environment
✓ Namespace 'echo-prod' exists
✓ Service echo-server-prod in 'echo-prod' exists
⏳ HTTP GET http://localhost:8082/healthz...
✓ App is reachable at http://localhost:8082/healthz and returned expected content
✅ Production is healthy!
╔════════════════════════════════════════════════════════════╗
║ ║
║ Test Results Summary ║
║ ║
╚════════════════════════════════════════════════════════════╝
/workspaces/open-source-challenges/lib/scripts/output.sh: line 100: track_smoketest_completed: command not found
Error:
/workspaces/open-source-challenges/lib/scripts/output.sh: line 100: track_smoketest_completed: command not found
Expected behavior
The script should pass and print a success message
Where?
What's broken?
The smoke test script fails due to a missing function named
track_smoketest_completed()in tracker.sh.However, the function is available in
tracker-legacy.shA workaround is to add the function from
tracker-legacy.shtotracker.sh, afterwards the smoke test runs successfully.If the workaround is the solution I would like to contribute or get guidance for a cleaner solution.
Steps to reproduce
adventures/01-echoes-lost-in-orbit/beginner/manifests/appset.yamlwithkubectl apply -n argocd -f adventures/01-echoes-lost-in-orbit/beginner/manifests/appset.yamladventures/01-echoes-lost-in-orbit/beginner/smoke-test.shFull output:
╔════════════════════════════════════════════════════════════╗
║ ║
║ Challenge 01: Echoes Lost in Orbit ║
║ Level 1: Broken Echoes ║
║ Smoke Test Verification ║
║ ║
╚════════════════════════════════════════════════════════════╝
Checking prerequisites...
✓ All prerequisites met
Running smoke tests...
🔬 Checking Staging Environment
✓ Namespace 'echo-staging' exists
✓ Service echo-server-staging in 'echo-staging' exists
⏳ HTTP GET http://localhost:8081/healthz...
✓ App is reachable at http://localhost:8081/healthz and returned expected content
✅ Staging is healthy!
🔬 Checking Production Environment
✓ Namespace 'echo-prod' exists
✓ Service echo-server-prod in 'echo-prod' exists
⏳ HTTP GET http://localhost:8082/healthz...
✓ App is reachable at http://localhost:8082/healthz and returned expected content
✅ Production is healthy!
╔════════════════════════════════════════════════════════════╗
║ ║
║ Test Results Summary ║
║ ║
╚════════════════════════════════════════════════════════════╝
/workspaces/open-source-challenges/lib/scripts/output.sh: line 100: track_smoketest_completed: command not found
Error:
/workspaces/open-source-challenges/lib/scripts/output.sh: line 100: track_smoketest_completed: command not foundExpected behavior
The script should pass and print a success message
Where?