Repository navigation
fix(aws-marketplace): check the container license with CheckoutLicense so AWS's standard buyer policy works - #9981
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
[Medium impact] The PR appears safe to merge; no actionable new issues were established. SummaryReplaces the container license lookup with
|
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…e so AWS's standard buyer policy works A buyer who follows AWS's generated launch steps gets the managed AWSLicenseManagerConsumptionPolicy, which does not allow ListReceivedLicenses, so the check failed and Sim stayed on the open-source core. Check out a provisional unit of the entitlement and return it at once, the integration AWS documents for contract-priced containers. License Manager answers a unit held by another replica, or one a crashed replica never returned, the same way as a missing entitlement. Startup retries that answer, and a running Enterprise deployment only restarts without Enterprise once it has held longer than an unreturned unit can last.
…swers, assert the checkout request, bump the chart
…r entitlement AWS documents a contract that unlocks a tier of features, rather than metering a quantity, as a provisional CheckoutLicense with unit None and no value. That checkout is not counted against the contract, so replicas never compete for a unit, and the check-in, startup retry, and one-hour confirmation window that guarded against a held unit go away. A definite answer that differs from the boot mode restarts; a failed check keeps the current mode.
9e13682 to
e518dd0
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
ListReceivedLicenses. AWS's generated Helm/EKS launch steps for paid container products give the ServiceAccount the managedAWSLicenseManagerConsumptionPolicy, which doesn't allow that action, so a buyer following them got AccessDenied and Sim silently stayed on the open-source core.CheckoutLicenseof theenterprise_licenseentitlement and returns the unit at once withCheckInLicense, the integration AWS documents for contract-priced containers. Both actions are in the managed policy.NoEntitlementsAllowedExceptionas a missing entitlement. Startup retries that answer with jitter. A running Enterprise deployment restarts without Enterprise only after it has held for longer than an unreturned unit can last (an hour plus one re-check), so contention can never switch Enterprise off. Re-checks are jittered so replicas don't meet on the unit.license-manager:CheckoutLicenseandlicense-manager:CheckInLicenseinstead ofListReceivedLicenses.Type of Change
Testing
container-license.test.ts(10 tests, the AWS SDK mocked at the client the way the other Marketplace tests do): active license turns Enterprise on and returns the unit; a failed check-in keeps the verdict; a busy unit at startup is retried; no unit at startup and a denied permission both run without Enterprise; a unit held for up to an hour keeps Enterprise on; no entitlement past the window restarts; a permission failure never restarts a running deployment; a license that becomes active restarts into Enterprise.bun run lint,check:test-patterns,check:comment-hygiene.Checklist
test-auditauthoring gate)