Skip to content

fix: FileNotFound error on CSVDataset#1342

Merged
lrcouto merged 4 commits intomainfrom
nightly-failure-test-pass-credentials-error
Mar 9, 2026
Merged

fix: FileNotFound error on CSVDataset#1342
lrcouto merged 4 commits intomainfrom
nightly-failure-test-pass-credentials-error

Conversation

@lrcouto
Copy link
Copy Markdown
Contributor

@lrcouto lrcouto commented Mar 8, 2026

Description

The nightly CI was failing on this test for the CSVDataset.

I think the reason for it might be a change in s3fs >= 2025.7.0 (specifically the split_path trailing-slash fix in 2026.2.0). When glob() is called on a path in an empty S3 bucket, newer s3fs versions raise FileNotFoundError instead of returning an empty list. The CSVDataset._exists() method calls file_system.glob() but didn't handle this exception, causing it pop a DatasetError.

Wrapping the glob() call in _exists() with a try/except FileNotFoundError, returning False when the exception is raised should fix the issue.

Development notes

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Updated jsonschema/kedro-catalog-X.XX.json if necessary
  • Added a description of this change in the relevant RELEASE.md file
  • Added tests to cover my changes
  • Received approvals from at least half of the TSC (required for adding a new, non-experimental dataset)

Signed-off-by: Laura Couto <laurarccouto@gmail.com>
@lrcouto lrcouto changed the title Attempt to fix build failure fix: Attempt to fix build failure Mar 8, 2026
lrcouto added 3 commits March 8, 2026 12:53
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
@lrcouto lrcouto changed the title fix: Attempt to fix build failure fix: FileNotFound error on CSVDataset Mar 9, 2026
@lrcouto lrcouto marked this pull request as ready for review March 9, 2026 00:44
Copy link
Copy Markdown
Member

@merelcht merelcht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lrcouto ! LGTM 👍

Copy link
Copy Markdown
Contributor

@ankatiyar ankatiyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lrcouto!

@lrcouto lrcouto merged commit de047f5 into main Mar 9, 2026
23 checks passed
@lrcouto lrcouto deleted the nightly-failure-test-pass-credentials-error branch March 9, 2026 12:40
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