-
Notifications
You must be signed in to change notification settings - Fork 293
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
add test for filesystem plugins #1221
Conversation
@vnvo2409 parameterized pytest looks good! This can help standardize the file system implementations. |
@yongtang |
One more thing. I find it hard to test the plugins with environment variables. Because most filesystems like I am thinking of introduce a new env |
Do you have any thought about this approach ? Thank you ! |
@vnvo2409 I think one concern is that when you change the configuration/initialization, the change applies process wise - meaning all current ongoing pytests (within the same process) will be impacted. Unless we can force pytest to run in a sequence order then there might have unintended effect. One test belonging to one group may get into the way of another test belonging to another group (with different intended settings)? |
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 am trying to elaborate what I am understand. In summary, there are 2 layers of isolation ( explained below, you could see that I don't use any os.environ
for setting env ). So I think these tests won't clash with each other. Please tell me if there are something unclear.
@vnvo2409 Sounds good to me 👍. Let me know when the PR draft is ready |
f56309a
to
ba5b62d
Compare
@yongtang Sorry for putting this PR on hold for too long. Could you take a look please ? I will add some more tests ( mostly directory-related ) in later PRs. Thank you ! In addition, I've already exposed |
@vnvo2409 The PR looks good! There are a couple of test failures on Linux, can you take a look (or disable it temporarily for now)? |
@vnvo2409 For gcs the plan is to enable modular file system (and use TF_ENABLE_LEGACY_FILESYSTEM=1 to switch on/off) before the 2.5 branch and 2.5.0rc0 is out. Though I think we want to send out the email to community (tf developer google group) first so that people is prepared. /cc @mihaimaruseac |
@yongtang with io/tensorflow_io/core/plugins/gs/gcs_env.cc Lines 82 to 85 in ac75e1c
Nothing is related to the release plan I think. But we need the |
@vnvo2409 tensorflow-io is already using tf-nightly now (see https://github.com/tensorflow/io/blob/master/tensorflow_io/core/python/ops/version_ops.py), which was added as part of PR #1309 |
ea0cc58
to
0db0cc7
Compare
@yongtang I am so sorry that I will have to put it on hold for much longer. It has some weird errors and I don't have a linux machine right now. I will probably try it again when tf 2.5 is out and |
@yongtang It seems that the errors are from the upstream. I would like to ask if it is possible to switch to use |
@vnvo2409 That will be great and preferred 👍 |
@yongtang This PR is ready to merge. Turn out The philosophy of the test is still the same. But the filesystem are added manually instead of using parameterized tests which allows greater control and less generated tests. We can also write test for a specific filesystem and reuse the resources created in Still, testing with different envs right now aren't possible as the envs are read only once when the filesystem are loaded for the first time. It will be addressed along with #1342 and #1354. |
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. A couple of minor cosmetic comments though those can be updated in follow up PRs.
* add initial tests for s3 * add test for az * bump `azurite` to `3.12.0` * add `test_filesystem` to `api`
I can not merge this PR because of #1222 .
I would like to share with you how I think we should test the plugins. The idea is inspired by modular_filesystem_test. I used parameterized tests for control the plugins and environements variable. Please let me know what you think !
Part of #1183