-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
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.
@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 :-)
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.
@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
.
@cienvaras - Good catch. Removed. |
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.
@codechefmarc LGTM, thanks for the fix!
@ahughes3 Ready for you to review.
@cienvaras The module is still listed at |
@ahughes3 Correct. This PR only uninstalls the module, full module removal should be done in a separate PR on the next release. |
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.
Looks good!
// 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); | ||
} | ||
|
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.
Actually, this isn't required. those configs have a dependency on the module, so disabling the module removes the configs automatically.
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.
READY FOR REVIEW
Summary
Need Review By (Date)
2024-12-18
Urgency
low
Steps to Test
/admin/modules
PR Checklist