Skip to content

feat: Add delete graph with immediate and period-end cancellation options#111

Merged
jfrench9 merged 1 commit intomainfrom
chore/update-cancel-repo-sub
May 6, 2026
Merged

feat: Add delete graph with immediate and period-end cancellation options#111
jfrench9 merged 1 commit intomainfrom
chore/update-cancel-repo-sub

Conversation

@jfrench9
Copy link
Copy Markdown
Member

@jfrench9 jfrench9 commented May 6, 2026

Summary

Implements enhanced delete graph functionality that supports both immediate deletion and period-end cancellation options. This includes a new subscription cancellation API, updated graph client methods, and corresponding model changes to support the two deletion modes.

Key Accomplishments

  • New Subscription Cancellation API: Added cancel_repository_subscription.py module that handles cancelling repository subscriptions, enabling period-end cancellation flows where a graph's associated subscription can be terminated at the end of the current billing period rather than immediately.

  • Enhanced Delete Graph Operation: Refactored op_delete_graph.py to support both immediate deletion and period-end deletion strategies. The operation now accommodates different cancellation semantics depending on the user's intent.

  • Updated Graph Client: Extended graph_client.py with new methods and logic to orchestrate the delete graph workflow, integrating the subscription cancellation step when period-end deletion is selected.

  • Updated Data Models: Modified delete_graph_op.py models to include fields and structures necessary to distinguish between immediate and period-end deletion modes.

  • Test Coverage: Added tests in test_graph_client.py to validate the new delete graph functionality across both deletion options.

Breaking Changes

  • The delete graph operation interface has been modified with new parameters/options. Existing callers that invoke the delete graph operation may need to be updated to specify the desired deletion mode (immediate vs. period-end).
  • Model changes in delete_graph_op.py may affect serialization/deserialization for consumers relying on the previous schema.

Testing Notes

  • New unit tests cover the delete graph flow for both immediate and period-end cancellation scenarios.
  • Verify integration behavior with the subscription cancellation endpoint to ensure period-end cancellations are correctly propagated to the billing system.
  • Edge cases to validate: deleting a graph with no active subscription, attempting period-end cancellation on an already-cancelled subscription, and concurrent deletion requests.

Infrastructure Considerations

  • The new subscription cancellation endpoint must be available and properly configured in the target environment before deploying this change.
  • Ensure API permissions and authentication scopes cover the new subscription cancellation operations.
  • Monitor billing and subscription service logs during rollout to confirm cancellation requests are processed correctly.

🤖 Generated with Claude Code

Branch Info:

  • Source: chore/update-cancel-repo-sub
  • Target: main
  • Type: feature

Co-Authored-By: Claude noreply@anthropic.com

@jfrench9 jfrench9 merged commit a86d44f into main May 6, 2026
1 check passed
@jfrench9 jfrench9 deleted the chore/update-cancel-repo-sub branch May 6, 2026 02:22
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.

1 participant