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

dagster-aws get_objects() function returns all objects if none are new #25890

Open
kev-sweet opened this issue Nov 13, 2024 · 0 comments · May be fixed by #25891
Open

dagster-aws get_objects() function returns all objects if none are new #25890

kev-sweet opened this issue Nov 13, 2024 · 0 comments · May be fixed by #25891
Labels
integration: aws Related to dagster-aws type: bug Something isn't working

Comments

@kev-sweet
Copy link

kev-sweet commented Nov 13, 2024

What's the issue?

When using the new optional since_last_modified parameter in cases where there are no new files, the return value of the function is the entire sorted list when it should be an empty list. To fix:

if since_last_modified:
        for idx, obj in enumerate(sorted_objects):
            if obj.get("LastModified") > since_last_modified:
                return sorted_objects[idx:]
        return []

What did you expect to happen?

To return an empty list representing that there are no new s3 objects uploaded since the provided timestamp.

How to reproduce?

Query an S3 source with no new objects since a provided timestamp.

Dagster version

dagster, version 1.8.13

Deployment type

Dagster Cloud

Deployment details

No response

Additional information

PR for fix

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
By submitting this issue, you agree to follow Dagster's Code of Conduct.

@kev-sweet kev-sweet added the type: bug Something isn't working label Nov 13, 2024
@garethbrickman garethbrickman added the integration: aws Related to dagster-aws label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: aws Related to dagster-aws type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants