Clear cache when AI related settings change
What does this MR do and why?
Issue: #425141 (closed)
Publish AI settings changed event
Always publish an event when the group changes
third_party_ai_features_enabled
or experiment_features_enabled
as
these are the flags that make sure that AI features are enabled/disabled
for all group members.
After this event, we need to clear the cache for all users of the group to have immediate access to AI features.
This MR is not addressing the issue completely as we also need to publish events when:
- A user gets added to a group
- A user gets removed from a group
- A group gets upgraded to the ultimate plan
This will be done in a follow-up.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
before | after |
How to set up and validate locally
- Working AI setup
GITLAB_SIMULATE_SAAS=1 gdk start
- Have a user being the member of a group that has AI features access (ultimate group). They should be only a member of this group.
- Change either the "Third-Party AI setting" or "Experimental features" setting
- See how access to AI features changes for the user (easiest to check for Help -> Ask GitLab Duo appearing/disappearing)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Nicolas Dular