Repository navigation
fix: download head builds with ddev utility download-ddev, for #58 - #65
Conversation
davereid
left a comment
There was a problem hiding this comment.
praise: Thanks, rfay. Looking up the build through the GitHub API with the workflow token gets around the nightly.link failures, and both head jobs in run 44979911977 downloaded from GitHub without falling back. Moving the inputs into env: also closes a script injection.
suggestion (non-blocking): The version input's description in action.yml still says only "Example: 1.24.0". Could it mention latest and head, as the README now does? The Marketplace and editors show that description.
suggestion (non-blocking): For head, the test in .github/workflows/main.yml only checks that the version isn't v1.24.8, so it would still pass if the replace step were skipped. Checking for the -g<sha> suffix would catch that. It could fail on the rare day main sits exactly on a release tag, so a follow-up is fine.
Drafted with Claude Code using project-triage. I had the PR checked against DDEV's source and the PR's CI logs, chose which findings to raise, and reviewed the final text.
stasadev
left a comment
There was a problem hiding this comment.
Works for me, two small things, neither blocking.
- +1 to davereid's suggestions. The
versiondescription inaction.ymlcould mentionlatestandhead. And theheadtest could check the-g<sha>suffix, so it fails if the replace step is skipped:
elif [[ ${{ matrix.version }} == 'head' ]]; then
[[ "$(ddev --version)" =~ -g[0-9a-f]+$ ]]- See the inline comment about the
tokeninput.
Claude Code ran stable v1.25.6 ddev utility download-ddev --head with no token, a valid token and an invalid token. All three downloaded the main build, the invalid token with a fallback to nightly.link.
🤖 Reviewed with assistance from Claude Code
| required: true | ||
| default: 'https://ddev.com/install.sh' | ||
|
|
||
| token: |
There was a problem hiding this comment.
Do we need this as an input? The step could set DDEV_GITHUB_TOKEN: ${{ github.token }} directly. The input only helps someone who wants to pass a PAT or blank the token, and it's one more input to support.
## Short Summary (TL;DR) `version: head` now installs stable DDEV, then replaces it with the `main` build that `ddev utility download-ddev --head` downloads from GitHub. Before, every `head` install depended on nightly.link, which fails intermittently. ## The Issue - For #58 The `head` jobs in this repository's nightly tests fail every few weeks in the "Install DDEV" step. `install_ddev_head.sh` downloads `https://nightly.link/ddev/ddev/workflows/main-build/main/ddev-linux-amd64.zip`, and nightly.link returned an HTTP 404 or 500 while the artifact existed on GitHub: | Date | Run | Error | | --- | --- | --- | | 2026-11-22 | [44964784133](https://github.com/ddev/github-action-setup-ddev/actions/runs/44964784133) | 500 on two attempts, 2 hours apart | | 2026-10-02 | [36945282755](https://github.com/ddev/github-action-setup-ddev/actions/runs/36945282755) | 404 on amd64 only, arm64 passed | | 2026-09-28 | [36361796895](https://github.com/ddev/github-action-setup-ddev/actions/runs/36361796895) | 404 | | 2026-09-23 | [35801261825](https://github.com/ddev/github-action-setup-ddev/actions/runs/35801261825) | 404 | The same problem affects users who test against `head`. `install_ddev_head.sh` has no retry and no other source. ## How This PR Solves The Issue - For `head`, the action runs the normal install script, which installs the latest stable release. Since v1.25.4, stable includes `ddev utility download-ddev`. - A new step runs `ddev utility download-ddev --head`. It finds the latest successful `main-build` run through the GitHub API, and downloads the artifact from GitHub. It uses nightly.link only when that fails. - The step overwrites the stable `ddev` and `ddev-hostname` in place, so the two binaries always match. - A new `token` input defaults to `${{ github.token }}`, so users don't have to set anything. Without a token, `download-ddev` uses nightly.link to download. - `ddev config global` moves to its own step after the replacement, so it runs on the final binary. - `head` no longer swaps the install script for `install_ddev_head.sh`. A custom `installScriptUrl` now installs the stable base for `head`. - The steps pass inputs through `env` instead of putting `${{ inputs.* }}` into the shell script. ## Manual Testing Instructions Run the `tests` workflow on this branch: ```bash gh workflow run main.yml -R ddev/github-action-setup-ddev --ref 20261122_rfay_head_download_ddev ``` In the `test (ubuntu-24.04, head)` job, expand "Replace DDEV with the HEAD build". Expect `Downloading ddev linux/amd64 from the latest main build...`, with no nightly.link warning. Expect a version such as `ddev version v1.25.6-1-g24cd0c83b`. Check that the `latest` and `1.24.8` jobs don't run that step. ## Automated Testing Overview This repository's `tests` workflow covers `head`, `latest` and `1.24.8` on `ubuntu-24.04` and `ubuntu-24.04-arm`. Claude Code ran `ddev utility download-ddev --head` locally on Linux amd64, without a token. It downloaded `v1.25.6-1-g24cd0c83b`. Only CI can show that the workflow token downloads `ddev/ddev` artifacts from GitHub. ## Release/Deployment Notes A `head` install now downloads stable DDEV first. That adds a few seconds. 🤖 Developed with assistance from [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrTUMwauQvTgWac6bsCPsm
- Pass the workflow's own token to `ddev utility download-ddev` directly instead of through a new `token` input, so there is one less input to support. - Mention `latest` and `head` in the `version` input's description. - Check for the `-g<sha>` suffix in the `head` test, so it fails if the replace step is skipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4001e9f to
fb10dfd
Compare
|
Did those things, thanks! |
Updates the setup-ddev `main` pin, so the "Lint actions" job passes again. ## Description - `ci.yml`: pins `ddev/github-action-setup-ddev` to `798b95f # main` instead of `222a22f`. setup-ddev's `main` moved on 2026-11-25, and zizmor's online audit flags a `# main` comment on an older SHA. ## Links - New setup-ddev commits: ddev/github-action-setup-ddev#64 and ddev/github-action-setup-ddev#65 (`head` builds via `ddev utility download-ddev`). ## Testing instructions 1. Check that the **CI** workflow's "Lint actions" job passes in this PR's checks. 2. Check that the `cache-save` and `cache-restore` jobs for DDEV `head` pass, since ddev/github-action-setup-ddev#65 changed how `head` is downloaded. ## AI disclosure Claude Code (Claude Opus) found why "Lint actions" failed on #15 and updated the pin. I asked for the investigation and reviewed the change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Short Summary (TL;DR)
version: headnow installs stable DDEV, then replaces it with themainbuild thatddev utility download-ddev --headdownloads from GitHub. Before, everyheadinstall depended on nightly.link, which fails intermittently.The Issue
The
headjobs in this repository's nightly tests fail every few weeks in the "Install DDEV" step.install_ddev_head.shdownloadshttps://nightly.link/ddev/ddev/workflows/main-build/main/ddev-linux-amd64.zip, and nightly.link returned an HTTP 404 or 500 while the artifact existed on GitHub:The same problem affects users who test against
head.install_ddev_head.shhas no retry and no other source.How This PR Solves The Issue
head, the action runs the normal install script, which installs the latest stable release. Since v1.25.4, stable includesddev utility download-ddev.ddev utility download-ddev --head. It finds the latest successfulmain-buildrun through the GitHub API, and downloads the artifact from GitHub. It uses nightly.link only when that fails.ddevandddev-hostnamein place, so the two binaries always match.tokeninput defaults to${{ github.token }}, so users don't have to set anything. Without a token,download-ddevuses nightly.link to download.ddev config globalmoves to its own step after the replacement, so it runs on the final binary.headno longer swaps the install script forinstall_ddev_head.sh. A custominstallScriptUrlnow installs the stable base forhead.envinstead of putting${{ inputs.* }}into the shell script.Manual Testing Instructions
Run the
testsworkflow on this branch:In the
test (ubuntu-24.04, head)job, expand "Replace DDEV with the HEAD build". ExpectDownloading ddev linux/amd64 from the latest main build..., with no nightly.link warning. Expect a version such asddev version v1.25.6-1-g24cd0c83b. Check that thelatestand1.24.8jobs don't run that step.Automated Testing Overview
This repository's
testsworkflow covershead,latestand1.24.8onubuntu-24.04andubuntu-24.04-arm. Claude Code randdev utility download-ddev --headlocally on Linux amd64, without a token. It downloadedv1.25.6-1-g24cd0c83b. Claude Code ran thetestsworkflow on this branch (run 44979911977), and all six jobs passed. Theheadjob installedv1.25.6-1-g24cd0c83band logged no nightly.link fallback, so the workflow token downloaded the artifact from GitHub.Release/Deployment Notes
A
headinstall now downloads stable DDEV first. That adds a few seconds.🤖 Developed with assistance from Claude Code
https://claude.ai/code/session_01UrTUMwauQvTgWac6bsCPsm
Generated by Claude Code