Repository navigation
fix(ci): order the re-pointed payment-method functions before the NONE data source deletes - #845
Merged
Merged
Conversation
…Sync ordering guard PR #822 consolidated the two per-purpose NONE data sources into the shared NoneDataSource and re-pointed inject_global_payment_methods, set_owner_account_id_in_stash and filter_payment_methods_by_access. Removing the data source blocks also removed the config edge that ordered their destroys after the function updates, so the full apply destroys the still-referenced data sources first and AWS refuses with "Data source is still in use by functions". Add the three function targets to both appsync-ensure-resolver-order.sh call sites and make the parity test assert the full target set.
This was referenced Oct 27, 2026
This branch was successfully deployed
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.
Deploy Production has failed 13 runs in a row since the merge of #822; prod is frozen at the #813 build.
What was wrong
5f3e1a46(PR #822, #750) deleted thepayment_methods_noneandfilter_payment_methods_noneaws_appsync_datasourceresources and re-pointed three functions to the sharedaws_appsync_datasource.none. Removing the blocks also removed the config edge ordering their destroys after those function updates, so OpenTofu walks the destroy nodes first and AWS refuses both calls:Not one of the planned in-place updates is attempted, so state never advances and every later merge replays the identical failure. The resolver-ordering guard did fire, but its hand-maintained target list had no payment-method entry, so it updated nine unrelated objects and left the blockers untouched.
What changed
Added the three re-pointed functions to the
appsync-ensure-resolver-order.shtarget list in both call sites, so theirUpdateFunctioncalls land before the full apply reaches the destroys:Both data sources are
type = "NONE", so re-binding a function between them is semantically inert and the function ids are unchanged — no resolver downtime. No tofu module config was touched.Tests
tests/unit/test_ephemeral_deploy_resolver_parity.pypreviously checked only one resolver address. It now extracts every-t module.appsync.…target from each call site and asserts set equality, so the two lists cannot drift silently, plus an explicit check that the three new targets are present in both. Full unit suite passes at 100% coverage; shellcheck and theguardsjob tests pass.