Uniformly load access token through Cloud Connector
What does this MR do and why?
It unifies the way we load service access tokens across GitLab-Rails.
The newly introduced Cloud Connector service will be a SSoT for that operation.
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.
How to set up and validate locally
Use local GitLab, CDot, Ai (Model) Gateway.
Make sure you have a seat quota in your sub, or mock a CDot:
diff --git a/app/models/license.rb b/app/models/license.rb
index 2d2df4c44..5626c6fb1 100644
--- a/app/models/license.rb
+++ b/app/models/license.rb
@@ -137,7 +137,7 @@ def self.build_from_subscription(subscription:, attrs: {})
seat_reconciliation_enabled: subscription.perform_reconciliations?,
operational_metrics_enabled: subscription.operational_metrics_enabled?,
reconciliation_completed: subscription.previous_subscription_second_last_quarter_reconciliation_successful?,
- code_suggestions_seat_count: subscription.code_suggestions_packs.sum(&:quantity),
+ code_suggestions_seat_count: 10,
enterprise_agile_planning_seat_count: subscription.enterprise_agile_planning_packs.sum(&:quantity)
}.merge!(license_dates).merge!(attrs)
and then sync.
Enable AI-powered
features via Settings > General > AI...
Assign your user (e.g. root
) to seat via the Duo
menu on the left.
Create PAT, connect your IDE.
Set AIGW_AUTH__BYPASS_EXTERNAL=false
in .env
inside the AI Gateway folder and restart it.
Type a code, receive fake model response from the Code Suggestions.
Related to #437726 (closed)