Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(secretmanager): Use retry-wrapper for function calls to avoid flaky bot issues #10784

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

Merged
merged 11 commits into from
Oct 27, 2023

Conversation

msampathkumar
Copy link
Member

@msampathkumar msampathkumar commented Oct 19, 2023

Description

Add fix flaky bot issues in snippet's test file.

Fixes

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

@product-auto-label product-auto-label bot added api: secretmanager Issues related to the Secret Manager API. samples Issues that are directly related to samples. labels Oct 19, 2023
@msampathkumar msampathkumar marked this pull request as ready for review October 19, 2023 14:59
@msampathkumar msampathkumar requested review from a team as code owners October 19, 2023 14:59
@msampathkumar
Copy link
Member Author

Working on following error

Traceback (most recent call last):
  File "/workspace/secretmanager/snippets/snippets_test.py", line 156, in secret_version
    parent = retry_client_create_secret(client, secret_id)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/secretmanager/snippets/.nox/py-3-11/lib/python3.11/site-packages/google/api_core/retry.py", line 366, in retry_wrapped_func
    return retry_target(
           ^^^^^^^^^^^^^
  File "/workspace/secretmanager/snippets/.nox/py-3-11/lib/python3.11/site-packages/google/api_core/retry.py", line 204, in retry_target
    return target()
           ^^^^^^^^
  File "/workspace/secretmanager/snippets/snippets_test.py", line 82, in retry_client_create_secret
    return client.create_secret(request=request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/secretmanager/snippets/.nox/py-3-11/lib/python3.11/site-packages/google/cloud/secretmanager_v1/services/secret_manager_service/client.py", line 715, in create_secret
    request = service.CreateSecretRequest(request)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/workspace/secretmanager/snippets/.nox/py-3-11/lib/python3.11/site-packages/proto/message.py", line 547, in __init__
    raise TypeError(
TypeError: Invalid constructor input for CreateSecretRequest: 'python-secret-58880050-69dc-4164-8ed9-6fb89055469f'

secretmanager/snippets/snippets_test.py Outdated Show resolved Hide resolved
@msampathkumar msampathkumar added the automerge Merge the pull request once unit tests and other checks pass. label Oct 27, 2023
@gcf-merge-on-green gcf-merge-on-green bot merged commit ee616fe into main Oct 27, 2023
@gcf-merge-on-green gcf-merge-on-green bot deleted the b_305503905 branch October 27, 2023 11:38
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: secretmanager Issues related to the Secret Manager API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.