Skip to content

Comments

refactor: Introduce IpmfsCore for improved service structure#5980

Merged
Xuanwo merged 2 commits intoapache:mainfrom
miroim:split-ipmfs-core
Apr 8, 2025
Merged

refactor: Introduce IpmfsCore for improved service structure#5980
Xuanwo merged 2 commits intoapache:mainfrom
miroim:split-ipmfs-core

Conversation

@miroim
Copy link
Member

@miroim miroim commented Apr 7, 2025

Which issue does this PR close?

Part of #5702
Part of #5677

Rationale for this change

What changes are included in this PR?

  • This pull request refactors the IpmfsBackend by introducing a new IpmfsCore struct to encapsulate the core functionality and state. The changes aim to improve code organization and maintainability.
  • Use the http_client from AccessorInfo, instead of directly accessing the backend, to migrate the service to a context-based http client.

Are there any user-facing changes?

No

Behavior tests log

cargo test behavior --features tests,services-ipmfs -- --show-output
    Finished `test` profile [unoptimized + debuginfo] target(s) in 1.19s
     Running unittests src\lib.rs (target\debug\deps\opendal-bcda60b7dff17fe0.exe)

running 0 tests

successes:

successes:

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

     Running tests\behavior\main.rs (target\debug\deps\behavior-3751b30d6263eaa2.exe)

running 101 tests
test behavior::test_delete_empty_dir                          ... ok
test behavior::test_delete_stream                             ... ok
test behavior::test_delete_with_version                       ... ok
test behavior::test_batch_delete                              ... ok
test behavior::test_delete_with_not_existing_version          ... ok
test behavior::test_batch_delete_with_version                 ... ok
test behavior::test_list_with_start_after                     ... ok
test behavior::test_list_non_exist_dir_with_recursive         ... ok
test behavior::test_delete_not_existing                       ... ok
test behavior::test_list_non_exist_dir                        ... ok
test behavior::test_check                                     ... 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_sub_dir                              ... ok
test behavior::test_read_full                                 ... ok
test behavior::test_delete_with_special_chars                 ... 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_read_not_exist                            ... 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_read_with_dir_path                        ... ok
test behavior::test_delete_file                               ... ok
test behavior::test_read_with_override_cache_control          ... ok
test behavior::test_read_with_override_content_disposition    ... ok
test behavior::test_read_with_override_content_type           ... ok
test behavior::test_read_with_version                         ... ok
test behavior::test_read_with_not_existing_version            ... ok
test behavior::test_list_file_with_recursive                  ... ok
test behavior::test_stat_dir                                  ... ok
test behavior::test_stat_nested_parent_dir                    ... ok
test behavior::test_list_dir_with_file_path                   ... ok
test behavior::test_list_prefix                               ... ok
test behavior::test_list_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_exist                            ... ok
test behavior::test_write_with_empty_content                  ... ok
test behavior::test_write_with_dir_path                       ... ok
test behavior::test_read_range                                ... 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_list_nested_dir                           ... ok
test behavior::test_writer_write                              ... ok
test behavior::test_read_with_special_chars                   ... ok
test behavior::test_writer_write_with_concurrent              ... 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_remove_one_file                           ... 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_with_concurrent              ... ok
test behavior::test_stat_file                                 ... ok
test behavior::test_list_dir_with_recursive                   ... ok
test behavior::test_stat_not_cleaned_path                     ... ok
test behavior::test_list_dir_with_recursive_no_trailing_slash ... ok
test behavior::test_blocking_read_not_exist                   ... ok
test behavior::test_blocking_stat_dir                         ... ok
test behavior::test_write_only                                ... ok
test behavior::test_blocking_stat_not_exist                   ... ok
test behavior::test_blocking_read_full                        ... ok
test behavior::test_writer_abort                              ... ok
test behavior::test_write_with_special_chars                  ... ok
test behavior::test_remove_all                                ... ok
test behavior::test_stat_with_special_chars                   ... ok
test behavior::test_blocking_delete_file                      ... ok
test behavior::test_blocking_stat_file                        ... ok
test behavior::test_blocking_remove_one_file                  ... ok
test behavior::test_blocking_write_with_special_chars         ... ok
test behavior::test_blocking_write_returns_metadata           ... ok
test behavior::test_blocking_write_file                       ... ok
test behavior::test_blocking_write_with_dir_path              ... ok
test behavior::test_blocking_read_range                       ... ok
test behavior::test_list_rich_dir                             ... ok
test behavior::test_blocking_stat_with_special_chars          ... ok
test behavior::test_reader                                    ... ok
test behavior::test_writer_write_with_overwrite               ... ok
test behavior::test_list_root_with_recursive                  ... ok
test behavior::test_list_empty_dir                            ... ok

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

@miroim miroim requested a review from Xuanwo as a code owner April 7, 2025 17:49
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. core services/ipmfs labels Apr 7, 2025
@miroim miroim changed the title Split ipmfs core refactor: Introduce IpmfsCore for improved service structure Apr 7, 2025
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 your work!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 8, 2025
@Xuanwo Xuanwo merged commit cee689d into apache:main Apr 8, 2025
91 checks passed
@miroim miroim deleted the split-ipmfs-core branch April 8, 2025 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core lgtm This PR has been approved by a maintainer services/ipmfs size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants