New projects inherit parent value for duo_features_enabled
What does this MR do and why?
- This is not a problem for new groups because the default value is
nilso the cascading settings framework does the inheritance correclty. - Projects, on the other hand, have a default value of
true - This fix is specifically for when the parent has the value set to "default off". When "always off" is set on the parent, that is correctly inherited by all children.
- Minor fix: this also addresses Duo cascading to existing child objects if Duo is set to "off" when Amazon Q is first enabled
Database review
SQL query for project.project_setting.update!(duo_features_enabled: false) using the project id from the AI Gateway project (this will be run on newly-created projects only so a smaller project seemed more fitting):
"UPDATE "project_settings" SET "updated_at" = '2025-07-24 23:39:52.164830', "duo_features_enabled" = FALSE WHERE "project_settings"."project_id" = 39903947
https://explain.depesz.com/s/yZeA
References
How to set up and validate locally
In SM mode:
- Set the instance to have Duo Features "default off"
- Create a new project
- New project should have Duo disabled
In SaaS Mode:
- Set a top-level group to have Duo Features "default off"
- Create a new project within the group
- New project should have Duo disabled
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.
Edited by Jessie Young