[GIT-243]fix: InstanceConfiguration not created for some keys#9303
[GIT-243]fix: InstanceConfiguration not created for some keys#9303sangeethailango wants to merge 2 commits into
Conversation
📝 WalkthroughWalkthroughThe ChangesInstance Configuration Initialization Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the configure_instance management command so it creates only missing auth-provider instance configuration keys (Google/GitHub/GitLab/Gitea) instead of treating “any key exists” as “all keys exist”.
Changes:
- Fetches the subset of existing keys from
InstanceConfigurationand computesmissing_keys. - Creates configuration rows only for keys that are actually missing.
This pull request refactors how authentication provider enablement flags are handled in the instance configuration. Instead of dynamically creating
IS_GOOGLE_ENABLED,IS_GITHUB_ENABLED,IS_GITLAB_ENABLED, andIS_GITEA_ENABLEDkeys in theconfigure_instancemanagement command, these flags are now statically defined in the configuration variable lists for each provider. This simplifies the setup process and makes the configuration more consistent.Authentication provider configuration changes:
IS_GOOGLE_ENABLED,IS_GITHUB_ENABLED, andIS_GITLAB_ENABLEDflags are now added directly to their respective configuration variable lists (google_config_variables,github_config_variables,gitlab_config_variables) incore.py, pulling their values from environment variables or defaulting to"0". [1] [2] [3]Management command simplification:
IS_GOOGLE_ENABLED,IS_GITHUB_ENABLED,IS_GITLAB_ENABLED,IS_GITEA_ENABLED) in theconfigure_instancemanagement command has been removed, as these are now handled in the static configuration.get_configuration_valuewas removed fromconfigure_instance.py.