fix: persist machine config.mounts (#59)#60
Merged
Conversation
…#59) MachineConfig had no mounts field, so a create body's config.mounts were dropped on JSON unmarshal and GET .../machines returned config.mounts: null. A chant flyApply reconcile compares desired vs live config, so a mounting machine looked drifted on every apply and never no-op'd (INTENTIUS/chant#868). Add a MachineMount type mirroring fly-go's shape + a Mounts field on MachineConfig, and clone Mounts in cloneMachine so returned copies never alias stored state. A store test asserts a mount survives create -> GET and clone isolation. build/vet/test/gofmt clean.
lex00
added a commit
to INTENTIUS/chant
that referenced
this pull request
Jul 14, 2026
…s mounts (#868, #59) mudflaps 0.4.1 (INTENTIUS/mudflaps#60) persists machine config.mounts, so a mounting machine no-ops on re-apply. Enrich the reconcile example/tutorial: - bump SPRITZER... no: bump MUDFLAPS_IMAGE to 0.4.1. - add a Volume + a web mount back to fly-reconcile/src/infra.ts; the compile test asserts the volume create body + web's mount. - tutorial + README show the volume in create/no-op output and the image 0.4.1. Verified end-to-end against ghcr.io/intentius/mudflaps:0.4.1: create (app + volume + web + worker) → re-apply is a clean no-op for ALL resources, including the mounted web (previously it re-applied forever). Docs build clean; compile tests pass.
lex00
added a commit
to INTENTIUS/chant
that referenced
this pull request
Jul 14, 2026
…872) * docs: Reconcile Fly Machines tutorial + fly-reconcile example (#868) Adds examples/fly-reconcile — one app + two machines whose op reconciles against a *running* mudflaps (Build → Apply only, no boot/teardown), so re-runs show the stateless reconcile flyApply does: create → no-op → in-place update → owned-only prune, with a machine created outside chant surviving the prune (no managed-by marker). Plus tutorials/fly-machines-reconcile.mdx and a compile test. Registered in the Fly tutorials sidebar group after local-fly. Scope note: the example is machines-only. Adding a Volume with a mount hits a mudflaps fidelity gap — a mounted machine reads back config.mounts=null, so it perpetually re-applies against the emulator (INTENTIUS/mudflaps#59). The volume+mount enrichment is deferred to that fix; machines alone give a clean offline no-op. Verified: docs build clean; the full reconcile sequence (create/no-op/update/ prune/foreign-survives) runs green against ghcr.io/intentius/mudflaps:0.4.0; examples compile tests pass. * fly-reconcile: add the volume + mount now that mudflaps 0.4.1 persists mounts (#868, #59) mudflaps 0.4.1 (INTENTIUS/mudflaps#60) persists machine config.mounts, so a mounting machine no-ops on re-apply. Enrich the reconcile example/tutorial: - bump SPRITZER... no: bump MUDFLAPS_IMAGE to 0.4.1. - add a Volume + a web mount back to fly-reconcile/src/infra.ts; the compile test asserts the volume create body + web's mount. - tutorial + README show the volume in create/no-op output and the image 0.4.1. Verified end-to-end against ghcr.io/intentius/mudflaps:0.4.1: create (app + volume + web + worker) → re-apply is a clean no-op for ALL resources, including the mounted web (previously it re-applied forever). Docs build clean; compile tests pass.
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.
Closes #59.
MachineConfighad nomountsfield, so a create body'sconfig.mountswere dropped on JSON unmarshal andGET .../machinesreturnedconfig.mounts: null. chant'sflyApplycompares desired vs live config, so a mounting machine looked drifted on every reconcile and never no-op'd (surfaced building INTENTIUS/chant#868).Fix
MachineMounttype mirroring fly-go's shape (volume,path,name,size_gb, …) and aMounts []MachineMountfield onMachineConfig.MountsincloneMachineso returned copies never alias stored state.go build/vet/test/gofmtclean.Once released (0.4.1), chant bumps
MUDFLAPS_IMAGEand the fly-reconcile tutorial (#868) gains a volume + mount with a clean offline no-op.