gitlab-cloud-connector 1.24.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -17
- data/config/services/duo_chat.yml +1 -0
- data/config/services/self_hosted_models.yml +2 -0
- data/config/unit_primitives/include_agent_user_environment_context.yml +8 -0
- data/config/unit_primitives/include_os_information_context.yml +2 -0
- data/lib/gitlab/cloud_connector/available_services_generator.rb +8 -15
- data/lib/gitlab/cloud_connector/configuration.rb +1 -1
- data/lib/gitlab/cloud_connector/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f70539d01e1bea86c8d8ad79593361b475f7389d5900e01ee206d4908d8daba4
|
4
|
+
data.tar.gz: 56ff35bb96d64d41382f3c982ed1a688e15889d0990d6c81dc149b622d400bb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64a25b4fe841ff0a335c7beb0ae96d5fa9792cd96e42979cb412e2cb9e0e459407ceb1c9c3fba22d88c63849224a6b091bd5d68346b29badf7b6cbd197f577d9
|
7
|
+
data.tar.gz: b4335da037e0c9924148811417044816d2a6e3d3cd5a5cd9032c43fe21d0ea755a0b28e8b49a61328d17801228a6fe47de17499bb3c8374abaa63a102ec3a672
|
data/README.md
CHANGED
@@ -70,23 +70,7 @@ To test changes to the Ruby gem in your environment, you need to source gem cont
|
|
70
70
|
gem "gitlab-cloud-connector", "~> 1.5", require: 'gitlab/cloud_connector', feature_category: :plan_provisioning, path: '/path/to/gitlab-cloud-connector/src/ruby/'
|
71
71
|
```
|
72
72
|
|
73
|
-
1.
|
74
|
-
|
75
|
-
```diff
|
76
|
-
diff --git i/config/application.rb w/config/application.rb
|
77
|
-
index 3d8b4af3c3305b..53c1788d784ddc 100644
|
78
|
-
--- i/config/application.rb
|
79
|
-
+++ w/config/application.rb
|
80
|
-
@@ -20,6 +20,7 @@
|
81
|
-
module Gitlab
|
82
|
-
class Application < Rails::Application
|
83
|
-
config.load_defaults 7.0
|
84
|
-
+ CloudConnector::Configuration.config_dir = '/Users/name/workspace/gitlab-cloud-connector/config'
|
85
|
-
|
86
|
-
# This section contains configuration from Rails upgrades to override the new defaults so that we
|
87
|
-
# keep existing behavior.
|
88
|
-
|
89
|
-
```
|
73
|
+
1. Set the `CLOUD_CONNECTOR_CONFIG_DIR` environment variable to your local `gitlab-cloud-connector` config dir, for example `CLOUD_CONNECTOR_CONFIG_DIR=/Users/name/workspace/gitlab-cloud-connector/config`
|
90
74
|
|
91
75
|
1. Run `bundle install` to apply the changes
|
92
76
|
|
@@ -26,6 +26,7 @@ unit_primitives:
|
|
26
26
|
- include_repository_context
|
27
27
|
- include_directory_context
|
28
28
|
- include_os_information_context
|
29
|
+
- include_agent_user_environment_context
|
29
30
|
- refactor_code
|
30
31
|
- write_tests
|
31
32
|
- troubleshoot_job
|
@@ -37,3 +38,4 @@ unit_primitives:
|
|
37
38
|
- generate_issue_description
|
38
39
|
- summarize_review
|
39
40
|
- glab_ask_git_command
|
41
|
+
- review_merge_request
|
@@ -0,0 +1,8 @@
|
|
1
|
+
---
|
2
|
+
name: include_agent_user_environment_context
|
3
|
+
description: Include context about the user's environment.
|
4
|
+
group: group::duo_workflow
|
5
|
+
feature_category: duo_workflow
|
6
|
+
documentation_url: "https://gitlab.com/gitlab-org/duo-workflow/duo-workflow-executor/-/issues/74"
|
7
|
+
backend_services:
|
8
|
+
- duo_workflow_service
|
@@ -7,3 +7,5 @@ documentation_url: ""
|
|
7
7
|
backend_services:
|
8
8
|
- ai_gateway
|
9
9
|
- duo_workflow_service
|
10
|
+
deprecated_by_url: "https://gitlab.com/gitlab-org/cloud-connector/gitlab-cloud-connector/-/merge_requests/193"
|
11
|
+
deprecation_message: "Replaced by 'include_agent_user_environment_context', a more flexible context definition."
|
@@ -8,17 +8,6 @@ module Gitlab
|
|
8
8
|
class AvailableServicesGenerator
|
9
9
|
GITLAB_REALMS = %w[gitlab-com self-managed].freeze
|
10
10
|
WRONG_GITLAB_REALM_MESSAGE = 'Wrong gitlab_realm. Please use one of the following: %s'
|
11
|
-
IGNORE_UNIT_PRIMITIVES = %w[
|
12
|
-
agent_quick_actions
|
13
|
-
complete_code
|
14
|
-
documentation_search
|
15
|
-
explain_code
|
16
|
-
fix_code
|
17
|
-
generate_code
|
18
|
-
refactor_code
|
19
|
-
security_scans
|
20
|
-
write_tests
|
21
|
-
].freeze
|
22
11
|
|
23
12
|
def generate(gitlab_realm)
|
24
13
|
raise WRONG_GITLAB_REALM_MESSAGE % GITLAB_REALMS.join(', ') unless GITLAB_REALMS.include?(gitlab_realm)
|
@@ -34,6 +23,7 @@ module Gitlab
|
|
34
23
|
services_config = {}
|
35
24
|
|
36
25
|
DataModel::Service.each do |service|
|
26
|
+
# Skip generating config for services not supported within the provided gitlab_realm
|
37
27
|
next if service.gitlab_realm && !service.gitlab_realm&.include?(gitlab_realm)
|
38
28
|
|
39
29
|
service_config = generate_service_config(service.unit_primitives, service.basic_unit_primitive)
|
@@ -47,10 +37,13 @@ module Gitlab
|
|
47
37
|
services_config[service.name] = service_config
|
48
38
|
end
|
49
39
|
|
50
|
-
# Generate a stand-alone service for each unit primitive
|
51
|
-
|
52
|
-
|
53
|
-
|
40
|
+
# Generate a stand-alone service config for each unit primitive
|
41
|
+
service_names = DataModel::Service.map(&:name)
|
42
|
+
DataModel::UnitPrimitive.each do |unit_primitive|
|
43
|
+
# Skip if we already processed the entity with the same name. We either:
|
44
|
+
# - already generated the service config
|
45
|
+
# - skipped if service is not supported in the provided gitlab_realm
|
46
|
+
next if service_names.include?(unit_primitive.name)
|
54
47
|
|
55
48
|
services_config[unit_primitive.name] = generate_service_config([unit_primitive])
|
56
49
|
end
|
@@ -15,7 +15,7 @@ module Gitlab
|
|
15
15
|
attr_reader :override_config
|
16
16
|
|
17
17
|
def config_dir
|
18
|
-
@config_dir ||= File.expand_path("../../../config", __dir__).freeze
|
18
|
+
@config_dir ||= (ENV["CLOUD_CONNECTOR_CONFIG_DIR"] || File.expand_path("../../../config", __dir__)).freeze
|
19
19
|
end
|
20
20
|
|
21
21
|
def data_loader_class
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-cloud-connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikola Milojevic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07
|
11
|
+
date: 2025-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -144,6 +144,7 @@ files:
|
|
144
144
|
- config/unit_primitives/generate_embeddings_codebase.yml
|
145
145
|
- config/unit_primitives/generate_issue_description.yml
|
146
146
|
- config/unit_primitives/glab_ask_git_command.yml
|
147
|
+
- config/unit_primitives/include_agent_user_environment_context.yml
|
147
148
|
- config/unit_primitives/include_dependency_context.yml
|
148
149
|
- config/unit_primitives/include_directory_context.yml
|
149
150
|
- config/unit_primitives/include_file_context.yml
|