feat: remove the licence pages, routes and exceptions - #74
Merged
Merged
Conversation
Config carried six properties reading fields the config endpoint no longer returns: valid_key, instance_count, trial, features, and a license_type that is only ever open. is_aws_license read metadata a Tower AMI put there. None of them can answer anything but a default now, which is worse than not being there, because a caller reading is_valid_license gets False rather than an error telling it the question no longer applies. The subscriptions page posted to config/subscriptions/ and ConfigAttach posted to config/attach/. Neither route exists in ctrliq/ascender: config/subscriptions went with ctrliq/ascender#1005 and config/attach was never served at all. page.py sniffed response bodies for eleven licence phrases to decide between LicenseInvalid, LicenseExceeded and the ordinary Forbidden or BadRequest. The platform does not emit any of those phrases any more, so every response takes the else branch, and the two exception classes go with the sniffing.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
cigamit
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows ctrliq/ascender#1005, which takes the subscription surface out of the platform. The client held three pieces of it, and each now describes something the API does not do.
Config
Six properties read fields that
/api/v2/config/no longer returns:is_valid_licensewantedvalid_keyandinstance_count,is_trial_licensewantedtrial,is_enterprise_licensewantedlicense_type == 'enterprise', andfeaturesread afeaturesdict. None of those keys are in the payload any more.is_ascender_licensecomparedlicense_typeagainst'open', which is the only value there is, so it is a property that always returns True.is_aws_licensereadami-idandinstance-id, metadata a Tower AMI put in the licence blob.Leaving them in place is worse than removing them: a caller asking
is_valid_licensegets a quietFalserather than an error saying the question no longer applies.Routes
ConfigAttachposted toconfig/attach/and theSubscriptionspage posted toconfig/subscriptions/.config/subscriptionsgoes with #1005, andconfig/attachhas never been served byctrliq/ascender, so that page could only ever produce a 404.Response sniffing
page.pysearched every 400 and 403 body for eleven licence phrases, among themInvalid license,License has expiredandMissing 'eula_accepted' property, to decide whether to raiseLicenseInvalidorLicenseExceededinstead ofForbiddenorBadRequest. The platform does not emit any of those phrases now, so every response already took the else branch. The sniffing goes, and the two exception classes with it.Checks
ruff format --checkandruff check ascenderkitpass,ty check ascenderkitpasses, and the unit suite is green at 375 passed, 1 skipped.