Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: improve backup name regex when listing backups #970

Merged
merged 1 commit into from
May 29, 2024

Conversation

AmitMatsil
Copy link
Contributor

Change the regular expression to match the format specified in the Bigtable Admin API documentation: https://cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters.backups/create

Fixes #969

Change the regular expression to match the format specified in the Bigtable Admin API documentation: https://cloud.google.com/bigtable/docs/reference/admin/rest/v2/projects.instances.clusters.backups/create
@AmitMatsil AmitMatsil requested review from a team as code owners May 28, 2024 14:13
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: bigtable Issues related to the googleapis/python-bigtable API. labels May 28, 2024
@bhshkh bhshkh assigned daniel-sanche and unassigned bhshkh May 28, 2024
Copy link
Contributor

@igorbernstein2 igorbernstein2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!
I dont really think we should be doing these kind of validations on the client to begin with.
I think I would prefer for the regex to just be something like: backups/(?P<backup_id>[^/]+) and just have the server do all of the validation.

This PR is an improvement so I'm ok merging it as is. However in the future we really should stop duplicating server logic here.

@daniel-sanche daniel-sanche added the kokoro:run Add this label to force Kokoro to re-run the tests. label May 29, 2024
@daniel-sanche daniel-sanche changed the title Fix backup name regex when listing backups fix: fix backup name regex when listing backups May 29, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label May 29, 2024
@daniel-sanche daniel-sanche changed the title fix: fix backup name regex when listing backups fix: improve backup name regex when listing backups May 29, 2024
@daniel-sanche daniel-sanche merged commit 6ef122a into googleapis:main May 29, 2024
21 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/python-bigtable API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backup name format does not match the Bigtable Admin API
5 participants