Skip to content
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

chore: Remove artifacts of removed commands #3476

Merged
merged 6 commits into from
Dec 10, 2024

Conversation

Glutexo
Copy link
Contributor

@Glutexo Glutexo commented Nov 27, 2024

Removed what remained after removing obsolete commands.

There is more obsolete code to be removed, e.g. in EntitlementDBusObject. That’d be over the scope of this pull request, though.

Card IDs:

@Glutexo
Copy link
Contributor Author

Glutexo commented Nov 27, 2024

In this commit, I removed everything related to the attach CLI command. It doesn’t deal with the --auto-attach option of the register command. I know only little about Subscription Manager, so I did so mostly blindly, only after a short conversation with Matyáš. @pinotree, may I ask you to take a look?

@Glutexo
Copy link
Contributor Author

Glutexo commented Nov 27, 2024

I created this pull request as a draft, thinking that I’d put in the command removals as individual commits. If @pinotree approves, however, I think we can merge and do the other commands in (a) new pull request(s).

@ptoscano
Copy link
Contributor

Removed what remained after removing the attach CLI command.

strictly speaking, this also removes other references related to "attach" (eg dbus, in some old/unused tests, etc), not only in the CLI

@Glutexo Glutexo marked this pull request as ready for review November 28, 2024 14:26
@Glutexo Glutexo force-pushed the remove-unused branch 2 times, most recently from 307afaf to 43e8958 Compare November 28, 2024 14:28
@Glutexo
Copy link
Contributor Author

Glutexo commented Nov 28, 2024

@ptoscano Thank you for the review! 🙇🏻‍♂️ I addressed your comments.

I un-drafted the PR, so it can be merged if you approve of the changes. There are already 10 changed files. That’s enough for a single PR.

@Glutexo
Copy link
Contributor Author

Glutexo commented Dec 3, 2024

After a discussion with Barbora and Matyáš, we agreed to rather put the command removals into this pull request as individual commits:

@Glutexo
Copy link
Contributor Author

Glutexo commented Dec 3, 2024

Matyáš suggested we can be more aggressive removing code that seems unused. The reasoning was that either integration tests would fail, or QE would find an issue when doing manual testing.

Under that suggestion, I removed quite some methods from EntitlementService and EntitlementDBusObject that doesn’t seem to be called or referenced from anywhere. Added a commit 8c3400b.

@Glutexo
Copy link
Contributor Author

Glutexo commented Dec 3, 2024

Added fda942a removing artifacts of the redeem command.

@Glutexo
Copy link
Contributor Author

Glutexo commented Dec 3, 2024

Added 516d70b removing artifacts of the import command.

@Glutexo
Copy link
Contributor Author

Glutexo commented Dec 4, 2024

bindByEntitlementPool and bind weren’t used anywhere after the attach command disappeared. Removed.

@Glutexo Glutexo force-pushed the remove-unused branch 2 times, most recently from b8944dc to 818e66c Compare December 4, 2024 15:07
@Glutexo
Copy link
Contributor Author

Glutexo commented Dec 4, 2024

I merged all the “chore: remove artifacts” pull requests into this one. Removal of every command/option artifacts is in an individual commit. That should make a review easier even though there are many changed files and lines.

I only removed artifacts remaining after what’s been removed in the referenced removal pull requests. I went through their code once more to remove deeper artifacts: methods called by methods (…) called by the removed methods.

There is more obsolete code to be removed. An example is the EntitlementDBusObject: all its methods except GetStatus are not called from anywhere and aren’t referenced in the DBus conf file. I’d keep that for a separate card and pull request though.

I’d like to ask for a real and full review, now. @ptoscano, please. 🙏🏻

@Glutexo Glutexo changed the title chore: Remove artifacts of attach chore: Remove artifacts of removed commands Dec 4, 2024
Glutexo and others added 5 commits December 10, 2024 11:04
Removed what remained after removing the `attach` command. A system is now attached upon registration.

Card IDs:
* CCT-603

Signed-off-by: Štěpán Tomsa <[email protected]>
Removed what remained after removing the `--auto-attach` option of `register`. A system is now always attached upon registration.

Card IDs:
* CCT-603

Signed-off-by: Štěpán Tomsa <[email protected]>
Removed what remained after removing the `autoheal` option from Action clients (ENT-5549).

Card IDs:
* CCT-603

Signed-off-by: Štěpán Tomsa <[email protected]>
Removed what remained after removing the `remove` command.

Card IDs:
* CCT-603

Signed-off-by: Štěpán Tomsa <[email protected]
Removed what remained after removing the `redeem` command.

Card IDs:
* CCT-603

Signed-off-by: Štěpán Tomsa <[email protected]>
Removed what remained after removing the `import` command.

Card IDs:
* CCT-603

Signed-off-by: Štěpán Tomsa <[email protected]>
Copy link
Contributor

@ptoscano ptoscano left a comment

Choose a reason for hiding this comment

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

Thanks!

@ptoscano ptoscano merged commit bea14ec into candlepin:main Dec 10, 2024
24 checks passed
@Glutexo Glutexo deleted the remove-unused branch December 11, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants