apache / apache/opendal

test(services/cos): skip create-dir list checks that require strong list consistency

Open Beginner friendly
#7,502 0 comments 1 reaction 0 assignees View on GitHub
services/cos
Dominant language
Rust
Stars
5.4k
Forks
825
Avg merge
1d 14m
Merged PRs (30d)
127

Description

## Problem

`behavior::test_list_sub_dir` can fail for COS after creating a directory marker and immediately listing the bucket root:

```text
dir should be found in list
```

OpenDAL simulates `create_dir` for COS by writing an empty object at `/`. The test then immediately calls `list("/")` and expects the new directory marker to be returned.

## Root cause

Tencent COS documents that GET Bucket / List Objects is eventually consistent after uploads. If an object is uploaded and GET Bucket is called immediately, the returned result may not include the newly uploaded object.

Reference: https://www.tencentcloud.com/document/product/436/30614/

## Expected handling

Behavior tests that require immediate read-after-write visibility through COS ListObjects should be skipped for COS, because the service contract does not provide the required strong list consistency.

Contributor guide

Open the contributing guide

Research direction

Start with the behavior::test_list_sub_dir behavior test and the COS service test setup. Run the relevant behavior tests to reproduce the immediate listing failure, then verify that list-consistency checks are skipped for COS while remaining enabled for services with strong consistency.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.