Repository navigation
Provision missing subscription plans on the API Portal during API publish - #3685
Pranavan-S wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe publication service now validates selected plans as active and creates plans missing from the API Portal before publishing. The change adds paginated portal plan lookup, bulk plan creation, error handling, tests, and updated API error descriptions. ChangesPublication Plan Synchronization
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant PublicationService
participant HTTPPortalPublisher
participant APIPortal
PublicationService->>HTTPPortalPublisher: CreateMissingPlans for selected active plans
HTTPPortalPublisher->>APIPortal: List subscription plans by page
APIPortal-->>HTTPPortalPublisher: Return listed plans
HTTPPortalPublisher->>APIPortal: Create missing plans
APIPortal-->>HTTPPortalPublisher: Return creation response
HTTPPortalPublisher-->>PublicationService: Return synchronization result
PublicationService->>HTTPPortalPublisher: Publish after successful synchronization
Merge Risk: ⚪ Minimal · up to Publishing now checks that selected plans are active and creates any plans the API Portal is missing before it publishes. Tests cover the main failure paths, and no merge-blocking issue was found in the supplied context. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Selected plans remain restricted to the publisher’s organization, and inactive plans are now rejected. The main design risk is recovery: portal plans can remain after publication fails, and interrupted or concurrent creation depends on the portal’s duplicate-handling guarantees. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3685 +/- ##
==========================================
+ Coverage 54.95% 58.91% +3.96%
==========================================
Files 931 943 +12
Lines 150505 151565 +1060
Branches 4809 4809
==========================================
+ Hits 82716 89301 +6585
+ Misses 61511 55227 -6284
- Partials 6278 7037 +759
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Purpose
When an API is published to the API Portal, its draft can select subscription plans. The portal may not have those plans yet, so the publish will fail. Additionally, the inactive plans should be filtered out from publishing to api-portal.
Goals
Approach
User stories
Documentation
N/A
Automation tests
Security checks
Samples
N/A
Related PRs
Follows the API Portal subscription plan fixes in #3679 .
Test environment
macOS, SQLite for integration tests, plus manual checks in the browser against a local API Portal.