feat(sdk/js): add OSSFS volume backend support#515
Merged
ninan-nn merged 2 commits intoalibaba:mainfrom Mar 25, 2026
Merged
Conversation
Add Alibaba Cloud OSSFS mount backend to the JavaScript/TypeScript sandbox SDK, aligning it with the Python SDK implementation. Changes: - Add OSSFS interface to models/sandboxes.ts with full type definitions (bucket, endpoint, version, options, accessKeyId, accessKeySecret) - Update Volume interface to include ossfs as a third backend option - Update volume validation in sandbox.ts to check [host, pvc, ossfs] - Export OSSFS type from index.ts - Add 3 tests: OSSFS volume creation, no-backend rejection, multi-backend rejection Partially addresses alibaba#476 (SDK parity gaps - OSSFS support)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 55704bb598
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Address Codex review feedback: use `!= null` instead of `!== undefined`
so that JSON-normalized null optionals (e.g. `{ ossfs: null }`) are
correctly treated as absent rather than counting as a specified backend.
Add test case to verify null backends do not trigger multi-backend error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Alibaba Cloud OSSFS mount backend support to the JavaScript/TypeScript sandbox SDK, aligning it with the Python SDK which already supports OSSFS.
Changes:
models/sandboxes.ts: AddOSSFSinterface with full type definitions (bucket,endpoint,version,options,accessKeyId,accessKeySecret)models/sandboxes.ts: UpdateVolumeinterface to includeossfsas a third backend option alongsidehostandpvcsandbox.ts: Update volume validation to check[host, pvc, ossfs]backendsindex.ts: ExportOSSFStype for SDK consumerstests/sandbox.create.test.mjs: Add 3 test cases for OSSFS volumesPartially addresses #476 (SDK parity gaps — OSSFS support for JavaScript SDK).
Testing
tsc --noEmitpasses)Breaking Changes
The
Volumeinterface is extended with an optionalossfsfield. Existing code usinghostorpvcbackends is unaffected.Checklist