Field notes from a real deploy: stale :latest redeploys, full-URL imports, runner caveats#2
Closed
schlunsen wants to merge 1 commit into
Closed
Field notes from a real deploy: stale :latest redeploys, full-URL imports, runner caveats#2schlunsen wants to merge 1 commit into
schlunsen wants to merge 1 commit into
Conversation
…ll-URL imports, runner caveats
- Warn that redeploys don't repull an unchanged :latest tag (k3s containerd
tag cache); document the commit-SHA pin + re-import + redeploy flow
- Prefer full Gitea URL for definition imports: short org/repo form can fail
with a misleading 'No n0-app.json found' (seen on prod app.nzero.pro)
- Mark the 'Import into k3s' CI step as conditional: containerized runners
have no k3s binary and fail with exit 127
- Add troubleshooting rows: stale-version-after-redeploy, short-form import
error, and Actions runs misreported as failed after the job succeeded
- Document minting a Gitea token via POST /workspaces/{ws}/gitea/token/
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Documents production deployment lessons for the downhill-havoc app in the lunarrails workspace, focusing on reliable redeploy behavior, definition import quirks, and runner limitations in CI so future deployments avoid the same failure modes.
Changes:
- Adds guidance on
:latestredeploy staleness and a “pin to commit-SHA tag → re-import → redeploy” workflow. - Updates definition import guidance to prefer full Gitea URLs and documents re-import updating in place.
- Clarifies CI runner limitations around
k3s ctr images importand expands troubleshooting guidance (including token minting via API).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1518
to
+1521
| 1. Push code → CI builds and pushes both `:latest` and `:{commit-sha}` tags | ||
| 2. Pin the image in `n0-app.json` to the full commit-SHA tag | ||
| (`localhost:5000/org/repo:<sha>`) and push | ||
| 3. Re-import the definition (`POST .../apps/definitions/` with the full repo URL) |
Comment on lines
+1477
to
+1482
| **Prefer the full URL.** On some deployments (observed on prod `app.nzero.pro`) the | ||
| short form fails with a misleading `No n0-app.json found in org/repo` error even when | ||
| the manifest is present on the default branch; the full-URL form works immediately. | ||
|
|
||
| Re-run this same call after changing `n0-app.json` (e.g. bumping a pinned image tag) — | ||
| it updates the existing AppDefinition in place (`"created": false` in the response). |
schlunsen
added a commit
that referenced
this pull request
Jul 4, 2026
* Make Gitea + deploy flow HTTPS-only via single N0 PAT (sandbox-safe)
Adds an Authentication section documenting the one-token flow: use a N0
Personal Access Token (Bearer) for all n0 API calls, and mint the Gitea
token via POST /workspaces/<id>/gitea/token/ instead of web UI, admin SSH,
or email/password login. Enforces HTTPS git remotes and forbids SSH so the
skill runs inside the Claude Desktop / Claude Code sandbox.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Field notes from downhill-havoc deploy: stale :latest on redeploy, full-URL imports, runner caveats
- Warn that redeploys don't repull an unchanged :latest tag (k3s containerd
tag cache); document the commit-SHA pin + re-import + redeploy flow
- Prefer full Gitea URL for definition imports: short org/repo form can fail
with a misleading 'No n0-app.json found' (seen on prod app.nzero.pro)
- Mark the 'Import into k3s' CI step as conditional: containerized runners
have no k3s binary and fail with exit 127
- Add troubleshooting rows: stale-version-after-redeploy, short-form import
error, and Actions runs misreported as failed after the job succeeded
- Document minting a Gitea token via POST /workspaces/{ws}/gitea/token/
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
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.
Lessons learned deploying
downhill-havocto the lunarrails workspace on prod (app.nzero.pro), 2026-07-02. All items were hit in practice and verified.Changes
:latestimage reference serves the old build (k3s containerd caches the tag; the{"tag": ...}redeploy body is ignored). Documents the reliable flow: pin the manifest image to the commit-SHA tag → re-import definition → redeploy. Also documentsPUT .../apps/{id}/accessfor temporarily flipping an app public to verify deployed content (takes effect after redeploy).repo_url. The shortorg/repoform failed on prod with a misleadingNo n0-app.json foundeven though the manifest was on the default branch; the full URL worked immediately. Also notes re-import updates the definition in place.docker save | k3s ctr images importstep is now marked conditional — the lunarrails runner is containerized and has nok3sbinary, so the step fails with exit 127.POST /workspaces/{ws}/gitea/token/with the platform token.🤖 Generated with Claude Code