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

Tracking issues of OpenDAL capability migration #2060

Closed
9 of 31 tasks
Xuanwo opened this issue Apr 21, 2023 · 4 comments · Fixed by #2215
Closed
9 of 31 tasks

Tracking issues of OpenDAL capability migration #2060

Xuanwo opened this issue Apr 21, 2023 · 4 comments · Fixed by #2215
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Xuanwo
Copy link
Member

Xuanwo commented Apr 21, 2023

Please leave comments on the task you want to take, have fun!


#2057 introduces a new concept of capability. With which we can represents a service capability:

  • Whether current Operator supports read or not.
  • Whether current Operator supports read with if match or not.
  • What’s current Operator max supports batch operations count.

However, most of our code are not migrated to capability yet.

Migrate service capability

We used to use read to cover read/stat and use write to cover write/delete/create_dir. In capability, we split them all, so we need to check and add them. Also, some newly added args are not covered.

So, we need to:

  • Add missing operations for services, like stat, delete and create_dir.
  • Add missing args for services, like stat_with_if_match

The final version should be like azblob:

https://github.com/apache/incubator-opendal/blob/80ab41940d1e8835ef611b9906c21d8734b63cf9/core/src/services/azblob/backend.rs#L454-L472

We need to check for all services:

  • azdfs
  • dashmap
  • fs
  • ftp
  • gcs
  • ghac
  • hdfs
  • http
  • ipfs
  • ipmfs
  • memcached
  • memory
  • moka
  • obs
  • oss
  • redis
  • rocksdb
  • s3
  • sled
  • wasabi
  • webdav
  • webhdfs

Add new tests

After new capability like read_if_match added, we can write behavior tests on them.

For example, we can design a test of read_if_match like:

  • Return directly if read_if_match is false
  • Create new file
  • Stat to get it's etag
  • Read file with correct etag should be ok
  • Read file with wrong etag should return PreconditionFailed error

Tasks:

@Xuanwo Xuanwo added good first issue Good for newcomers help wanted Extra attention is needed labels Apr 21, 2023
@Xuanwo
Copy link
Member Author

Xuanwo commented Apr 21, 2023

Hi, @STRRL, this issue will address the behavior tests for if-match, maybe you wanna to take a look?

@Xuanwo Xuanwo changed the title Tracking issues of OpenDAL capability Tracking issues of OpenDAL capability migration Apr 21, 2023
@suyanhanx
Copy link
Member

Seems that we could implement Capability and add tests for them one by one.

@suyanhanx

This comment was marked as resolved.

@Xuanwo

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants