Repository navigation
Conversation
stack_template.deploy_count was 0 for every template on /api/templates and the storefront: the counter is only incremented by the marketplace deploy-complete hooks, which never fire from the web pipeline (the stack_template_deployment event table is empty and the counter untouched), while real deployments are recorded as project rows with source_template_id. Compute deploy_count as GREATEST of the stored counter, the number of project records with source_template_id, and the number of verified stack_template_deployment events. Existing deployments are counted immediately and future ones keep counting even when a hook is missed. The 'popular' sort now orders by the derived value instead of the stale counter. All queries are runtime query_as, so no .sqlx data changes.
fix(marketplace): derive template deploy_count from deployment records
The Quick Start advertised stacker.try.direct/install.sh, which returns HTTP 403 with a zero-byte body, so the documented one-liner could never install anything. Use the installer that returns 200: https://raw.githubusercontent.com/trydirect/stacker/main/install.sh Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
install.sh and scripts/install.sh both opened with
curl -fsSL https://get.stacker.dev/install.sh | bash
get.stacker.dev does not resolve at all - curl returns 000, not even a
refusal. These two lines are the first thing a careful person reads before
piping a script into bash, and our audience is exactly the kind that reads
first. They now point at the URL that actually serves this file:
https://raw.githubusercontent.com/trydirect/stacker/main/install.sh
verified 200, 5998 bytes, and its sha256 matches this repository's root
install.sh exactly.
Comments only - bash -n passes on both files and the executable bit is
unchanged.
Noted while here, not fixed: scripts/install.sh is a DIVERGED copy of the
root install.sh, 37 lines shorter, missing write_user_config among other
things. The raw URL serves the root one. Two installers that differ is a
trap; one of them should become a symlink or go away, which is a decision
rather than a typo fix.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
brew install trydirect/tap/stacker needs no new build work: release.yml already publishes three tarballs on every release and each holds one binary named stacker. What is missing is the tap repository, which does not exist - the GitHub API returns 404 for trydirect/homebrew-tap. homebrew-core is not an option yet: it applies a notability bar of roughly tens of forks and watchers, and this repository has 7 stars, 2 forks and 2 watchers. A tap has no such bar. The formula in the runbook carries real values - the v0.3.5 asset URLs and the sha256 of each, computed by downloading them on 2026-11-12. Two blockers are written down rather than fixed, because both are decisions: - the v0.3.5 binary reports 0.3.4, so Cargo.toml was bumped after the tag was cut; a formula declaring 0.3.5 next to a binary saying 0.3.4 fails the sniff test - there is no aarch64-unknown-linux-gnu build, so brew and the curl installer both fail on arm64 Linux, which is now the cheap default at several VPS providers and exactly where our self-hosting audience is Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two problems, one cause. The published v0.3.5 Linux binary requires GLIBC_2.39 - read off the asset itself. Ubuntu 22.04 ships glibc 2.35 and Debian 12 ships 2.36, so that binary refuses to start on both. Those are the two distributions a self-hosting audience is most likely to be running, which makes this worse than a missing architecture: we have been shipping a Linux binary that a large part of our audience cannot execute at all. The cause is ubuntu-latest in the matrix drifting to Ubuntu 26.04 - a release binary inherits the build image's glibc. Pinned to ubuntu-22.04, which sets the floor at 2.35 and keeps every newer distribution working. And there was no arm64 Linux build at all, while arm64 instances are now the cheap default at several VPS providers. Added as a native ubuntu-22.04-arm runner rather than a cross-compile: the existing protoc step, the toolchain action and the cache keys all work unchanged that way. The installer needs no change - install.sh:73 already builds the archive name from uname -m and maps aarch64/arm64 to aarch64, so the new asset is picked up as soon as it exists. Unverified until the next release runs: that the ubuntu-22.04-arm label is available to this repository. If it is not, the fallback is ubuntu-24.04-arm, which raises the arm64 glibc floor to 2.39. docs/HOMEBREW_TAP.md updated to match: the Linux arm64 block in the formula stays commented out until an asset exists, and the glibc rule is written down so ubuntu-latest does not come back. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… deploy Walked the n8n quickstart end to end on a fresh Hetzner server with stacker-cli v0.3.6, from a clean clone of awesome-selfhosted-stacker. Three findings, evidence quoted in each entry. Host addresses and local key paths are redacted - this repository is public. #20 promoted to CONFIRMED. The deployment ended paused [port_conflict] on a server the same run had just created, so nothing could have held the port first. The stack was serving: the app port answers 200, the HTML carries n8n's own config marker and the readiness endpoint returns 200. The port is held by this deploy's own healthy container, which is what the preflight reports as a conflict. That removes the last innocent reading of the three earlier occurrences. #24, new. stacker status, run in that project directory immediately afterwards, reported a completed deployment from 30 July on a different server and a different project id. It is the first command in SKILL.md's verification checklist and the one the deploy itself suggests, so following that advice after a failed deploy returns a green completed from months ago. #25, new. The same run printed that the SSH key was authorized and saved a backup key. Neither authenticates, while the host is up and serving. AGENTS.md treats that line as the gate for testing SSH, which makes the gate useless and leaves nobody able to investigate or clean up the machine. The one inference not verified in code - that status resolves by project.identity - is marked as a guess. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The CLI-16 and CLI-17 video scripts already cite section 24 as the redactor bug. My entries from this morning had taken that number, so they move down and 24 is written up properly. 24, new: the secret redactor masks any key whose name contains the substring "secret". marketplace.no_secrets_confirmation is a boolean flag and comes back as the string ***REDACTED***, so the served template no longer parses. Read straight off the public template API, not inferred. This is the root cause behind gate 2 of the CLI-16 script - the reason that video cannot be filmed as a real run - and the same response shows the n8n template fix merged in awesome-selfhosted-stacker has not reached what the API serves. 25 was 24: stacker status reports a months-old deployment from another server. 26 was 25: the deploy says the SSH key is authorized and neither key opens. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`is_sensitive_env_key` matches by substring, so any key containing "secret"
is redacted. `marketplace.no_secrets_confirmation` is a boolean flag whose
name contains it, and the redactor replaced `true` with the string
`***REDACTED***`.
Read off the public template API today:
no_secrets_confirmation -> ***REDACTED***
That is served by routes/marketplace/public.rs and written to disk by
`stacker install`, so the generated stacker.yml no longer parses as the
schema expects. A first-time user installs a template, runs the deploy
command the CLI itself printed, and it refuses. Logged as BUGS.md 24 and it
is gate 2 of the CLI-16 video script, the reason that video cannot be filmed
as a real run.
A boolean carries no secret material, and masking it changes the value's
type, which is the actual damage. Three conditions, one per redaction path:
the JSON key/value entry form, the JSON direct-key form, and the YAML
mapping. The YAML `VAR=value` sequence form only ever sees strings and is
untouched. Substring matching itself is left alone - narrowing it is a
bigger change than this bug needs.
Numbers are deliberately still redacted: a numeric token is conceivable, a
boolean secret is not.
Two regression tests, one per format, written first and confirmed failing
against the previous code. Full lib suite: 2313 passed, 0 failed. clippy
reports nothing on this file.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The fix is in 0bfd3c0. Records what was changed, what was deliberately left alone (substring matching, and redaction of numbers), and that the deployed API has not been re-checked yet - that needs the change to ship first. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
None of these stop a deploy, so they go here rather than into a fix. 27: `stacker install --domain` is accepted and discarded - `--region` and `--size` land in the written file, `commonDomain` keeps the template default. `--key` is ignored at install and honoured at deploy. A flag the CLI accepts and drops is worse than one it rejects. 28: install printed project #818 and the deploy that followed resolved id=817, in one unbroken run. Unexplained; distinct from 25, which explains a stale resolution rather than two ids inside one run. 29: `stacker agent install` refuses when `deploy.server.host` is empty, which is its normal state right after a cloud deploy created the server. It is the step the deploy itself suggests next, and continuing needs a hand edit of the file the tool generates. 30: the marketplace serves a template older than the repository - the n8n fix merged on `main` earlier the same day is still absent from the API, so `stacker install` keeps writing the broken SSH key path that fix removed. Also replaces the guess in 25 with the mechanism observed in the run: the deploy renames the project to the `stacker.yml` name, colliding with an older project of that name, and status then resolves to the older one. Evidence for all of these is the CLI-16 capture set in the blog repo; no addresses or local paths are reproduced here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`stacker agent deploy-app <app> --image <ref> --force` recreated the container without its published ports: `5678:5678` became `PORTS: -` and the app stopped answering. A one-command update that takes the app down is the opposite of what the command is for, and it is the blocker on the CLI-17 video script. The request carried no compose at all. `local_config_files_for_agent_deploy` returns early when no environment resolves, and a template-based project resolves none: it declares no `deploy.environment` and no `environments:` block. Without `compose_content`, `--image` is all the agent has, so it recreates the container from the image alone and every port, volume and network from the compose is gone. The compose describing the running stack is sitting in `.stacker/` the whole time - the deploy that created the stack generated it there. When no environment resolves, send it. One branch, nine lines. Projects that do resolve an environment are untouched, and so is every other early return: no stacker.yml, no compose file configured, configured file missing. Regression test written first and confirmed failing against the previous code, with the n8n template's exact shape. Full lib suite: 2314 passed, 0 failed. The one clippy warning in the file is at line 2470, outside both hunks. Two earlier attempts at this fix were wrong and are not in the diff: the missing-`compose_file` branch and the missing-file branch are both unreachable here, because `resolve_environment_config` always supplies a conventional `docker/<env>/compose.yml` and the function bails on the environment first. Instrumented the early returns rather than keep guessing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The fix is in 3de52ed. Records the cause, the fix, and the two wrong diagnoses that read as correct from the source - both unreachable, because resolve_environment_config always supplies a conventional compose path and the function bails on the environment before it ever looks. Also records what the regression test does not cover: a live update on a running stack, which needs the fix shipped and a server. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 code fixes that unblock the CLI video scripts, the day's BUGS.md
findings, and the release-CI pin. Both fixes ship with regression tests
written first and confirmed failing against the previous code.
The fixes
fix(redact)0bfd3c0 — never mask a boolean.is_sensitive_env_keymatches by substring, so
marketplace.no_secrets_confirmation- a flag whosename contains "secret" - came back from the public template API as the string
***REDACTED***. That is whatstacker installwrites to disk, so thegenerated
stacker.ymlstopped parsing and the deploy the CLI itselfsuggests refused to run. Booleans are now left alone in all three redaction
paths. Numbers are still redacted on purpose: a numeric token is conceivable,
a boolean secret is not. BUGS.md 24.
fix(agent)3de52ed —deploy-appkept the container's ports.stacker agent deploy-app <app> --image <ref> --forcerecreated thecontainer with
PORTS: -where it had been5678:5678, and the app stoppedanswering. The request carried no compose at all: the local-config helper
returns early when no environment resolves, and a template-based project
resolves none. With only
--image, the agent rebuilds from the bare imageand every port, volume and network from the compose is gone. It now sends the
compose the deploy generated into
.stacker/. One branch. BUGS.md 31.Also in this range
from a live run. Addresses and local paths are redacted - this repo is
public.
ci(release)261134f: Linux runners pinned to ubuntu-22.04 and an arm64build added. Already on
mainvia Release prep 0.3.6: pin the Linux build runners, bump the version #334; it appears here as a duplicate andgit will collapse it.
stacker.try.direct/install.sh(403) andget.stacker.dev(does not resolve); both now point at the file that isactually served.
docs/HOMEBREW_TAP.md: the runbook for the tap, which now exists andserves
brew install trydirect/tap/stackeron macOS and Linux.Not mine, flagging it: 661d34d
fix(marketplace): derive template deploy_count from deployment recordsand its merge 0af81d0 came in through#330 and are in this range. If they are not meant to ship yet, this PR is the
wrong vehicle.
Verification
Full lib suite on the tip: 2314 passed, 0 failed, 6 ignored. clippy reports
nothing on either changed file.
Merging builds and pushes the image; it does not update the running
container. Two checks are worth running once it is live:
should be 0, and one
stacker agent deploy-appagainst a running stackshould leave the published port answering. Neither is covered by the tests -
they exercise the request the CLI builds, not the deployed service.
🤖 Generated with Claude Code