Repository navigation
fix: allow the first Application plan when no State exists - #301
Merged
Merged
Conversation
lweberru
requested review from
Breeless,
JoshSTACKIT,
LembDo and
dweezl
as code owners
November 25, 2026 14:35
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.
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.