-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Go SDK: Update memfs to parse the List() pattern as a glob, not a regexp #21943
Conversation
…exp. This makes the memfs implementation consistent with the filesystem implementation of List(). The docstring for filesystem.Interface.List does not specify how the pattern should be interpretted. It says: "List expands a pattern to a list of filenames." Perhaps that docstring should be updated to be more specific.
Can one of the admins verify this patch? |
4 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Codecov Report
@@ Coverage Diff @@
## master #21943 +/- ##
==========================================
+ Coverage 73.98% 74.00% +0.02%
==========================================
Files 702 703 +1
Lines 92845 92934 +89
==========================================
+ Hits 68687 68777 +90
+ Misses 22903 22892 -11
- Partials 1255 1265 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Assigning reviewers. If you would like to opt out of this review, comment R: @damccorm for label go. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll ask @lostluck to weigh in here since I'm not super up to date on how aggressively we want to work to unify our IO behavior, but I don't think we can take this since it will break any existing users (especially since its breaking in a silent/potential data-lossy way).
In a vacuum I agree that unifying behavior is a good idea, so this could be a good candidate if we upgrade major versions eventually, or if we can find a less breaking way to do this (which seems kinda unlikely)
In this instance, I think we should change it.
Looking at the local and gcs implementations, they use filepath.Match/Glob instead of plain path.Match. filepath is OS separator aware. A github search doesn't reveal any usage, and neither does the pkg page for v2. Checking the pre-modules version has 1 package that hasn't updated in 3 years, and doesn't use it explicitly (but does use local and gcs). As a result, I think a move towards consistency, and documenting the behavior is the right one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change request, but otherwise this LGTM.
Also, accept input without a "memfs://" prefix.
I'm not sure what the etiquette is for resolving comments on github, but I think I addressed the comment, so I resolved it. |
Reminder, please take a look at this pr: @damccorm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank your for your patience and sorry for the delay! This one slipped through the cracks.
Beam's usual standard is if the comment is to mark the comment resolved, which at least also emails folks subscribed to the issue.
This makes the memfs implementation consistent with the filesystem
implementation of List().
The docstring for filesystem.Interface.List does not specify how the pattern
should be interpretted. It says: "List expands a pattern to a list of
filenames." Perhaps that docstring should be updated to be more specific.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).addresses #123
), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, commentfixes #<ISSUE NUMBER>
instead.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)
See CI.md for more information about GitHub Actions CI.