Repository navigation
gcp - spanner-backup - list backups by instance name - #11235
Open
Thanatos9404 wants to merge 1 commit into
Open
Thanatos9404 wants to merge 1 commit into
Thanatos9404 wants to merge 1 commit into
Conversation
spanner-backup built the parent path from the instance displayName, so for any instance whose display name differs from its id the backups request went to the wrong instance path and the policy failed. Map the parent from the instance name instead, as spanner-database-instance already does. It is the full projects/<project>/instances/<id> path, so the override that rebuilt it from the default project and the display name is no longer needed.
This branch has not been 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.
gcp.spanner-backupbuilt the parent path for listing backups from the instance'sdisplayName. The display name is a free-form label, so when it differs from the instance id the backups request goes to the wrong instance path. Usually that path doesn't exist and the policy fails; if the label matches another instance's id, that instance's backups are listed instead.This maps the parent from the instance
name(projects/<project>/instances/<id>) throughchild_enum_params, the same wayspanner-database-instancedoes, and drops the override. It's the same fix #11228 makes for Bigtable.I added a query test with hand-written flight data where the instance id and display name differ. It fails on main and passes with this change, and the rest of the c7n_gcp tests pass.
#10682 also edits the
c7n.utilsimport here and still needslocal_session, so whichever lands second needs a small rebase.