Regional samples
Description
Fixes #<ISSUE-NUMBER>
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
- [ ] I have followed Sample Guidelines from AUTHORING_GUIDE.MD
- [ ] README is updated to include all relevant information
- [ ] Tests pass:
nox -s py-3.9(see Test Environment Setup) - [ ] Lint pass:
nox -s lint(see Test Environment Setup) - [ ] These samples need a new API enabled in testing projects to pass (let us know which ones)
- [ ] These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
- [ ] This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
- [ ] This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
- [ ] Please merge this PR for me once it is approved
Here is the summary of changes.
You are about to add 24 region tags.
-
secretmanager/snippets/regional_samples/access_regional_secret_version.py:21, tag
secretmanager_access_regional_secret_version -
secretmanager/snippets/regional_samples/add_regional_secret_version.py:22, tag
secretmanager_v1_add_regional_secret_version -
secretmanager/snippets/regional_samples/create_regional_secret.py:25, tag
secretmanager_v1_create_regional_secret -
secretmanager/snippets/regional_samples/delete_regional_secret.py:23, tag
secretmanager_v1_delete_regional_secret -
secretmanager/snippets/regional_samples/delete_regional_secret_with_etag.py:23, tag
secretmanager_v1_delete_regional_secret_with_etag -
secretmanager/snippets/regional_samples/destroy_regional_secret_version.py:25, tag
secretmanager_v1_destroy_regional_secret_version -
secretmanager/snippets/regional_samples/destroy_regional_secret_version_with_etag.py:24, tag
secretmanager_v1_destroy_regional_secret_version_with_etag -
secretmanager/snippets/regional_samples/disable_regional_secret_version.py:25, tag
secretmanager_v1_disable_regional_secret_version -
secretmanager/snippets/regional_samples/disable_regional_secret_version_with_etag.py:25, tag
secretmanager_v1_disable_regional_secret_version_with_etag -
secretmanager/snippets/regional_samples/enable_regional_secret_version.py:25, tag
secretmanager_enable_regional_secret_version -
secretmanager/snippets/regional_samples/enable_regional_secret_version_with_etag.py:25, tag
secretmanager_v1_enable_regional_secret_version_with_etag -
secretmanager/snippets/regional_samples/get_regional_secret.py:24, tag
secretmanager_v1_get_regional_secret -
secretmanager/snippets/regional_samples/get_regional_secret_version.py:25, tag
secretmanager_v1_get_regional_secret_version -
secretmanager/snippets/regional_samples/iam_grant_access_with_regional_secret.py:25, tag
secretmanager_v1_iam_grant_access_regional_secret -
secretmanager/snippets/regional_samples/iam_revoke_access_with_regional_secret.py:25, tag
secretmanager_v1_iam_revoke_access_regional_secret -
secretmanager/snippets/regional_samples/list_regional_secret_versions.py:23, tag
secretmanager_v1_list_regional_secret_versions -
secretmanager/snippets/regional_samples/list_regional_secret_versions_with_filter.py:23, tag
secretmanager_v1_list_regional_secret_versions_with_filter -
secretmanager/snippets/regional_samples/list_regional_secrets.py:23, tag
secretmanager_v1_list_regional_secrets -
secretmanager/snippets/regional_samples/list_regional_secrets_with_filter.py:20, tag
secretmanager_v1_list_regional_secrets_with_filter -
secretmanager/snippets/regional_samples/regional_quickstart.py:21, tag
secretmanager_regional_quickstart -
secretmanager/snippets/regional_samples/regional_quickstart.py:38, tag
secretmanager_regional_quickstart -
secretmanager/snippets/regional_samples/update_regional_secret.py:21, tag
secretmanager_v1_update_regional_secret -
secretmanager/snippets/regional_samples/update_regional_secret_with_alias.py:21, tag
secretmanager_v1_update_regional_secret_with_alias -
secretmanager/snippets/regional_samples/update_regional_secret_with_etag.py:21, tag
secretmanager_v1_update_regional_secret_with_etag
This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:
- [ ] Refresh this comment
thanks @vipul7499; flagging this as I think we need to figure out how we handle this kind of need versus duplicating a bunch of code and adding the single feature of being able to add location. I don't think we want to double the size of samples maintained and have 2 separate places we maintain the code.
Hey @iennae , we would need to go through the current approach because we are going to write a whole new documentation for the regionalized secrets, so we will need a different set of samples for the same. It is done because regionalized samples is more than just a feature addition as it will be the DRZ compliant version of the secret manager.
cc : @kapishps
@iennae
Thanks for reviewing this PR. The samples are for DRZ compliant new APIs in Secret Manager. Though the samples look like it's a duplicate of the existing ones, there's a tweak in the API resource expectations. Would be happy to clarify further.
Hey @iennae is there any update on the review process? Can you please provide an estimate timeline?
Hey @iennae any update on this?
Hi @vipul7499 sharing a few suggestion!
-
This PR has a lot to review for 1 person. 2K lines of code with 26 files. Kindly reduce the no.of file updates in this PR.
-
To improve code readability, can you please add some form of example doc tests ?
Example
def factorial(n):
"""Return the factorial of n, an exact integer >= 0.
>>> factorial(5)
120
"""
import math
if not n >= 0:
raise ValueError("n must be >= 0")
...
...
return result
- Please use a new test.py file. preferable a new folder.
Hey @msampathkumar @Sita04 I have broken down this PR into these PRs: https://github.com/GoogleCloudPlatform/python-docs-samples/pull/12475 https://github.com/GoogleCloudPlatform/python-docs-samples/pull/12477 https://github.com/GoogleCloudPlatform/python-docs-samples/pull/12479 https://github.com/GoogleCloudPlatform/python-docs-samples/pull/12480 https://github.com/GoogleCloudPlatform/python-docs-samples/pull/12481
Thanks @vipul7499 Let's go ahead and close this PR.