Implement DeploymentAutoScalingPolicyRow
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Overview
Create deployment_auto_scaling_policies table to replace endpoint_auto_scaling_rules. Implement single comparator/cooldown based policy model.
## Tasks
1. Create `deployment_auto_scaling_policies` table with columns: id, endpoint (unique), min_replicas, max_replicas, metric_source, metric_name, comparator, scale_up_threshold, scale_down_threshold, scale_up_step_size, scale_down_step_size, cooldown_seconds, last_scaled_at, created_at, updated_at
1. Implement `DeploymentAutoScalingPolicyRow` SQLAlchemy model
1. Add `AutoScalingMetricComparator` enum (>=, <=)
1. Add Repository methods: create_policy, get_policy, update_policy, delete_policy
1. Migrate existing endpoint_auto_scaling_rules data
1. Drop endpoint_auto_scaling_rules table after migration
1. Write unit tests
## Reference
- Design doc: docs/endpoint-model-restructure-TODO.md
JIRA Issue: BA-3421
Contributor guide
Assessment
This issue has not been assessed yet.