fix: aws filter fallback and chunks sorting - #2342
Open
anesson-cs wants to merge 5 commits into
Open
anesson-cs wants to merge 5 commits into
anesson-cs wants to merge 5 commits into
Conversation
Contributor
Benchmark comparisonCompared baseline: |
Contributor
Contributor
Code Coverage (Ubuntu)DetailsDiff against developResults for commit: 4a02a64 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Contributor
Code Coverage (Windows)DetailsDiff against developResults for commit: 4a02a64 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
remove a lot of linter 'ruff' warnings use 'mypy_boto3_s3' classes for typing
anesson-cs
force-pushed
the
aws-objects-filter
branch
from
September 3, 2026 16:55
db354cf to
8dc41dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
While downloading
COP-DEMproducts withcreodias_s3, the exceptionNoMatchingCollection("No product found to download.")was raised. This PR fixes this by handlingmypy_boto3_s3.service_resource.BucketObjectsCollection.filter()in any case (with a prefix ending with a slash or not) with a fallback mechanism. The first try is by passing in parameter tofilter()the prefix without a slash. Iffilter()return an empty list, the slash is added to the parameter and the list will not be empty anymore.Then, a process allow to keep only chunks which are:
sizeattributesizeattributesizeattribute.This allow to ignore
S3directory markers and sibling files.Additional information
Furthermore, a lot of linter 'ruff' warnings are removed and some AWS classes from library
mypy_boto3_s3are used for typing.