-
Notifications
You must be signed in to change notification settings - Fork 78
Default workspace support when deploy at modelstudio #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add default value handling when reading workspace ID from environment variables Remove mandatory validation requirement for workspace ID Generate more reasonable OSS bucket names based on workspace ID during upload Dynamically inject the workspace ID from the environment into deployment results
- 删除了测试中对 artifact_url 为空字符串的断言-保持其他断言不变,确保资源名称和 wheel 路径正确
- 删除了对已弃用字段artifact_url的断言检查-保留了resource_name和wheel_path的有效性验证- 确保测试用例与当前部署逻辑保持一致
- 在单元测试工作流中安装 deployment依赖项 -保持其他依赖项不变 - 确保持续集成环境包含所有必需的包
…版本至 >=2.6.0 - 移除测试中的 OSS 配置相关代码 - 简化 ModelstudioDeployManager 初始化逻辑 - 移除与 OSS 相关的模拟调用断言 - 修改默认工作空间 ID 为 default- 调整部署参数验证逻辑以适应新配置结构
-为两个部署测试函数添加跳过标记 - 暂时禁用依赖外部清理功能的测试 - 避免测试执行后遗留云端资源 - 等待实现自动删除应用功能后再启用测试
src/agentscope_runtime/engine/deployers/modelstudio_deployer.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the ModelStudio deployment process to use Alibaba Cloud's temporary storage lease API instead of directly managing OSS buckets. The key changes include simplifying the upload flow, adding default workspace handling, and updating tests accordingly.
Key changes:
- Replaced direct OSS bucket management with temporary storage lease API for file uploads
- Added "default" workspace_id fallback when environment variable is empty or missing
- Updated SDK version requirement from 2.5.0 to 2.6.0
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/agentscope_runtime/engine/deployers/modelstudio_deployer.py |
Refactored upload mechanism to use temporary storage lease API, removed OSS-related code from upload flow, added workspace_id default handling, and enhanced error messages |
tests/unit/test_modelstudio_deployer.py |
Updated tests to remove OSS mocks, changed workspace_id to "default", removed artifact_url assertions, and added skip markers for upload tests |
pyproject.toml |
Bumped alibabacloud-bailian20231229 dependency from >=2.5.0 to >=2.6.0 |
examples/deployments/modelstudio_deploy/app_deploy_to_modelstudio.py |
Removed artifact_url from output display |
.github/workflows/unit_test.yml |
Added deployment extras to test dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/agentscope_runtime/engine/deployers/modelstudio_deployer.py
Outdated
Show resolved
Hide resolved
|
@all-contributors please add @taoquanyus for code. |
|
I've put up a pull request to add @taoquanyus! 🎉 |
Description
Related Issue: Fixes #[issue_number] or Relates to #[issue_number]
Security Considerations: [If applicable, especially for sandbox changes]
Type of Change
Component(s) Affected
Checklist
Testing
[How to test these changes]
Additional Notes
[Optional: any other context]