Relationships
#740 tf plan: FETCH_BUNDLE PAGE_FETCH_ERR / NO_STATES on cleanup-only plan (no resource changes)
Opened by robin · 6/21/2026
Summary
stategraph tf plan fails with FETCH_BUNDLE : PAGE_FETCH_ERR : idx=0 →
Bad_request_err ... id = "NO_STATES" when the plan's entire diff is
import-declaration cleanup (deleting hcl import nodes and their tfvar
entries) with zero resource-level changes across any state.
The server computes the plan successfully (CALL_GENERATE / POLL_GENERATE
both succeed); only the final FETCH_BUNDLE step fails. Because the failure
happens before --out is written, no plan file is produced, so the result is
also un-appliable via stategraph tf apply.
Environment
- Server: 2.3.6 (also reproduced on 2.3.1)
- Client: dev
- State: github-repos — 608 instances / 608 resources / 187 modules / 423 edges
- Plan diff: 605
hcl_delete+ 605tfvar_delete, object typeshclandtfvaronly — noresource/instanceobjects touched.
Reproduction
- Onboard a repo via
importblocks; apply so the import nodes are recorded in the revision. - Remove the
importblocks from local HCL (normal post-import cleanup). - Run
stategraph tf plan --out tfplan.json.
The only diff is the removal of the now-stale import declarations, which is a state no-op (no real resource changes).
Verbose trace (-vvv)
[tf] REVISION_HASH_COMPARE : dir=. workspace=default local=629435... remote=32d24f...
[tf] CREATE_TX : time=0.029588
[sg_tx_builder] ADD_REVISION : batch_size=264
[sg_tx_builder] APPEND_ENTRIES : batch_size=210
[sg_tx_builder] APPEND_ENTRIES : batch_size=1000
[tf] CALL_PREVIEW : time=0.030863
[sg_actuator] CALL_GENERATE : time=0.037307
[sg_actuator] POLL_GENERATE : time=0.388460
[ERROR] [sg_actuator] FETCH_BUNDLE : PAGE_FETCH_ERR : idx=0
[tf] ACTUATOR : time=0.521705
Actuator error: `Bad_request_err ({ ... id = "NO_STATES" })Expected
A cleanup-only / empty plan should render cleanly (e.g. "No changes" or an
empty plan diff) and write a valid plan file, rather than erroring at
FETCH_BUNDLE.
Actual
- Plan exits with an error.
- No plan file is written, so the result cannot be applied.
- Each failed plan leaves a dangling
opentransaction behind; these accumulate across retries.
Impact
Plans whose diff contains only import/tfvar deletions (a normal stage of the import lifecycle) cannot complete, and there is no way to finalize the cleanup through plan/apply. Dangling open transactions accumulate and must be aborted manually.
Closed
No activity in this phase yet.