Skip to content

feat: remove the licence pages, routes and exceptions - #74

Merged
cigamit merged 1 commit into
ctrliq:mainfrom
blaipr:feat/drop-licensing
Sep 15, 2026
Merged

cigamit merged 1 commit into
ctrliq:mainfrom
blaipr:feat/drop-licensing

Conversation

@blaipr

@blaipr blaipr commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

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_license wanted valid_key and instance_count, is_trial_license wanted trial, is_enterprise_license wanted license_type == 'enterprise', and features read a features dict. None of those keys are in the payload any more.
  • is_ascender_license compared license_type against 'open', which is the only value there is, so it is a property that always returns True.
  • is_aws_license read ami-id and instance-id, metadata a Tower AMI put in the licence blob.

Leaving them in place is worse than removing them: a caller asking is_valid_license gets a quiet False rather than an error saying the question no longer applies.

Routes

ConfigAttach posted to config/attach/ and the Subscriptions page posted to config/subscriptions/. config/subscriptions goes with #1005, and config/attach has never been served by ctrliq/ascender, so that page could only ever produce a 404.

Response sniffing

page.py searched every 400 and 403 body for eleven licence phrases, among them Invalid license, License has expired and Missing 'eula_accepted' property, to decide whether to raise LicenseInvalid or LicenseExceeded instead of Forbidden or BadRequest. 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 --check and ruff check ascenderkit pass, ty check ascenderkit passes, and the unit suite is green at 375 passed, 1 skipped.

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.
@ciq-it-service-account

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cigamit
cigamit merged commit b5e7b4f into ctrliq:main Sep 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants