Skip to content

Remove overlaybd client path; warn on lazy_load_images#4843

Merged
dangra merged 2 commits intomasterfrom
jphenow/remove-overlaybd
Apr 22, 2026
Merged

Remove overlaybd client path; warn on lazy_load_images#4843
dangra merged 2 commits intomasterfrom
jphenow/remove-overlaybd

Conversation

@jphenow
Copy link
Copy Markdown
Member

@jphenow jphenow commented Apr 20, 2026

Summary

The overlaybd/lazy-loading image feature is dead on the platform side:

  • flyd no longer processes ImageRef.Layers — the overlaybd snapshotter was removed from hosts (nomad-firecracker#3341, merged 2025-05-22).
  • rchab no longer serves the /flyio/v1/buildOverlaybdImage endpoint — the overlaybd build stages were removed (rchab#43).

Today, a customer with [experimental] lazy_load_images = true in fly.toml gets a silently broken deploy: flyctl converts the image, but the platform ignores the layers. After the rchab endpoint removal, the POST would 404 and fall through to a normal build via the existing terminal.Warnf — strictly better, but we shouldn't leave dead code and a misleading config flag around.

What changed

  • Removed the buildOverlaybdImage function and the UseOverlaybd call path from dockerfile_builder.go
  • Removed UseOverlaybd bool from the ImageOptions struct in resolver.go
  • Removed the overlaybd-specific test case from daemon_url_test.go
  • Removed the opts.UseOverlaybd plumbing from deploy_build.go
  • Added a deprecation warning when [experimental] lazy_load_images = true is set in fly.toml
  • Kept Experimental.LazyLoadImages in the config schema so existing fly.toml files still parse without error

Design decision: warn, don't error

Customers who have lazy_load_images = true in their fly.toml get a clear warning and a successful deploy — not a hard failure. This gives them a migration window to remove the stale flag without breaking their CI/CD pipelines.

Test plan

  • go build ./... passes
  • go vet ./internal/... passes
  • go test ./internal/build/imgsrc/... passes
  • Manual: set [experimental] lazy_load_images = true in a test app's fly.toml, run fly deploy --remote-only, verify:
    • No network request to /flyio/v1/buildOverlaybdImage
    • Warning about the flag is printed exactly once
    • Deploy succeeds as a normal image build
  • Manual: remove the flag, verify no warning printed and deploy still works

The overlaybd/lazy-loading image feature is dead on the platform side:
- flyd no longer processes ImageRef.Layers (nomad-firecracker#3341)
- The remote builder's /flyio/v1/buildOverlaybdImage endpoint is removed (rchab#43)

Remove the client-side call path: the buildOverlaybdImage function,
UseOverlaybd plumbing, and the overlaybd-specific test case.

Keep [experimental] lazy_load_images parseable in fly.toml so existing
configs don't break, but emit a deprecation warning when it's set to
true. This gives customers a migration window to clean up their configs
rather than silently doing nothing or hard-failing.
Copy link
Copy Markdown
Member

@dangra dangra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jphenow it needs to be go fmt. Other than that it looks good

@jphenow
Copy link
Copy Markdown
Member Author

jphenow commented Apr 21, 2026

Bah! I setup prek but must’ve missed something. Will do

@dangra dangra merged commit 322af52 into master Apr 22, 2026
97 of 102 checks passed
@dangra dangra deleted the jphenow/remove-overlaybd branch April 22, 2026 16:01
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