opendal icon indicating copy to clipboard operation
opendal copied to clipboard

Tracking issue: refactor `versioning` tests after the `write` operation is updated to return the version ID

Open meteorgan opened this issue 1 year ago • 2 comments

Currently, the write operation does not return any metadata. As a result, in PR #5132, all versioning tests utilize the stat operation to retrieve the current object versions. Once the write operation is update to return the version ID, we can eliminate the need for these additional stat operations.

meteorgan avatar Sep 23 '24 15:09 meteorgan

Hi, I think this issue is part of a bigger scope that returning metadata after writing. This will require a major refactor of our write-related public API.

Xuanwo avatar Sep 23 '24 16:09 Xuanwo

Hi, I think this issue is part of a bigger scope that returning metadata after writing. This will require a major refactor of our write-related public API.

Yes. as I mentioned in: https://github.com/apache/opendal/issues/2611#issuecomment-2363304110. I'll submit a RFC for this. This issue serves as a reminder to refactor the code in #5132.

meteorgan avatar Sep 24 '24 02:09 meteorgan

I'm considering whether we really need this, as not all services can return a version. We still need to use stat in some scenarios. Checking the metadata returned from write could make the tests more complicated.

meteorgan avatar Feb 18 '25 13:02 meteorgan

Services that support versioning seem to allow retrieving the version after writing. I have checked S3, GCS, and Azblob. Not sure about other services.

Xuanwo avatar Feb 19 '25 01:02 Xuanwo

I'm considering whether we really need this, as not all services can return a version. We still need to use stat in some scenarios. Checking the metadata returned from write could make the tests more complicated.

Let's close this...

Xuanwo avatar Mar 12 '25 13:03 Xuanwo