Repository navigation
infra: build, test and publish the dashboard image - #30
Merged
Merged
Conversation
devinder-dev
approved these changes
Nov 3, 2026
devinder-dev
left a comment
Owner
There was a problem hiding this comment.
Approved. I checked it against the CI run and the files, not only the description:
- Run on
7813a72:dashboard-testran all 35 Playwright tests (35 passed, 24.9 s), anddashboard-imageprintedthe image serves /index.html and /assets/index-BimGaWWm.js. - The new
setup-nodepin949feb2is the v7.1.0 tag. The other pins are the same as in the API jobs. - Asking for the bundle is the right check:
location /falls back toindex.html,location /assets/has no fallback. scope=dashboardkeeps the two build caches apart, anddeploynow waits for both images.
Small things, none of them blocking (fine as a follow-up):
- GitHub runs
bash -eo pipefail. Ifindex.htmlnames no bundle,grepexits 1 insideasset=$(…)and the step stops right there, so::error::index.html names no built bundlenever prints. The job still fails; only the message is lost. Ending the pipeline with|| truelets your own check run. - The comment at the top of
pipeline.ymlstill says every PR tests "the API"; it could mention the dashboard now. - On a smoke failure,
docker logs smoke-dashwould show why nginx didn't start.
After the merge, relay-dashboard needs to be made public (decision 0004) and pulled once anonymously before #24 uses it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two jobs, so the dashboard gets the same lane in the pipeline the API already has:
dashboard-testruns the 35 Playwright tests that until now only ever ran on my laptop.dashboard-imagebuildsrelay-dashboard, smoke-tests it, and pushes it on main only.deploywaits for both image jobs: every image a commit's manifests ask for has to be onGHCR before the server is told to pull them.
Why the smoke test checks two things, not one
A status check on
/index.htmllooks sufficient and is not.nginx.confhands everyunknown path to
index.html(it has to, or/deliverieswould 404 on reload), so thatrequest answers 200 almost no matter what is in the image.
I built a deliberately broken image — the real one with
assets/deleted — to see whichcheck catches it:
location /assets/hastry_files $uri =404and no fallback, so the bundle thatindex.htmlnames is the request that proves the build is really inside the image. Thestep reads that path out of
index.htmlrather than hardcoding it, because the filenameis content-hashed and changes on every build.
Run against the real image the step exits 0; against the broken one it exits 1 with
::error::/assets/index-BimGaWWm.js answered 404: the build is not in the image.Details worth a second look
cache-from: type=gha,scope=dashboard. The scope defaults tobuildkitforeveryone, and Docker's docs are explicit: build two images without it and each
overwrites the other's cache. The API keeps the default, so the two no longer collide.
Naming the API's scope
apiwould be tidier but means touching your job, so I left it.npm ci, Node fromdashboard/.nvmrc. The dashboard is npm and Node 24, not Bun.npm installwould be free to resolve versionspackage-lock.jsonnever pinned.npx playwright install --with-deps chromium. The runner has no browser. Withoutthis line the job fails on its first run with "browser not found".
curl -fs, not-fsS, inside the wait loop. A refused connection while nginxstarts is expected, and printing it would make a green run look broken.
%{http_code}by hand.curl -sexits 0 on a 404, soset -edoes notcatch it.
One request, and one ordering note
Please add
dashboard-testas a required check on main. A green job stops nobody frommerging; only branch protection does, and only you can change it.
The comment in
dashboard-testnames decision 0005, which is still open as #23. Mergingthat first keeps the reference from dangling.
How it was checked
npm ci,npm run lint,npm run build,npm run test:e2elocally: 35 passed in 19.5 s./index.html200,/deliveries200 (fallback), uid 101.broken image, with the results above.
pipeline.ymlparses, anddeployreally lists all three jobs inneeds.Not in this PR
k8s/app/dashboard.yaml— infra: add the dashboard manifests for cdn.myrelay.tech #24, which goes out of draft once this is merged and the firstrelay-dashboardimage is on GHCR.githubreporter annotates failing tests on the PR, which is enough until a red test is hard to read.