Backport of 'Backfill duo_secret_detection_fp_enabled to false'

What does this MR do and why?

Backport BBM to correct Duo Secret Detection False Positives flow in earlier versions.

duo_secret_detection_fp_enabled was added to project_settings in 18.10 with default: true, null: false. Postgres applied that default to every existing row at migration time, so all pre-existing projects were set to true on upgrade. In 18.11 the default was changed to false via change_column_default, but that only affects new rows. Existing rows kept true, and there was no backfill.

The result: any instance that upgraded through 18.10 has all pre-existing projects set to true. Once the feature is enabled at the group level, those projects are included without anyone making a project-level choice, which defeats the per-project opt-in.

This MR queues a batched background migration that resets the column to false for rows created before the 18.11 default change ran. Rows created afterwards already default to false, so a true value there is a deliberate opt-in and is left untouched. We also leave a row alone when the Secret Detection False Positive Detection foundational flow (secrets_fp_detection/v1) is enabled, since enabling that flow is a deliberate opt-in.

Resolves https://gitlab.com/gitlab-org/gitlab/-/work_items/603391

Backports: !241499 (merged)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

  • This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
  • The MR that fixed the bug on the default branch has been deployed to GitLab.com (not applicable for documentation or spec changes).
  • The MR title is descriptive (e.g. "Backport of 'title of default branch MR'"). This is important, since the title will be copied to the patch blog post.
  • Required labels have been applied to this merge request
  • This MR has been approved by a maintainer (only one approval is required).
  • Ensure the e2e:test-on-omnibus-ee job has succeeded, or if it has failed, investigate the failures. If you determine the failures are unrelated, you may proceed. If you need assistance investigating, request help in the #s_developer_experience Slack channel to confirm the failures are unrelated to the merge request.

Note to the merge request author and maintainer

If you have questions about the patch release process, please:

Edited by Leonardo da Rosa

Merge request reports

Loading