The adopted Guest leaves its template file alone (THE-122) #11

Merged
pit merged 1 commit from paperclip/THE-122-adopted-template into main 2026-12-03 09:23:37 +00:00
Owner

The import reads the template file's identity and leaves its url empty. The provider's overwrite default is on, so the first plan after the import proposes overwrite = true; the apply sets it, and the next refreshing plan asks the empty URL for the file:

The remote file at URL "" most likely doesn't exist or can't be accessed.
To skip the remote file check, set `overwrite` to `false`.

That is one apply and then no plan, which is exactly the state the ten adopted media Guests are in after their imports. overwrite = false still fetches a template that is absent and leaves the shared file alone when it is there. It is the same residue THE-65 answered for 117.

This is a follow-up to #10. Merge it before the deploy's refreshing plan walks the ten imported Guests; with it, the guest step applies overwrite = false and timeout_start once and then plans clean.

The import reads the template file's identity and leaves its `url` empty. The provider's `overwrite` default is on, so the first plan after the import proposes `overwrite = true`; the apply sets it, and the next refreshing plan asks the empty URL for the file: ``` The remote file at URL "" most likely doesn't exist or can't be accessed. To skip the remote file check, set `overwrite` to `false`. ``` That is one apply and then no plan, which is exactly the state the ten adopted media Guests are in after their imports. `overwrite = false` still fetches a template that is absent and leaves the shared file alone when it is there. It is the same residue THE-65 answered for 117. This is a follow-up to #10. Merge it before the deploy's refreshing plan walks the ten imported Guests; with it, the guest step applies `overwrite = false` and `timeout_start` once and then plans clean.
The adopted Guest's template is not fetched over itself (THE-122)
All checks were successful
pr-checks / check (pull_request) Successful in 38s
06988a0910
The import reads the template file's identity and leaves its URL empty. With
the provider's `overwrite` default on, the plan after the first apply asks
that empty URL for the file and fails, so an adopted Guest could take one
apply and then not plan at all. `overwrite = false` still fetches a template
that is absent, and leaves the shared file alone when it is there.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
Member

Review started (round 1/5) on 06988a0910 — reading the diff now.

**Review started** (round 1/5) on 06988a091067473c68987f2ef297b8a34b2b1965 — reading the diff now.
bot-minos approved these changes 2026-12-03 08:59:12 +00:00
bot-minos left a comment

olympus/infra-media#11 · head 06988a0 · round 1/5 · verdict merge

Recommendation: merge

One hunk, seven lines: overwrite = false on proxmox_download_file.debian_13_base (modules/guest/container.tf:14-19). Spec source: the PR body. The linked work item paperclip:THE-122 is the W1.4 envelope (deploy-on-merge plus the W1 exit carry-overs) and this PR is the follow-up to #10 inside it; the defect statement lives in the body, so the body is the contract I judged.

Spec

Every claim in the body, driven against the provider version this repository locks — bpg/proxmox 0.125.0, read from tofu providers schema -json (the lock's own version) and from the tagged source, not from the registry docs:

Body's claim Verdict
the import reads the file's identity and leaves url empty holds — read() sets only Size from the datastore listing (fwprovider/nodes/resource_download_file.go:534-561); url/checksum come from config/state alone
the first plan after the import proposes overwrite = true holds — Optional+Computed with Default: booldefault.StaticBool(true) (:335-344)
the next refreshing plan asks the empty URL for the file holds — Read gates the metadata call on state.Overwrite (:600-613), and the plan modifier gates its check on plan.Overwrite (:113)
overwrite = false still fetches a template that is absent holds — Create calls DownloadFileByURL without consulting Overwrite (:419-445), so an absent file is fetched as before
an existing one is left alone holds on the managed path — Read skips the URL fetch and both modifier checks return early; Update only re-reads the datastore
with it, the guest step applies once and then plans clean holds — the one in-place apply is overwrite: true -> false; every later refresh skips both size checks

Findings:

  • ADVISORY modules/guest/container.tf:14-18 — the comment says the empty-URL plan "dies there"; at this version it does not. The plan modifier answers with resp.Diagnostics.AddWarning(...) and returns (resource_download_file.go:128-137), and the Read-side failure is a tflog.Warn (:601-608), so the plan completes resource-clean and carries that warning on every run. What the hunk actually buys is the end of the warning and the disarming of the replace path (RequiresReplace at :140-153, live whenever a url_size was readable), not the unblocking of a failing plan. The fix's contract — one apply, then a clean plan — is unaffected, so this is the wording and not the behaviour. "warns on every plan" instead of "dies there" makes the comment true, and the same sentence in the PR body reads the same way.

Standards

standards: no repo conventions found — olympus/infra-media at this head carries no AGENTS.md, CONTRIBUTING.md or coding-standards.md. Judged by general good practice plus the org records, which do bind:

  • olympus/workshop docs/adr/0011-a-deploy-never-destroys-or-replaces.md §Decision (read at origin/main f86e332): overwrite is not ForceNew (force_new=false in the pinned schema) and both plan-modifier checks are gated on it, so this is an in-place update and nothing is replaced. Pass.
  • …/0001-declare-and-lock-the-toolchain.md: untouched; every Stack was validated through the pinned toolchain, below. Pass.
  • The six-line comment matches the file's own practice — measured rationale plus a ticket reference, as at container.tf:1-3, :33-36, :130-144 — so the smell baseline finds nothing to name here.

No standards findings.

Verified by hand

  • make validate at head: 12/12 Stacks valid (mise exec, OpenTofu 1.12.6, provider 0.125.0 from the repo lock).
  • make check at head: 8 runs, 6 green, 2 red. Both reds are scripts/tests/deploy-workflow.sh:51, printf: write error: Broken pipe — assert_contains pipes printf into grep -q under pipefail, and grep's early exit intermittently fails the assertion. That file is byte-identical at base and head (git diff --quiet 35ab317 06988a0 -- scripts/ .forgejo/ Makefile → identical), so the diff did not introduce it; make deploy-test alone is 4/4 green at head, and make check at base is 4/4 green.
  • CI at this SHA: pr-checks / check (pull_request) success (run 39). That job runs make check and make validate and nothing else (.forgejo/workflows/pr-checks.yml:22,24).

Could not verify

  • A live plan against PROD state. This repository runs no plan job in CI — pr-checks is check and validate only, and docs/deploy.md:43 records it ("no plan workflow has landed in this repository yet") — and guest-plan-check needs PROD's plan key, which this review does not hold. Replacement risk was settled statically instead: force_new=false, plus both plan modifiers and the Read URL fetch gated on overwrite.

Named, not charged

  • scripts/tests/deploy-workflow.sh:51 — the flaky assertion above. Pre-existing, outside the diff, and worth its own ticket.
  • All twelve Stacks declare the same datastore:file_name. A Stack with no state entry whose datastore already holds the file still errors at Create ("File already exists…", resource_download_file.go:447-455) whatever overwrite says, because Create never consults it. Pre-existing shape; this hunk neither fixes nor worsens it.
  • "Merge it before the deploy's refreshing plan walks the ten imported Guests" is a sequencing instruction for the Operator, not a defect: per docs/deploy.md:41 the ten still have no state records, so no plan walks them today.

Spec: 1 finding, 1 advisory — worst: the overstated consequence at container.tf:14-18, a wording fix. Standards: 0 findings — worst: none.

<!-- minos review-loop: repo=olympus/infra-media pr=11 head=06988a091067473c68987f2ef297b8a34b2b1965 round=1/5 axes=standards,spec --> **olympus/infra-media#11** · head `06988a0` · round 1/5 · verdict **merge** Recommendation: merge One hunk, seven lines: `overwrite = false` on `proxmox_download_file.debian_13_base` (`modules/guest/container.tf:14-19`). Spec source: the PR body. The linked work item `paperclip:THE-122` is the W1.4 envelope (deploy-on-merge plus the W1 exit carry-overs) and this PR is the follow-up to #10 inside it; the defect statement lives in the body, so the body is the contract I judged. ## Spec Every claim in the body, driven against the provider version this repository locks — bpg/proxmox 0.125.0, read from `tofu providers schema -json` (the lock's own version) and from the tagged source, not from the registry docs: | Body's claim | Verdict | |---|---| | the import reads the file's identity and leaves `url` empty | holds — `read()` sets only `Size` from the datastore listing (`fwprovider/nodes/resource_download_file.go:534-561`); url/checksum come from config/state alone | | the first plan after the import proposes `overwrite = true` | holds — Optional+Computed with `Default: booldefault.StaticBool(true)` (:335-344) | | the next refreshing plan asks the empty URL for the file | holds — Read gates the metadata call on `state.Overwrite` (:600-613), and the plan modifier gates its check on `plan.Overwrite` (:113) | | `overwrite = false` still fetches a template that is absent | holds — Create calls `DownloadFileByURL` without consulting `Overwrite` (:419-445), so an absent file is fetched as before | | an existing one is left alone | holds on the managed path — Read skips the URL fetch and both modifier checks return early; Update only re-reads the datastore | | with it, the guest step applies once and then plans clean | holds — the one in-place apply is `overwrite: true -> false`; every later refresh skips both size checks | Findings: - **ADVISORY** `modules/guest/container.tf:14-18` — the comment says the empty-URL plan "dies there"; at this version it does not. The plan modifier answers with `resp.Diagnostics.AddWarning(...)` and returns (`resource_download_file.go:128-137`), and the Read-side failure is a `tflog.Warn` (:601-608), so the plan completes resource-clean and carries that warning on every run. What the hunk actually buys is the end of the warning and the disarming of the replace path (`RequiresReplace` at :140-153, live whenever a `url_size` was readable), not the unblocking of a failing plan. The fix's contract — one apply, then a clean plan — is unaffected, so this is the wording and not the behaviour. "warns on every plan" instead of "dies there" makes the comment true, and the same sentence in the PR body reads the same way. ## Standards `standards: no repo conventions found` — `olympus/infra-media` at this head carries no `AGENTS.md`, `CONTRIBUTING.md` or `coding-standards.md`. Judged by general good practice plus the org records, which do bind: - `olympus/workshop docs/adr/0011-a-deploy-never-destroys-or-replaces.md §Decision` (read at `origin/main` `f86e332`): `overwrite` is not ForceNew (`force_new=false` in the pinned schema) and both plan-modifier checks are gated on it, so this is an in-place update and nothing is replaced. Pass. - `…/0001-declare-and-lock-the-toolchain.md`: untouched; every Stack was validated through the pinned toolchain, below. Pass. - The six-line comment matches the file's own practice — measured rationale plus a ticket reference, as at `container.tf:1-3`, `:33-36`, `:130-144` — so the smell baseline finds nothing to name here. No standards findings. ## Verified by hand - `make validate` at head: 12/12 Stacks valid (mise exec, OpenTofu 1.12.6, provider 0.125.0 from the repo lock). - `make check` at head: 8 runs, 6 green, 2 red. Both reds are `scripts/tests/deploy-workflow.sh:51`, `printf: write error: Broken pipe` — `assert_contains` pipes `printf` into `grep -q` under `pipefail`, and grep's early exit intermittently fails the assertion. That file is byte-identical at base and head (`git diff --quiet 35ab317 06988a0 -- scripts/ .forgejo/ Makefile` → identical), so the diff did not introduce it; `make deploy-test` alone is 4/4 green at head, and `make check` at base is 4/4 green. - CI at this SHA: `pr-checks / check (pull_request)` success (run 39). That job runs `make check` and `make validate` and nothing else (`.forgejo/workflows/pr-checks.yml:22,24`). ## Could not verify - A live plan against PROD state. This repository runs no plan job in CI — `pr-checks` is check and validate only, and `docs/deploy.md:43` records it ("no plan workflow has landed in this repository yet") — and `guest-plan-check` needs PROD's plan key, which this review does not hold. Replacement risk was settled statically instead: `force_new=false`, plus both plan modifiers and the Read URL fetch gated on `overwrite`. ## Named, not charged - `scripts/tests/deploy-workflow.sh:51` — the flaky assertion above. Pre-existing, outside the diff, and worth its own ticket. - All twelve Stacks declare the same `datastore:file_name`. A Stack with no state entry whose datastore already holds the file still errors at Create ("File already exists…", `resource_download_file.go:447-455`) whatever `overwrite` says, because Create never consults it. Pre-existing shape; this hunk neither fixes nor worsens it. - "Merge it before the deploy's refreshing plan walks the ten imported Guests" is a sequencing instruction for the Operator, not a defect: per `docs/deploy.md:41` the ten still have no state records, so no plan walks them today. Spec: 1 finding, 1 advisory — worst: the overstated consequence at `container.tf:14-18`, a wording fix. Standards: 0 findings — worst: none.
pit merged commit 431ebbdf8a into main 2026-12-03 09:23:37 +00:00
pit deleted branch paperclip/THE-122-adopted-template 2026-12-03 09:23:37 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
olympus/infra-media!11
No description provided.