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

The secrets_manager.get_paginator('list_secrets') fails since version 1.28.11 #3799

Closed
ashumkoska opened this issue Jul 27, 2023 · 3 comments
Assignees
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. pagination response-requested Waiting on additional information or feedback.

Comments

@ashumkoska
Copy link

Describe the bug

Since upgrading to version 1.28.11, the get_paginator('list_secrets') of the secrets manager started to fail with the Operation cannot be paginated: list_secrets error.

Expected Behavior

The expectation would be to get a paginated list of secrets as stated in some of the examples in the documentation.

Current Behavior

Instead getting a paginated list of secrets, we get the following error:

Traceback (most recent call last):
File "/opt/load_secrets/load_secrets", line 95, in
main()
File "/opt/load_secrets/load_secrets", line 86, in main
secrets = getattr(mgr_module, 'get_secrets')(args, dv, logger=logger)
File "/opt/load_secrets/aws_secrets_manager.py", line 34, in get_secrets
paginator = sm.get_paginator('list_secrets')
File "/usr/local/lib/python3.8/dist-packages/botocore/client.py", line 671, in get_paginator
raise OperationNotPageableError(operation_name=operation_name)
botocore.exceptions.OperationNotPageableError: Operation cannot be paginated: list_secrets

Reproduction Steps

The following chunk of code was working properly up to version 1.28.10, but started breaking with the latest versions of boto3:

...
sm = boto3.client('secretsmanager', region_name=region)

paginator = sm.get_paginator('list_secrets')
page_iterator = paginator.paginate()
...

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.28.11

Environment details (OS name and version, etc.)

EC2 / Ubuntu

@ashumkoska ashumkoska added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Jul 27, 2023
@tim-finnigan tim-finnigan self-assigned this Jul 27, 2023
@tim-finnigan
Copy link
Contributor

Hi @ashumkoska thanks for reaching out. I tried to reproduce this issue on Boto3 1.28.11 but was not able to. The following snippet returned the expected paginated response:

import boto3
 
client = boto3.client('secretsmanager')
 
paginator = client.get_paginator('list_secrets')
page_iterator = paginator.paginate()
 
for page in page_iterator:
    print(page)

Can you verify the Boto3/Botocore versions in your script using the following:

import boto3
import botocore
print(boto3.__version__)
print(botocore.__version__)

If still experiencing the issue, please share the full debug logs (with sensitive info redacted) by adding boto3.set_stream_logger('') to your script.

@tim-finnigan tim-finnigan added response-requested Waiting on additional information or feedback. pagination and removed bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Jul 27, 2023
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Aug 2, 2023
@ashumkoska
Copy link
Author

ashumkoska commented Aug 2, 2023

Hi @tim-finnigan! Thank you for looking into the issue. I tested it again with the latest version (1.28.17) and was not able to reproduce it. It seems like it has been fixed in some of the releases after 1.28.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. pagination response-requested Waiting on additional information or feedback.
Projects
None yet
Development

No branches or pull requests

2 participants