Skip to content

feat: Add scaling configuration support to Sync command and enhance t… - #131

Merged
rsonghuster merged 1 commit into
masterfrom
fix-sync
Dec 31, 2025
Merged

rsonghuster merged 1 commit into
masterfrom
fix-sync

Conversation

@mozhou52

Copy link
Copy Markdown
Collaborator

…ests

  • Add ScalingPolicy import from @alicloud/fc20230330
  • Implement getFunctionScalingConfig functionality in Sync class
  • Handle scaling configuration in the write method with proper processing
  • Add proper handling for elastic instances and horizontal scaling policies
  • Fix test file by mocking ScalingPolicy import to resolve test failures
  • Add comprehensive tests for scaling configuration functionality
  • Enhance existing tests to cover the new scaling config features
  • Update method signatures to include scalingConfig parameter

@mozhou52
mozhou52 requested a review from rsonghuster December 30, 2025 07:27
Comment thread src/subCommands/sync/index.ts Outdated
props.scalingConfig = {
minInstances: provisionConfig.defaultTarget || 0,
currentInstances: provisionConfig.current || 0,
targetInstances: provisionConfig.defaultTarget || 0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. provisionConfig 没有 targetInstances?
  2. currentInstances 和 targetInstances 是不是不用在导出中展示啊, 这个都是内部中间过程的东西
  3. enableOnDemandScaling 这个是什么?API 中有吗?

if (isElasticInstance) {
props.provisionConfig = provisionConfig;
delete props.scalingConfig;
} else {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

这 else 的逻辑是不是只需要保留 scalingconfig, delete 掉 provisionConfig 就好呢

…ests

- Add ScalingPolicy import from @alicloud/fc20230330
- Implement getFunctionScalingConfig functionality in Sync class
- Handle scaling configuration in the write method with proper processing
- Add proper handling for elastic instances and horizontal scaling policies
- Fix test file by mocking ScalingPolicy import to resolve test failures
- Add comprehensive tests for scaling configuration functionality
- Enhance existing tests to cover the new scaling config features
- Update method signatures to include scalingConfig parameter

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@rsonghuster
rsonghuster merged commit 39c3d67 into master Dec 31, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants