Skip to content

fix: allow the first Application plan when no State exists - #301

Merged
lweberru merged 2 commits into
mainfrom
fix/application-empty-initial-state
Nov 25, 2026
Merged

lweberru merged 2 commits into
mainfrom
fix/application-empty-initial-state

Conversation

@lweberru

@lweberru lweberru commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

A first Application order can fail before planning with a misleading direct-project-permission/IAM-migration error. OpenTofu 1.12.6 returns exit zero and a pristine empty JSON snapshot when the HTTP backend has no State; the Worker interpreted this as an existing deployment and attempted project IAM discovery.

Recognize only that exact initial snapshot as absent. First-time orders proceed to their ordinary Plan, while existing, partially populated, malformed or differently shaped States retain the existing scope/IAM validation. No State, IAM grants or application identities are rewritten. After rollout, retry the Plan for the same order; no new platform binding or replacement order is required. Document this in both Runner runbooks.

Validation: full application check passed (2,257 tests; 103 gated skips); 86 isolated Plan/Apply database tests passed; 147 targeted IAM/Worker tests passed (five environment-gated skips). Three real OpenTofu tests passed separately with the pinned provider mirror: absent-State first Plan, preservation/rejection of an existing unbound State, and the existing direct-grant adoption/cleanup flow against local fake APIs. Tests create no cloud resources.

Add concise v2.2.7 release notes. Nine release/promotion operator tests passed. The user has authorized rollout to Dev and then Prod after successful checks; both authorized deployments have now completed successfully. Production diagnostics were read-only; temporary SSH access was reset. No customer identifiers, credentials, raw State or operational payloads are included.

Deployment evidence: Dev run 45639865340 and Prod run 45647020610 both succeeded. v2.2.7 promotes the same immutable Dev build from reviewed merge 603896b. Additional public health and running-instance checks passed. Existing customer orders, platform bindings and State were not rewritten by the fix.

@lweberru
lweberru merged commit 603896b into main Nov 25, 2026
16 checks passed
@lweberru
lweberru deleted the fix/application-empty-initial-state branch November 25, 2026 14:58
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.

1 participant