Skip to content

Comments

refactor: Migrate etcd service to implement Access directly#6420

Merged
Xuanwo merged 2 commits intoapache:mainfrom
kingsword09:refactor-etcd-access
Aug 7, 2025
Merged

refactor: Migrate etcd service to implement Access directly#6420
Xuanwo merged 2 commits intoapache:mainfrom
kingsword09:refactor-etcd-access

Conversation

@kingsword09
Copy link
Contributor

Which issue does this PR close?

Part #5739

Rationale for this change

Part #5739

What changes are included in this PR?

Migrate etcd from adapter::kv to Access instead

Are there any user-facing changes?

@kingsword09 kingsword09 requested a review from Xuanwo as a code owner July 15, 2025 07:09
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" labels Jul 15, 2025
@kingsword09
Copy link
Contributor Author

OPENDAL_TEST=etcd cargo test behavior --features tests,services-etcd
warning: unused import: `api::ScanStdIter`
  --> src/raw/adapters/kv/mod.rs:32:16
   |
32 | pub(crate) use api::ScanStdIter;
   |                ^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: associated function `new` is never used
  --> src/raw/adapters/kv/api.rs:58:19
   |
53 | / impl<I> ScanStdIter<I>
54 | | where
55 | |     I: Iterator<Item = Result<String>> + Unpin + Send + Sync,
   | |_____________________________________________________________- associated function in this implementation
...
58 |       pub(crate) fn new(inner: I) -> Self {
   |                     ^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: `opendal` (lib test) generated 2 warnings (2 duplicates)
warning: `opendal` (lib) generated 2 warnings (run `cargo fix --lib -p opendal` to apply 1 suggestion)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 33.52s
     Running unittests src/lib.rs (target/debug/deps/opendal-4993604d2ea111a8)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 137 filtered out; finished in 0.00s

     Running tests/behavior/main.rs (target/debug/deps/behavior-182e790a06eacca9)

running 90 tests
test behavior::test_delete_not_existing                       ... ok
test behavior::test_delete_with_version                       ... ok
test behavior::test_delete_with_not_existing_version          ... ok
test behavior::test_batch_delete                              ... ok
test behavior::test_batch_delete_with_version                 ... ok
test behavior::test_delete_empty_dir                          ... ok
test behavior::test_create_dir                                ... ok
test behavior::test_check                                     ... ok
test behavior::test_create_dir_existing                       ... ok
test behavior::test_list_prefix                               ... ok
test behavior::test_delete_with_special_chars                 ... ok
test behavior::test_list_non_exist_dir                        ... ok
test behavior::test_list_dir                                  ... ok
test behavior::test_delete_file                               ... ok
test behavior::test_list_with_start_after                     ... ok
test behavior::test_list_non_exist_dir_with_recursive         ... ok
test behavior::test_list_empty_dir                            ... ok
test behavior::test_list_sub_dir                              ... ok
test behavior::test_list_dir_with_file_path                   ... ok
test behavior::test_list_file_with_recursive                  ... ok
test behavior::test_remove_one_file                           ... ok
test behavior::test_list_files_with_versions                  ... ok
test behavior::test_list_with_versions_and_limit              ... ok
test behavior::test_list_with_versions_and_start_after        ... ok
test behavior::test_list_files_with_deleted                   ... ok
test behavior::test_list_nested_dir                           ... ok
test behavior::test_read_range                                ... ok
test behavior::test_read_full                                 ... ok
test behavior::test_reader_with_if_match                      ... ok
test behavior::test_reader_with_if_none_match                 ... ok
test behavior::test_reader_with_if_modified_since             ... ok
test behavior::test_reader_with_if_unmodified_since           ... ok
test behavior::test_list_dir_with_recursive                   ... ok
test behavior::test_read_with_if_match                        ... ok
test behavior::test_read_with_if_none_match                   ... ok
test behavior::test_read_with_if_modified_since               ... ok
test behavior::test_read_with_if_unmodified_since             ... ok
test behavior::test_list_dir_with_recursive_no_trailing_slash ... ok
test behavior::test_read_not_exist                            ... ok
test behavior::test_read_with_override_cache_control          ... ok
test behavior::test_read_with_override_content_disposition    ... ok
test behavior::test_read_with_dir_path                        ... ok
test behavior::test_read_with_override_content_type           ... ok
test behavior::test_read_with_not_existing_version            ... ok
test behavior::test_read_with_version                         ... ok
test behavior::test_list_root_with_recursive                  ... ok
test behavior::test_stat_dir                                  ... ok
test behavior::test_list_rich_dir                             ... ok
test behavior::test_reader                                    ... ok
test behavior::test_stat_nested_parent_dir                    ... ok
test behavior::test_stat_with_if_match                        ... ok
test behavior::test_stat_with_if_none_match                   ... ok
test behavior::test_stat_with_if_modified_since               ... ok
test behavior::test_stat_with_if_unmodified_since             ... ok
test behavior::test_stat_with_override_cache_control          ... ok
test behavior::test_stat_with_override_content_disposition    ... ok
test behavior::test_stat_with_override_content_type           ... ok
test behavior::test_stat_root                                 ... ok
test behavior::test_stat_with_version                         ... ok
test behavior::stat_with_not_existing_version                 ... ok
test behavior::test_stat_not_cleaned_path                     ... ok
test behavior::test_stat_with_special_chars                   ... ok
test behavior::test_write_with_dir_path                       ... ok
test behavior::test_read_with_special_chars                   ... ok
test behavior::test_write_with_cache_control                  ... ok
test behavior::test_write_with_content_type                   ... ok
test behavior::test_write_with_content_disposition            ... ok
test behavior::test_write_with_content_encoding               ... ok
test behavior::test_write_with_if_none_match                  ... ok
test behavior::test_write_with_if_not_exists                  ... ok
test behavior::test_write_with_if_match                       ... ok
test behavior::test_write_with_user_metadata                  ... ok
test behavior::test_stat_file                                 ... ok
test behavior::test_writer_write                              ... ok
test behavior::test_stat_not_exist                            ... ok
test behavior::test_writer_write_with_concurrent              ... ok
test behavior::test_write_with_empty_content                  ... ok
test behavior::test_writer_sink                               ... ok
test behavior::test_writer_sink_with_concurrent               ... ok
test behavior::test_write_returns_metadata                    ... ok
test behavior::test_writer_futures_copy                       ... ok
test behavior::test_writer_futures_copy_with_concurrent       ... ok
test behavior::test_writer_return_metadata                    ... ok
test behavior::test_writer_abort                              ... ok
test behavior::test_writer_abort_with_concurrent              ... ok
test behavior::test_write_with_special_chars                  ... ok
test behavior::test_write_only                                ... ok
test behavior::test_remove_all                                ... ok
test behavior::test_writer_write_with_overwrite               ... ok
test behavior::test_delete_stream                             ... ok

test result: ok. 90 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 17.03s

@kingsword09 kingsword09 force-pushed the refactor-etcd-access branch from d72fcac to 1560545 Compare August 7, 2025 07:52
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this!

@Xuanwo Xuanwo merged commit 3a295a8 into apache:main Aug 7, 2025
89 checks passed
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants