-
Notifications
You must be signed in to change notification settings - Fork 131
Remove remaining subscription attachment references #20194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove remaining subscription attachment references #20194
Conversation
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(-)
There was a problem hiding this 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 - here's some feedback:
- Now that Simple Content Access is always enabled, consider removing the is_sca_mode_enabled method and any related configuration flags entirely to eliminate leftover conditional logic.
- With all subscription‐attach code gone, you can simplify setup_activation_key and setup_content helpers by dropping unused parameters and branches, streamlining their activation key creation flow.
- Add a test to confirm that attempts to use the removed subscription attach/remove CLI commands now fail or are unrecognized, ensuring the user‐facing behavior is as expected.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Now that Simple Content Access is always enabled, consider removing the is_sca_mode_enabled method and any related configuration flags entirely to eliminate leftover conditional logic.
- With all subscription‐attach code gone, you can simplify setup_activation_key and setup_content helpers by dropping unused parameters and branches, streamlining their activation key creation flow.
- Add a test to confirm that attempts to use the removed subscription attach/remove CLI commands now fail or are unrecognized, ensuring the user‐facing behavior is as expected.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
vsedmik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question bellow, otherwise looks good to me!
| # refresh repository metadata on the host | ||
| rhel_contenthost.execute('subscription-manager repos --list') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need this, but I don't mind keeping it either.
LadislavVasina1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me, thanks @jeremylenz
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]>
|
Opened SatelliteQE/nailgun#1377 |
|
@jameerpathan111 updated |
ColeHiggins2
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im assuming you double checked that any usage for any removed method or functions was updated or caused no failures? maybe we can run a PRT job on subscriptions or activation keys and make sure tests are passing at a reasonable percentage?
|
trigger: test-robottelo |
|
PRT Result |
jnagare-redhat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@jeremylenz thanks for raising this PR and addressing the requested changes. It should fix many test failures. |
Problem Statement
Following PR #19931 which removed auto-attach, autoheal, and simple content access references, there were still remaining references to subscription attachment functionality throughout the codebase. 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.
Solution
This PR completes the cleanup by removing all remaining subscription attachment references:
Phase 1: Removed dead code and obsolete parameters
activationkey_add_subscription_to_repo()helper method from cli_factory.py (unused)auto_attach=Falseparameters from test_rhcloud_iop.py (redundant in SCA mode)test_positive_candlepin_events_processed_by_STOMP(never implemented)Phase 2: Removed CLI wrapper methods
ActivationKey.add_subscription(),remove_subscription(), andsubscriptions()Host.subscription_attach()andsubscription_remove()subscription_register()andsubscription_unregister()(still needed for registration)Phase 3: Cleaned up tests
test_sca_end_to_endPhase 4: is_sca_mode_enabled cleanup
is_sca_mode_enabled()references from helper methods and testsFiles changed: 12 files changed, 5 insertions(+), 228 deletions(-)
Related Issues
Related to PR #19931