Skip to content

fix: download head builds with ddev utility download-ddev, for #58 - #65

Open
rfay wants to merge 1 commit into
mainfrom
20261122_rfay_head_download_ddev
Open

rfay wants to merge 1 commit into
mainfrom
20261122_rfay_head_download_ddev

Conversation

@rfay

@rfay rfay commented Nov 22, 2026

Copy link
Copy Markdown
Member

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

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 500 on two attempts, 2 hours apart
2026-10-02 36945282755 404 on amd64 only, arm64 passed
2026-09-28 36361796895 404
2026-09-23 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:

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. Claude Code ran the tests workflow on this branch (run 44979911977), and all six jobs passed. The head job installed v1.25.6-1-g24cd0c83b and logged no nightly.link fallback, so the workflow token downloaded the artifact 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/session_01UrTUMwauQvTgWac6bsCPsm


Generated by Claude Code

## 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
@rfay
rfay requested a review from stasadev November 22, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants