Skip to content

Fix stale Cloud Connector service catalog

What does this MR do and why?

This MR fixes that CloudConnector::AvailableServices.find_by_name can't find a service entry even if it's defined in access_data.yml, due to the caching with default expiry period, which is 8 hours. This effectively means a new service is not available during the period.

I realized this issue during the feature flag rollout:

ee/lib/gitlab/llm/vertex_ai/configuration.rb:37:in `access_token', ee/lib/gitlab/llm/vertex_ai/configuration.rb:47
...
undefined method `access_token' for nil:NilClass

            return ::CloudConnector::AvailableServices.find_by_name(:ai_gateway_proxy).access_token(user)
                                                                                      ^^^^^^^^^^^^^

2024-05-24_18-29

source

Changelog: fixed

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Shinya Maeda

Merge request reports