Repository navigation
Add import, forget, and drift to plan summaries - #790
Merged
Merged
Conversation
Brings the neptune plan summary in line with upstream Atlantis's PlanSuccess.Summary(): import and forget counts in the one line summary (same wording as the Terraform CLI), and a note in the check run when resources changed outside of Terraform. Reads Change.Importing and Plan.ResourceDrift from the plan JSON, which needs terraform-json >= v0.17. Bumps it to v0.22.1, the newest release that doesn't also raise hashicorp/go-version (used in ~40 files). The "forget" action constant only exists in v0.23+, so it's defined locally. IsEmpty() is unchanged on purpose: the plan review gate auto-approves empty plans, and counting imports/forgets there would change approval behavior.
Brings the neptune plan summary in line with upstream Atlantis's PlanSuccess.Summary(): import and forget counts in the one line summary (same wording as the Terraform CLI), and a note in the check run when resources changed outside of Terraform. Reads Change.Importing and Plan.ResourceDrift from the plan JSON, which needs terraform-json >= v0.17. Bumps it to v0.22.1, the newest release that doesn't also raise hashicorp/go-version (used in ~40 files). The "forget" action constant only exists in v0.23+, so it's defined locally. IsEmpty() is unchanged on purpose: the plan review gate auto-approves empty plans, and counting imports/forgets there would change approval behavior. The previous commit on this branch was pushed empty; this one carries the actual changes.
jfernandoz
approved these changes
Oct 7, 2026
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.
Summary
Brings the neptune plan summary in line with upstream Atlantis's
PlanSuccess.Summary():Plan: 1 to import, 0 to add, 1 to change, 0 to destroy, 1 to forget.).**Note: 2 resources have changed outside of Terraform.**), read from the plan JSON'sresource_driftinstead of matching log text.Dependency bump
Change.ImportingandPlan.ResourceDriftneedhashicorp/terraform-json>= v0.17. This bumps it from v0.14.0 to v0.22.1, the newest release that doesn't also raisehashicorp/go-version(used in ~40 files). The only othergo.modchanges are indirect deps with no direct importers here (go-cty,go-cmp,go-textseg).terraform-jsonitself is only imported bysummary.go.The
forgetaction constant (tfjson.ActionForget) only exists in v0.23+, so it's defined locally rather than taking thego-versionbump.Behavior notes
PlanSummary.IsEmpty()is intentionally unchanged (creates/updates/deletes only), since the plan review gate depends on it. Display uses a separate check, so import- or forget-only plans no longer show "No plan summary created".PlanSummaryare additive, so existing workflow histories and payloads decode with zero values.Test plan
summary_test.go)renderer_test.go, first tests for this package)go build ./...,go vet,gofmtcleango test ./...: all packages pass exceptserver/neptune/workflowsTestDeployWorkflow, which hits its 3s Temporal test-env timeout under full parallel load. It fails the same way onmainand passes in isolation with and without this change.