Uh oh!
There was an error while loading. Please reload this page.
add test for filesystem plugins - #1221
Conversation
Uh oh!
There was an error while loading. Please reload this page.
yongtang
commented
Dec 9, 2020
@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 |
vnghia
commented
Dec 18, 2020
Do you have any thought about this approach ? Thank you ! |
yongtang
commented
Dec 18, 2020
@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.
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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
yongtang
commented
Jan 4, 2021
@vnvo2409 Sounds good to me 👍. Let me know when the PR draft is ready |
f56309a to
ba5b62dComparevnghia
commented
Feb 14, 2021
@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 |
yongtang
commented
Feb 16, 2021
@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)? |
yongtang
commented
Feb 16, 2021
@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 |
vnghia
commented
Feb 16, 2021
@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 |
yongtang
commented
Feb 16, 2021
@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
0db0cc7Comparevnghia
commented
Mar 5, 2021
@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 |
yongtang
commented
Mar 5, 2021
@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. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
yongtang
left a comment
There was a problem hiding this comment.
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`
* 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