Skip to content
代码片段 群组 项目
未验证 提交 9696c570 编辑于 作者: Sam Word's avatar Sam Word 提交者: GitLab
浏览文件

Merge branch '519333-prevent-race-conditions-when-reading-duo-availability' into 'master'

Prevent race conditions when reading duo_availability value from ApplicationSettings

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/182111



Merged-by: default avatarSam Word <sword@gitlab.com>
Approved-by: default avatarMinahil Nichols <minahilnichols@gitlab.com>
Approved-by: default avatarSam Word <sword@gitlab.com>
Reviewed-by: default avatarSam Word <sword@gitlab.com>
Co-authored-by: default avatarJulie Huang <julhuang@gitlab.com>
No related branches found
No related tags found
2 合并请求!3031Merge per-main-jh to main-jh by luzhiyuan,!3030Merge per-main-jh to main-jh
...@@ -7,7 +7,7 @@ module ApplicationSettingsHelper ...@@ -7,7 +7,7 @@ module ApplicationSettingsHelper
delegate :duo_availability, delegate :duo_availability,
:instance_level_ai_beta_features_enabled, :instance_level_ai_beta_features_enabled,
:enabled_expanded_logging, :enabled_expanded_logging,
to: :'Gitlab::CurrentSettings.current_application_settings' to: :current_application_settings
def ai_powered_testing_agreement def ai_powered_testing_agreement
safe_format( safe_format(
...@@ -101,6 +101,13 @@ def ai_settings_helper_data ...@@ -101,6 +101,13 @@ def ai_settings_helper_data
private private
def current_application_settings
# clear cached settings so that duo_availability shows up correctly
Gitlab::CurrentSettings.expire_current_application_settings
Gitlab::CurrentSettings.current_application_settings
end
# rubocop:disable Gitlab/DocumentationLinks/HardcodedUrl # rubocop:disable Gitlab/DocumentationLinks/HardcodedUrl
# We want to link SaaS docs for flexibility for every URL related to Code Suggestions on Self Managed. # We want to link SaaS docs for flexibility for every URL related to Code Suggestions on Self Managed.
# We expect to update docs often during the Beta and we want to point user to the most up to date information. # We expect to update docs often during the Beta and we want to point user to the most up to date information.
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册