Skip to content

fix(oss): use S3-compatible storage for MinIO#1816

Open
guslegend0510 wants to merge 10 commits into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1795-oss-minio
Open

fix(oss): use S3-compatible storage for MinIO#1816
guslegend0510 wants to merge 10 commits into
agentscope-ai:mainfrom
guslegend0510:fix/issue-1795-oss-minio

Conversation

@guslegend0510

@guslegend0510 guslegend0510 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

AgentScope-Java Version

2.0.0-SNAPSHOT

Description

This PR updates the OSS extension to use AWS SDK v2 S3-compatible storage, centralizes the object-store helper logic, adds tests, and updates the docs to describe the module as S3-compatible object storage support rather than Alibaba OSS-only support.

The OSS module was using the Alibaba Cloud OSS SDK, which is not compatible with MinIO and other generic S3-compatible stores in this project scenario. This PR switches the storage layer to AWS SDK v2 S3Client and keeps the existing Oss* API surface so downstream code can keep working.

How this fixes the issue

  • Replace Alibaba OSS calls with S3-compatible operations for put/get/list/delete.
  • Add S3ObjectStoreSupport to centralize shared S3 object-store logic.
  • Update OssAgentStateStore, OssBaseStore, OssDistributedStore, OssRemoteSnapshotClient, and OssSnapshotSpec to use the new S3-backed implementation.
  • Keep ossClient(...) as a backwards-compatible builder alias, so existing callers do not need to change immediately.
  • Update docs and tests to show MinIO / S3-compatible usage.
  • Fix .list.json entries being picked up as regular filesystem items, and make truncated-list handling null-safe in tests.

Verification

  • mvn -s codex-settings.xml -pl agentscope-extensions/agentscope-extensions-oss test -DskipITs
  • mvn -s codex-settings.xml -pl agentscope-extensions/agentscope-extensions-oss -DskipTests test-compile

Fixes #1795

Checklist

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

@guslegend0510 guslegend0510 requested a review from a team June 18, 2026 00:56
@AgentScopeJavaBot AgentScopeJavaBot added bug Something isn't working area/extensions agentscope-extensions (general) area/docs Documentation labels Jun 18, 2026
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤖 AI Review

@guslegend0510

Copy link
Copy Markdown
Contributor Author

@chickenlj 你好,能帮我审核一下吗,谢谢您

@chickenlj

Copy link
Copy Markdown
Collaborator

Is aws sdk fully compatible with Alibaba Cloud OSS? replace current one or provide a new extension, which do you think is better?

@guslegend0510

Copy link
Copy Markdown
Contributor Author

Good point. This PR is not meant to claim that the AWS SDK is a 1:1 replacement for the Alibaba Cloud OSS SDK. The OSS module is now a compatibility layer for S3-compatible object storage, implemented with AWS SDK v2 S3Client, so it can target MinIO / AWS S3 / Alibaba Cloud OSS endpoints without changing the public API.

I kept the existing agentscope-extensions-oss module and the ossClient(...) alias for backward compatibility. If the project prefers provider-specific separation, that can be a follow-up extension, but for this fix I think keeping the current module and broadening its backend support is the least disruptive option. @chickenlj

@guslegend0510

Copy link
Copy Markdown
Contributor Author

This PR updates the OSS-backed distributed storage implementation to use the AWS SDK v2 S3Client against S3-compatible storage (for example MinIO, AWS S3, or Alibaba Cloud OSS) instead of relying on the Alibaba OSS SDK.

What changed:

  • Refactored the OSS storage helpers to use the S3 API and path-style access for S3-compatible endpoints.
  • Added unit tests for the new S3 object store support layer and the remote snapshot client.
  • Updated the documentation to describe the module as S3-compatible object storage.
  • Kept live E2E tests opt-in and added the shared E2E test condition to the extension test modules so CI does not run external-service tests by default.
  • Removed the now-unneeded Alibaba OSS dependency from agentscope-core.
  • Adjusted Codecov so docs, test sources, and pom.xml changes do not count toward patch coverage.

Closes #1795.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation area/extensions agentscope-extensions (general) bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]:oss 模块是否考虑使用 awssdk 目前阿里云的 sdk 各种不兼容 minio 都存不进去

4 participants