Refactor graph provisioning and consolidate subscription handling#331
Refactor graph provisioning and consolidate subscription handling#331
Conversation
- Removed the DIRECT_GRAPH_PROVISIONING_ENABLED parameter from configuration files and code to streamline provisioning logic. - Added new functionality to create billing subscriptions for graphs and entity graphs directly within the provisioning process. - Updated rate limiting for billing endpoints to ensure generous limits during checkout. - Cleaned up unused provisioning jobs and sensors to enhance code maintainability and clarity.
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 2m 6s —— View job Code Review Complete ✅Reviewing PR #331: Refactor graph provisioning and consolidate subscription handling SummaryThis is a substantial architectural refactoring that successfully consolidates graph provisioning and billing subscription handling. The changes eliminate redundant systems, improve maintainability, and provide a cleaner separation of concerns. The PR achieves its stated goals with a net reduction of over 1,000 lines of code. ✅ Strengths1. Excellent Consolidation
2. Improved Webhook Handling (
|
- Enhanced error handling in the graph provisioning and user repository provisioning processes to cancel Stripe subscriptions when provisioning fails. - Added a new abstract method `cancel_subscription` in the PaymentProvider class and implemented it in the StripePaymentProvider. - Updated tests to verify that Stripe subscriptions are canceled correctly upon provisioning failures, ensuring customers are not charged for unsuccessful operations.
…Provider class to simplify product naming in non-production environments.
- Introduced a new demo-sec-query target in the justfile to run preset queries for the SEC demo. - The target allows for conditional execution based on the 'all' parameter, enhancing demo capabilities.
…oml and uv.lock files for improved functionality and compatibility.
- Updated the logic for retrieving the user ID from credentials to make it optional, allowing authentication with just the API key. - Simplified the output by removing the error message for missing user ID and adjusting the print statements for clarity.
- Introduced a new function `_get_plan_display_name` to convert internal plan names into human-readable display names based on resource type (graph or repository). - Updated the `subscription_to_response` function to include the display name in the response, enhancing clarity for subscription details.
Summary
This PR consolidates graph provisioning and billing subscription management into a more streamlined architecture. The changes eliminate redundant provisioning workflows, improve subscription handling, and enhance rate limiting capabilities across the platform.
Key Accomplishments
Architecture Simplification
Billing & Subscription Improvements
API & Router Enhancements
Breaking Changes
Testing Notes
Infrastructure Considerations
This refactoring significantly reduces codebase complexity while maintaining all core functionality, resulting in a net reduction of over 1,000 lines of code through consolidation and elimination of redundant systems.
🤖 Generated with Claude Code
Branch Info:
feature/subscription-improvementsmainCo-Authored-By: Claude noreply@anthropic.com