Skip to content

Conversation

@jeremylenz
Copy link
Contributor

@jeremylenz jeremylenz commented Oct 9, 2025

Katello PR: Katello/katello#11526

All organizations are now SCA (Simple Content Access) by default, making these
options irrelevant:

Core library changes:

  • Removed robottelo/cli/host.py subscription_auto_attach() method
  • Removed robottelo/hosts.py auto_attach parameter from register_contenthost()
  • Removed robottelo/cli/simple_content_access.py CLI wrapper module
  • Removed robottelo/host_helpers/satellite_mixins.py is_sca_mode_enabled() helper

Test changes:

  • Removed auto-attach tests from activation key test files (API and CLI)
  • Removed auto-attach test from host test file
  • Removed auto-attach from subscription/upgrade tests
  • Removed simple_content_access read check from test_subscription.py

Fixture changes:

  • Removed auto_attach parameter from activation key fixtures
  • Removed simple_content_access parameter from manifest fixtures

Data file changes:

  • Removed auto-attach/autoheal options from hammer_commands.json
  • Removed autoheal from test_hammer.py test expectations
  • Removed auto_attach API endpoints from test_api_endtoend.py

Configuration changes:

  • Removed SIMPLE_CONTENT_ACCESS settings from manifest.yaml.template

Problem Statement

Solution

Related Issues

@jeremylenz jeremylenz requested review from a team as code owners October 9, 2025 19:40
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@jeremylenz
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_reporttemplates.py -k test_positive_installed_products
Katello: {katello: 11526}

@jeremylenz jeremylenz added the No-CherryPick PR doesnt need CherryPick to previous branches label Oct 9, 2025
@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 13098
Build Status: UNSTABLE
PRT Comment: pytest tests/foreman/api/test_reporttemplates.py -k test_positive_installed_products --external-logging
Test Result : ========== 3 failed, 46 deselected, 88 warnings in 1764.73s (0:29:24) ==========

@Satellite-QE Satellite-QE added the PRT-Failed Indicates that latest PRT run is failed for the PR label Oct 9, 2025
@jameerpathan111
Copy link
Contributor

@jeremylenz hi, could you resolve the conflict? And are you done with all the changes you wanted to make?

@jeremylenz jeremylenz force-pushed the remove-auto-attach-and-sca branch from 1bbf7c7 to ed81725 Compare November 4, 2025 16:20
@jeremylenz
Copy link
Contributor Author

jeremylenz commented Nov 4, 2025

@jameerpathan111 Yes, this should cover the Robottelo changes that correspond to the Katello PR linked above. But I also understand there are changes needed in other repos, and am waiting for a reviewer to tell me about those.

@jeremylenz jeremylenz force-pushed the remove-auto-attach-and-sca branch from ed81725 to 7e30737 Compare November 4, 2025 16:25
@jeremylenz
Copy link
Contributor Author

Rebased to current master.

@jameerpathan111
Copy link
Contributor

jameerpathan111 commented Nov 4, 2025

@jameerpathan111 Yes, this should cover the Robottelo changes that correspond to the Katello PR linked above. But I also understand there are changes needed in other repos, and am waiting for a reviewer to tell me about those.

The PR looks good to me.
We'd need to update airgun too. From first glance, auto_attach and run_auto_attach should be removed. I'm not sure what other ui entities have been removed. You can take a look and see if there's something else.
I already raised PR to remove auto-attach from nailgun.

@jameerpathan111
Copy link
Contributor

@LadislavVasina1 raised SatelliteQE/airgun#2194 to fix airgun side.

@LadislavVasina1 LadislavVasina1 added the Stream Introduced in or relating directly to Satellite Stream/Master label Nov 5, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes deprecated Simple Content Access (SCA) and auto-attach subscription functionality from Satellite, aligning the codebase with the removal of these features in recent Satellite versions. SCA is now the default and only mode for subscriptions.

  • Removed auto-attach and autoheal parameters from activation keys and host management
  • Removed simple_content_access configuration options from manifests and organizations
  • Deleted entire test classes and methods related to auto-attach functionality
  • Removed CLI commands and API endpoints for subscription auto-attach operations

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/upgrades/test_subscription.py Removed unused imports and entire TestSubscriptionAutoAttach class testing pre/post upgrade auto-attach scenarios
tests/new_upgrades/test_subscription.py Removed unused constants import, subscription_auto_attach_setup fixture, and two test functions related to auto-attach and Candlepin transactions
tests/foreman/ui/test_rhc.py Removed simple_content_access and auto_attach parameters from manifester and activation key creation
tests/foreman/ui/test_reporttemplates.py Removed auto_attach parameter from activation key creation
tests/foreman/ui/test_contenthost.py Removed simple_content_access parameter from organization creation
tests/foreman/endtoend/test_api_endtoend.py Removed auto_attach API endpoints from expected API paths
tests/foreman/destructive/test_remoteexecution.py Removed auto-attach parameter from activation key CLI creation
tests/foreman/data/hammer_commands.json Removed auto-attach, autoheal, and service-level options from hammer command metadata
tests/robottelo/test_hammer.py Removed autoheal field from hammer output test data
tests/foreman/cli/test_rhcloud_inventory.py Added new test function and imports; removed auto_attach from new activation key creation
tests/foreman/cli/test_reporttemplates.py Removed auto-attach parameter from activation key CLI creation
tests/foreman/cli/test_activationkey.py Removed three test functions testing auto-attach toggle, update, and negative scenarios
tests/foreman/api/test_subscription.py Removed auto_attach from activation keys and SCA mode assertion
tests/foreman/api/test_reporttemplates.py Removed auto_attach parameter from activation key creation
tests/foreman/api/test_host.py Replaced stubbed auto-attach test with new PXE UEFI provisioning tests
tests/foreman/api/test_activationkey.py Removed test_positive_update_auto_attach test function
robottelo/hosts.py Removed auto_attach parameter and logic from register_contenthost method
robottelo/host_helpers/satellite_mixins.py Removed is_sca_mode_enabled helper method
robottelo/cli/simple_content_access.py Deleted entire file containing SimpleContentAccess CLI wrapper class
robottelo/cli/host.py Removed subscription_auto_attach CLI method
pytest_fixtures/core/contenthosts.py Removed auto_attach parameter from activation key creation
pytest_fixtures/component/taxonomy.py Removed simple_content_access parameter from Manifester creation
pytest_fixtures/component/rh_cloud.py Removed auto_attach parameter from activation key creation
pytest_fixtures/component/repository.py Removed auto_attach parameter from activation key creation
pytest_fixtures/component/activationkey.py Removed auto-attach parameter from CLI activation key creation
conf/manifest.yaml.template Removed SIMPLE_CONTENT_ACCESS configuration and related comments

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jeremylenz and others added 2 commits November 5, 2025 09:26
All organizations are now SCA (Simple Content Access) by default, making these
options irrelevant:

Core library changes:
- Removed robottelo/cli/host.py subscription_auto_attach() method
- Removed robottelo/hosts.py auto_attach parameter from register_contenthost()
- Removed robottelo/cli/simple_content_access.py CLI wrapper module
- Removed robottelo/host_helpers/satellite_mixins.py is_sca_mode_enabled() helper

Test changes:
- Removed auto-attach tests from activation key test files (API and CLI)
- Removed auto-attach test from host test file
- Removed auto-attach from subscription/upgrade tests
- Removed simple_content_access read check from test_subscription.py

Fixture changes:
- Removed auto_attach parameter from activation key fixtures
- Removed simple_content_access parameter from manifest fixtures

Data file changes:
- Removed auto-attach/autoheal options from hammer_commands.json
- Removed autoheal from test_hammer.py test expectations
- Removed auto_attach API endpoints from test_api_endtoend.py

Configuration changes:
- Removed SIMPLE_CONTENT_ACCESS settings from manifest.yaml.template
The test_positive_install_iop_custom_certs test has already been moved to test_rhcloud_iop.py, so removing the duplicate from this file.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@jeremylenz jeremylenz force-pushed the remove-auto-attach-and-sca branch from 310ef84 to 2b50e6a Compare November 5, 2025 14:27
@jeremylenz
Copy link
Contributor Author

@LadislavVasina1 updated 👍

@jameerpathan111 jameerpathan111 merged commit ba998e3 into SatelliteQE:master Nov 5, 2025
9 checks passed
jeremylenz added a commit to jeremylenz/robottelo that referenced this pull request Nov 6, 2025
Since SCA (Simple Content Access) is now the default mode for all
organizations, subscription attachment to activation keys and hosts
is no longer needed or possible. This completes the cleanup started
in PR SatelliteQE#19931.

Changes:
- Remove activationkey_add_subscription_to_repo() helper (unused)
- Remove ActivationKey.add_subscription(), remove_subscription(), subscriptions()
- Remove Host.subscription_attach() and subscription_remove()
- Remove stubbed test_positive_candlepin_events_processed_by_STOMP
- Remove is_sca_mode_enabled() references from helpers and tests
- Remove conditional subscription attachment code from setup helpers
- Clean up subscription attachment checks from test_sca_end_to_end

12 files changed, 5 insertions(+), 228 deletions(-)
jameerpathan111 pushed a commit that referenced this pull request Nov 11, 2025
* Remove remaining subscription attachment references

Since SCA (Simple Content Access) is now the default mode for all
organizations, subscription attachment to activation keys and hosts
is no longer needed or possible. This completes the cleanup started
in PR #19931.

Changes:
- Remove activationkey_add_subscription_to_repo() helper (unused)
- Remove ActivationKey.add_subscription(), remove_subscription(), subscriptions()
- Remove Host.subscription_attach() and subscription_remove()
- Remove stubbed test_positive_candlepin_events_processed_by_STOMP
- Remove is_sca_mode_enabled() references from helpers and tests
- Remove conditional subscription attachment code from setup helpers
- Clean up subscription attachment checks from test_sca_end_to_end

12 files changed, 5 insertions(+), 228 deletions(-)

* Remove remaining subscription attachment usage in tests and helpers

Addresses PR review feedback by removing all remaining references to subscription attachment methods that were removed in the initial PR. This includes removing calls to ActivationKey.subscriptions() and Host.subscription_attach() in tests, removing subscription attachment API endpoints from the API test file, and cleaning up the unused rh_subscriptions parameter from helper methods since subscription attachment is no longer supported in SCA mode.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No-CherryPick PR doesnt need CherryPick to previous branches PRT-Failed Indicates that latest PRT run is failed for the PR Stream Introduced in or relating directly to Satellite Stream/Master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants