Conversation
- Introduced a new task for handling graph tier upgrades, including EBS volume migration and snapshot creation for safety. - Added validation for subgraph count and storage capacity during tier changes to ensure compliance with tier limits. - Updated billing subscription models to support tier upgrade operations and added relevant error handling for subscription status conflicts. - Enhanced API responses to include operation IDs for tracking asynchronous tier changes. - Updated CloudFormation templates to allow Lambda invocation for volume management during upgrades. - Refactored related tests to cover new functionality and ensure robust validation during tier transitions.
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 3m 32s —— View job PR Review: Add graph tier upgrade functionality
This is a large, well-structured PR that implements end-to-end graph tier upgrade/downgrade. The architecture is sound and the happy-path coverage is good. A few issues worth addressing before merge, plus a handful of observations. Issues1.
|
…upgrades - Improved exception handling in CloudFormation output retrieval to log errors. - Added handling for "upgrading" subscription status in graph access requirements, blocking write operations during tier upgrades. - Updated volume retrieval to use a query on the instance-index GSI instead of a full table scan for efficiency. - Adjusted tests to reflect changes in volume retrieval and subscription status handling.
|
@claude can you review the recent changes |
|
Claude finished @jfrench9's task in 1m 34s —— View job Review: Recent Changes (commit
|
Summary
Introduces end-to-end graph tier upgrade capabilities, allowing users to upgrade their graph subscriptions to higher tiers. This includes a new upgrade task orchestration system, tier validation logic, enhanced subscription routing, and supporting infrastructure changes.
Key Accomplishments
Graph Tier Upgrade Task
graph_tier_upgradetask module (~545 lines) that orchestrates the full lifecycle of upgrading a graph to a higher subscription tierTier Validation
tier_validationmodule that encapsulates the business rules for determining valid upgrade paths between graph tiersSubscription & Billing Enhancements
subscription.pycore and API models)upgrade.pymodel in favor of integrating upgrade state directly into the subscription modelAPI & Router Changes
Infrastructure
Breaking Changes
robosystems/models/api/billing/upgrade.py: Any code importing from this module will need to be updated to use the new fields on the subscription model directly. The__init__.pyfor billing models has been updated accordingly.Testing
test_graph_tier_upgrade.py): 642 lines of comprehensive tests covering happy paths, error handling, rollback scenarios, and edge casestest_tier_validation.py): 114 lines covering valid/invalid upgrade paths and boundary conditionstest_graph_tier_upgrade.pyin routers): 454 lines testing the API layer including request validation, authorization, and end-to-end upgrade flows__init__.pyfor proper test discoveryInfrastructure Considerations
🤖 Generated with Claude Code
Branch Info:
feature/subscriptions-upgrade-improvementsmainCo-Authored-By: Claude noreply@anthropic.com