Skip to content

examples: use an in-repo flake in the remote flakes example - #2994

Merged
mikeland73 merged 1 commit into
mainfrom
mikeland73/fix-flaky-ci-run
Oct 5, 2026
Merged

mikeland73 merged 1 commit into
mainfrom
mikeland73/fix-flaky-ci-run

Conversation

@mikeland73

@mikeland73 mikeland73 commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

examples/flakes/remote pulled in github:F1bonacc1/process-compose. That flake isn't in cache.nixos.org, so every CI run built it from source on macOS, including its Go test suite. The suite's watch/restart tests depend on timing and fail on loaded runners. The example's run_test never even used process-compose.

This caused the TestExamples/flakes_remote_run_test.test failures in the nightly cli-tests:

Changes

  • The remote flake is now github:jetify-com/devbox/<main sha>?dir=examples/flakes/php/my-php-flake#hello. That flake has its own flake.lock, so hello comes from a pinned nixpkgs and is downloaded from the binary cache instead of built.
  • Dropped the duplicate nixpkgs#hello. run_test now runs hello too, so the test actually exercises the remote flake.
  • Updated examples/flakes/README.md, including a note on ?dir= for flakes in subdirectories.

Test plan

  • devbox install in examples/flakes/remote: everything is fetched from cache.nixos.org and nothing builds
  • DEVBOX_RUN_PROJECT_TESTS=1 go test ./testscripts -run TestExamples/flakes_remote passes locally (macOS arm64)
  • CI project tests

🤖 Generated with Claude Code

The flakes/remote example pulled in github:F1bonacc1/process-compose, which
isn't in cache.nixos.org, so every CI run built it from source on macOS,
including its timing-sensitive Go test suite. That build has repeatedly
failed the nightly cli-tests (process-compose 0.43.1 in early September,
1.122.0 now), even though the example's run_test never used process-compose.

Point the remote flake at examples/flakes/php/my-php-flake in this repo,
pinned to a main commit. Its hello output comes from a locked nixpkgs and
is substituted from the binary cache, so nothing is built. run_test now
also calls hello so the remote flake is exercised.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@mikeland73

Copy link
Copy Markdown
Collaborator Author

@claude ptal

@claude

claude Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Claude finished @mikeland73's task in 13s —— View job


Review of #2994

The change looks good and I didn't find any blocking issues.

Checked

  • The pinned SHA 1d9ea45e… exists in the repo, and it is the commit your branch is based on (main).
  • examples/flakes/php/my-php-flake exports packages.<system>.hello and has its own flake.lock, so the #hello fragment resolves. Because the lock is pinned, hello is substituted from cache.nixos.org and not built from source, which fixes the flake.
  • devbox.json and devbox.lock are consistent. The lock URL has ?dir= percent-encoded as examples%2Fflakes%2F…, which is what devbox normally writes. The lock entries are sorted, and the process-compose entry is removed.
  • The run_test script now runs hello before cowsay, so the remote flake is exercised. The README matches the example, and the ?dir= note is useful.

Non-blocking notes

  1. The SHA pin is a parent of this PR's own commit, so it won't pick up future edits to my-php-flake. That is what you want for a stable example. If someone changes that flake's hello output later, this example won't follow it, so consider a short comment in the PR or README saying the pin is intentional.
  2. The README example uses cowsay as the nixpkgs package and no longer has hello. It's consistent with the text below it, and the old duplicate was redundant anyway.
  3. I haven't run the CI project tests myself. That box is still unchecked in your test plan, so check the TestExamples/flakes_remote result before merging.

LGTM, pending CI.
· branch mikeland73/fix-flaky-ci-run

@mikeland73
mikeland73 merged commit 849c9d2 into main Oct 5, 2026
29 checks passed
@mikeland73
mikeland73 deleted the mikeland73/fix-flaky-ci-run branch October 5, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant