refactor: remove what still describes the licence and Insights - #1016
Merged
Merged
Conversation
Eleven lines across eight docsite pages still described behaviour that went with the subscription: viewing, refreshing, posting and re-adding a licence, organizations and teams gated on "if the license allows for multiple organizations", hosts "counted against your license allotment", and features "enabled through a license file". Two needed more than a word taken out. The organization host limit was written entirely in licence terms, and claimed enforcement that no longer happens: an inventory sync failing on the policy, and superusers over-allocating with a warning. org.max_hosts is now enforced in exactly one place, bulk host creation, and the page says that instead. The default-organization note ended mid-sentence on a Tower Self-support licence tier, so that half is gone. Two browsable-API pages said Tower where they meant Ascender, and four Insights screenshots have been referenced by nothing since the feature was removed.
These are recorded responses the UI tests mock with, and they drifted from what the endpoints return once the licence and Insights went. data.allSettingOptions.json still offered LICENSE as a nested-object setting with help text pointing at /api/v2/config/ to change the licence, and carried the AUTHENTICATION_BACKENDS help text from before it stopped naming licence features. data.allSettings.json still had a LICENSE value. data.credentialTypes.json still listed the Insights credential type, and four host fixtures carried an insights related link to a route that no longer exists. Two tests used kind insights on a project credential and an Insights credential type name; they use scm and gce, which are kinds the platform has. The inventory plugin test data for insights had no plugin left to exercise.
JobDetail mapped insights to "Red Hat Insights". The scm_type choices are the empty string, git, svn and archive, so that branch could never be taken, and being a t`` string it was translated into all nine catalogues and shipped. Same shape as the Insights host filter removed in ctrliq#1005: a value the model stopped offering, with the UI still naming it.
Seven comments still described one. defaults.py kept "Enables Insights data collection" after the setting it introduced was unregistered, so it sat above an unrelated line. generate_setting_types cited LICENSE as an example of a setting, managers.active_count said it counted hosts "for licensing" when it feeds host metrics, and inventory_import called PermissionDenied the class that distinguishes licence exceptions, which it no longer does. awx_license_type went with them. project_update.yml documented it and never read it, and since ctrliq#1005 it was the constant 'open' passed to a playbook that ignores it.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved moderate findings concern generated locale artifacts, legacy SCM display handling, and organization host-limit documentation/enforcement.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Removes stale references to retired licensing and Insights functionality across documentation, UI fixtures, translations, tests, and metadata.
Changes:
- Cleans licensing documentation and API terminology.
- Removes obsolete Insights and licence fixture data.
- Removes stale translations, comments, and unused metadata.
File summaries
| File | Summary |
|---|---|
docs/docsite/rst/userguide/overview.rst |
Updates host-limit guidance. Moderate (3 votes): fix non-1 organization enforcement before documenting it. Nit (3 votes): document the API path or restore the UI field. |
docs/docsite/rst/userguide/notifications.rst |
Removes licence-based notification instructions. |
docs/docsite/rst/userguide/inventories.rst |
Rewords host-limit behavior. |
docs/docsite/rst/quickstart/examine_dashboard.rst |
Removes licence-settings wording. |
docs/docsite/rst/quickstart/create_organization.rst |
Removes the obsolete licence-tier note. |
docs/docsite/rst/common/settings-menu.rst |
Removes licence index entries. |
docs/docsite/rst/administration/social_auth.rst |
Removes organization licence gating. |
docs/docsite/rst/administration/configure_ascender.rst |
Removes licence-file wording. |
ascender/ui/src/screens/Setting/shared/data.allSettings.json |
Removes the obsolete licence fixture. |
ascender/ui/src/screens/Setting/shared/data.allSettingOptions.json |
Removes obsolete setting metadata. |
ascender/ui/src/screens/Project/ProjectEdit/ProjectEdit.test.tsx |
Replaces the obsolete Insights credential fixture. |
ascender/ui/src/screens/Job/JobDetail/JobDetail.tsx |
Removes the Insights SCM mapping. Moderate (1 vote): preserve a legacy fallback or migrate existing rows. |
ascender/ui/src/screens/Inventory/shared/data.hosts.json |
Removes obsolete Insights links. |
ascender/ui/src/screens/Inventory/shared/data.host.json |
Removes obsolete Insights links. |
ascender/ui/src/screens/Inventory/InventoryDetail/InventoryDetail.test.tsx |
Updates credential fixture data. |
ascender/ui/src/screens/Host/data.host.json |
Removes obsolete Insights links. |
ascender/ui/src/screens/Credential/shared/data.credentialTypes.json |
Removes the Insights credential fixture. |
ascender/ui/src/locales/zh/messages.po |
Cleans obsolete translation entries. |
ascender/ui/src/locales/nl/messages.po |
Cleans obsolete translation entries. |
ascender/ui/src/locales/ko/messages.po |
Cleans obsolete translation entries. |
ascender/ui/src/locales/ja/messages.po |
Cleans obsolete translation entries. |
ascender/ui/src/locales/hi/messages.po |
Cleans obsolete translation entries. |
ascender/ui/src/locales/fr/messages.po |
Cleans obsolete translation entries. |
ascender/ui/src/locales/es/messages.po |
Cleans obsolete translation entries. |
ascender/ui/src/locales/en/messages.po |
Cleans obsolete translation entries. Moderate (1 vote): regenerate and commit the translation artifacts. |
ascender/ui/src/locales/ar/messages.po |
Cleans obsolete translation entries. |
ascender/ui/src/components/AssociateModal/data.hosts.json |
Removes obsolete Insights links. |
ascender/settings/defaults.py |
Removes stale analytics comments. |
ascender/playbooks/project_update.yml |
Removes obsolete variable documentation. |
ascender/main/tests/functional/commands/test_inventory_import.py |
Cleans stale test commentary. |
ascender/main/tests/functional/api/test_survey_spec.py |
Cleans stale test commentary. |
ascender/main/tests/data/inventory/plugins/insights/env.json |
Removes unused Insights fixture data. |
ascender/main/tasks/jobs.py |
Removes awx_license_type. |
ascender/main/managers.py |
Updates host metric documentation. |
ascender/main/management/commands/inventory_import.py |
Updates stale comments. Nit (2 votes): remove the dangling header comment. |
ascender/conf/management/commands/generate_setting_types.py |
Keeps generated setting typing aligned. |
ascender/api/templates/api/dashboard_view.md |
Corrects product terminology. |
ascender/api/templates/api/dashboard_inventory_graph_view.md |
Corrects product terminology. |
Review details
Suppressed comments (2)
ascender/ui/src/locales/en/messages.po:9660
- The locale source changes are not reflected in the generated artifacts:
messages.potstill contains active entries forRed Hat Insights,Insights Credential, andSubscription Usage, and every locale'smessages.mjsstill contains them. Sincemessages.mjsis what the app loads (the repository's locale instructions require compiling it after.poedits), regenerate and commit the catalogs so the removed strings are not still shipped.
#: screens/Job/JobDetail/JobDetail.tsx:78
#~ msgid "Red Hat Insights"
#~ msgstr "Red Hat Insights"
ascender/ui/src/screens/Job/JobDetail/JobDetail.tsx:78
- The choices list is not a database constraint, and the migration that removed
insightsfromProject/ProjectUpdate.scm_typechoices does not rewrite existing rows. A migrated installation can therefore still have completed Insights project updates; after removing this mapping,scmTypes[job.scm_type]at line 312 resolves toundefined, so their Source Control Type is blank. Preserve a legacy/unknown-value fallback (or migrate those rows) before dropping the display mapping.
archive: t`Remote Archive`,
- Files reviewed: 38/42 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| pair: features; limiting, hosts | ||
|
|
||
| Lots of large organizations have instances shared among many organizations. They do not want any one organization to be able to use all the licensed hosts, this feature allows superusers to set a specified upper limit on how many licensed hosts may be allocated to each organization. The Ascender algorithm factors changes in the limit for an organization and the number of total hosts across all organizations. Any inventory updates will fail if an inventory sync brings an organization out of compliance with the policy. Additionally, superusers are able to 'over-allocate' their licenses, with a warning. | ||
| Lots of large organizations have instances shared among many organizations, and do not want any one organization using all the hosts. A superuser can set an upper limit on each organization through its **Max Hosts**, and bulk host creation refuses to take an organization past it. |
| from django.utils.encoding import smart_str | ||
|
|
||
| # DRF error class to distinguish license exceptions | ||
| # DRF error class, raised when the import is refused |
| pair: features; limiting, hosts | ||
|
|
||
| Lots of large organizations have instances shared among many organizations. They do not want any one organization to be able to use all the licensed hosts, this feature allows superusers to set a specified upper limit on how many licensed hosts may be allocated to each organization. The Ascender algorithm factors changes in the limit for an organization and the number of total hosts across all organizations. Any inventory updates will fail if an inventory sync brings an organization out of compliance with the policy. Additionally, superusers are able to 'over-allocate' their licenses, with a warning. | ||
| Lots of large organizations have instances shared among many organizations, and do not want any one organization using all the hosts. A superuser can set an upper limit on each organization through its **Max Hosts**, and bulk host creation refuses to take an organization past it. |
license_capacity and license_consumed were the compliance layer: capacity was the entitlement and consumed the running total against it. ctrliq#1005 already left capacity always zero, since its only source was the licence's instance_count, and consumed measures a headroom that no longer exists. Both columns go, with migration 0217. What stays is the part that was never about a subscription: hosts_added and hosts_deleted, the per-month record of which hosts an install first automated and which it deleted, and HostMetric itself with its automation counts. That removes the running total from the summary task, so _update_summary just records the two monthly figures and _get_license_consumed_before goes with it. The three help texts that named a licence now describe what the columns hold. Verified by rolling the migration back on a database holding license_consumed=42 and license_capacity=99, then forward again: the columns drop and the row keeps its hosts_added and hosts_deleted.
The setting did one thing: when it did not read unique_managed_hosts, the UI deleted the host_metrics route. Its label and choices were the last subscription wording left in Settings, offering a choice between "no subscription" and a usage model, on a product that has neither. With the licence accounting gone from host metrics, what the page shows is which hosts this install has automated and when. There is nothing left for a subscription concept to gate, so the setting goes and the route stays. The admin check on the line below is untouched, so it remains superusers and system auditors rather than everyone. Conf migration 0015 deletes the stored row. This is the direction cigamit suggested on the forum thread, that Host Metrics is useful enough to open up.
BulkHostCreateSerializer subtracted existing names belonging to organization 1 whatever organization the request was for, sitting next to an org_active_count that scopes correctly. On any other organization a host that already existed counted as new, so the limit could refuse a request that was inside it. The test covers a non-1 organization and fails without the fix. Raised by Copilot on this pull request, along with two others: the comment above the imports in inventory_import named a DRF error class the file no longer imports, and the organization host limit page described Max Hosts as a control to set, when ctrliq#1005 removed that field from the web interface and left max_hosts writable only through the API.
cigamit
approved these changes
Sep 16, 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 #1005, which removed the subscription licence, its enforcement and the Red Hat analytics upload, and #931, #932 and #933, which removed Insights. Each of those took out the code. This takes out what still describes it.
Found by sweeping for the vocabulary of the removed features across every tracked file, then asking a second question that turned out to be the useful one: which files mention a feature but were never opened by the pull request that removed it. That is where a removal leaks.
The user guide
Eleven lines across eight pages still described behaviour that went with the subscription: viewing, refreshing, posting and re-adding a licence, organizations and teams gated on "if the license allows for multiple organizations", hosts "counted against your license allotment", and features "enabled through a license file".
Two needed more than a word removed. The organization host limit was written entirely in licence terms and claimed enforcement that no longer happens, an inventory sync failing on the policy and superusers over-allocating with a warning.
org.max_hostsis now enforced in exactly one place, bulk host creation, and the page says that instead. The default-organization note ended mid-sentence on a Tower Self-support licence tier, so that half is gone.Two browsable-API pages said Tower where they meant Ascender, and four Insights screenshots had been referenced by nothing since the feature was removed.
The captured fixtures
These are recorded API responses the UI tests mock with, so when they drift the tests assert against a shape the API does not produce.
data.allSettingOptions.jsonstill offeredLICENSEas a nested-object setting whose help text pointed at/api/v2/config/to change the licence, and carried theAUTHENTICATION_BACKENDShelp text from before it stopped naming licence features.data.allSettings.jsonstill had aLICENSEvalue.data.credentialTypes.jsonstill listed the Insights credential type, and four host fixtures carried aninsightsrelated link to a route that no longer exists.One dead label
JobDetailmappedinsightsto "Red Hat Insights". Thescm_typechoices are the empty string,git,svnandarchive, so the branch could never be taken, and being a `t``` string it was translated into all nine catalogues and shipped. Same shape as the Insights host filter #1005 removed.Comments, and one extra var
Seven comments still named a licence, among them
defaults.pykeeping "Enables Insights data collection" above an unrelated line after the setting it introduced was unregistered, andmanagers.active_countsaying it counted hosts "for licensing" when it feeds host metrics.awx_license_typewent too.project_update.ymldocumented it and never read it, and since #1005 it was the constantopenpassed to a playbook that ignores it.Deliberately untouched
Host metrics, which is the other half of the forum thread.
license_erroron InventoryUpdate, which is API surface and simply never set now. Theawxcompat shim, theawx.*logger names, and Satellite, Azuresubscription_idandinsights_system_id, which are real and unrelated. Also the 112 other orphaned docsite images, which predate all of this and have nothing to do with licensing.Checked
Full Python suite green at 4,192 passing and 6 skipped, both UI suites green at 181 and 368 files, and
ruff,yamllint,tsc,eslint,prettierand the catalogue check clean. Every edited JSON fixture was parsed after editing, and the six edited RST files were run through docutils, since the docsite is not built in CI.