Do not create duo core todo if a user has already received one
What does this MR do and why?
Do not create duo core todo if a user has already received one
- regardless if it has bee 'cleared'/'done' or not
- resolve rubocop exceptions on files touched.
- improve finder specs.
- see https://gitlab.com/gitlab-org/gitlab/-/issues/548141
DB analysis: !193773 (comment 2551534158)
Changelog: other EE: true
How to set up and validate locally
-
Setup gdk to simulate SaaS - https://docs.gitlab.com/ee/development/ee_features.html#simulate-a-saas-instance and restart GDK
-
Create a top level group.
-
In rails console change the
duo_nano_features_enabledsetting.Group.last.namespace_settings.update!(duo_nano_features_enabled: nil) Group.last.namespace_settings.update!(duo_nano_features_enabled: true) -
Visit
http://gdk.test:3000/admin/sidekiq/scheduledand force the sidekiq job seen below to run by adding it to the queue. -
Go to any user, part of that group, todos and notice the todo added.
-
Clear the todo(make it done) in the UI.
-
Repeat this whole process and ensure you don't see any new todos. Same group can be re-used if desired.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
