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

SHS-5944: Uninstall Honeypot module #1698

Closed
wants to merge 9 commits into from

Conversation

codechefmarc
Copy link
Collaborator

@codechefmarc codechefmarc commented Dec 14, 2024

READY FOR REVIEW

Summary

  • Removes configuration for and uninstalls Honeypot module

Need Review By (Date)

2024-12-18

Urgency

low

Steps to Test

  1. Login to the site
  2. Visit the modules list page at /admin/modules
  3. Verify that Honeypot module has been uninstalled

PR Checklist


@ahughes3 ahughes3 temporarily deployed to Tugboat December 14, 2024 00:35 Destroyed
@codechefmarc codechefmarc self-assigned this Dec 14, 2024
@codechefmarc codechefmarc marked this pull request as ready for review December 14, 2024 01:14
Copy link
Collaborator

@dalin- dalin- left a comment

Choose a reason for hiding this comment

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

@codechefmarc
I took a look at a tugboat site, and the module/config is all gone (as expected). I was hoping to be able to look at a log somewhere and see the Deleted @config messages, but I couldn't find that in either Tugboat or Github Actions.

Maybe I'm not the best person to review this :-)

@ahughes3 ahughes3 temporarily deployed to Tugboat December 16, 2024 20:58 Destroyed
Copy link
Collaborator

@cienvaras cienvaras left a comment

Choose a reason for hiding this comment

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

@codechefmarc Works as expected. There's one thing you missed though: please remove the module dependency in docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.info.yml.

@ahughes3 ahughes3 temporarily deployed to Tugboat December 18, 2024 23:44 Destroyed
@codechefmarc
Copy link
Collaborator Author

@cienvaras - Good catch. Removed.

@ahughes3 ahughes3 temporarily deployed to Tugboat December 19, 2024 17:50 Destroyed
Copy link
Collaborator

@cienvaras cienvaras left a comment

Choose a reason for hiding this comment

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

@codechefmarc LGTM, thanks for the fix!

@ahughes3 Ready for you to review.

@cienvaras cienvaras assigned ahughes3 and unassigned codechefmarc Dec 19, 2024
@cienvaras cienvaras requested a review from ahughes3 December 19, 2024 19:15
@ahughes3
Copy link
Collaborator

ahughes3 commented Jan 6, 2025

@cienvaras The module is still listed at /admin/modules but is not checked, this is the expected outcome from this PR correct?

image

@cienvaras
Copy link
Collaborator

@ahughes3 Correct. This PR only uninstalls the module, full module removal should be done in a separate PR on the next release.

@ahughes3 ahughes3 temporarily deployed to Tugboat January 6, 2025 17:34 Destroyed
Base automatically changed from 11.6.1-release to develop January 8, 2025 16:39
Copy link
Collaborator

@ahughes3 ahughes3 left a comment

Choose a reason for hiding this comment

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

Looks good!

@ahughes3 ahughes3 requested a review from pookmish January 8, 2025 19:54
@ahughes3 ahughes3 assigned pookmish and unassigned ahughes3 Jan 8, 2025
@ahughes3 ahughes3 requested a review from sethprime January 8, 2025 19:55
Comment on lines +1183 to +1198
// Remove honeypot existing config - needs to be done before uninstall.
$config_factory = \Drupal::configFactory();

$config_names = [
'honeypot.settings',
'ultimate_cron.job.honeypot_cron',
];

foreach ($config_names as $config) {
$config_factory->getEditable($config)->delete();
$message = t('Deleted @config', [
'@config' => $config,
]);
\Drupal::logger('su_humsci_profile')->notice($message);
}

Copy link
Member

Choose a reason for hiding this comment

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

Actually, this isn't required. those configs have a dependency on the module, so disabling the module removes the configs automatically.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ahughes3 ahughes3 temporarily deployed to Tugboat January 9, 2025 17:07 Destroyed
@codechefmarc
Copy link
Collaborator Author

@pookmish - thank you for the comments, I've combined these two PRs into one, here: #1713

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants