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

Adds pagination to viz cache archiving script #586

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Conversation

shawncrawley
Copy link
Collaborator

The boto3 S3 client function list_objects_v2 has a max result count of 1000 objects. There are more objects than this in many of the viz_cache folders that are being searched and we've already had one case of matching objects being missed because they weren't included in that 1000 results. This PR replaces the basic list_objects_v2 function with a paginator-wrapped version that will continue grabbing 1000 object batches until they all have been checked.

@nickchadwick-noaa nickchadwick-noaa merged commit 71bb6fc into ti Dec 12, 2023
1 check passed
@nickchadwick-noaa nickchadwick-noaa deleted the quick-fix branch December 12, 2023 19:15
nickchadwick-noaa pushed a commit that referenced this pull request Feb 21, 2024
The boto3 S3 client function `list_objects_v2` has a max result count of
1000 objects. There are more objects than this in many of the
`viz_cache` folders that are being searched and we've already had one
case of matching objects being missed because they weren't included in
that 1000 results. This PR replaces the basic `list_objects_v2` function
with a paginator-wrapped version that will continue grabbing 1000 object
batches until they all have been checked.
@nickchadwick-noaa nickchadwick-noaa added this to the V2.1.5 milestone Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants