gitlab-cloud-connector 1.13.0 → 1.15.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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -6
  3. data/config/backend_services/duo_workflow_service.yml +2 -2
  4. data/config/services/duo_chat.yml +1 -0
  5. data/config/services/self_hosted_models.yml +1 -0
  6. data/config/unit_primitives/agent_quick_actions.yml +1 -0
  7. data/config/unit_primitives/amazon_q_integration.yml +1 -0
  8. data/config/unit_primitives/ask_build.yml +1 -0
  9. data/config/unit_primitives/ask_commit.yml +1 -0
  10. data/config/unit_primitives/ask_epic.yml +1 -0
  11. data/config/unit_primitives/ask_issue.yml +1 -0
  12. data/config/unit_primitives/ask_merge_request.yml +1 -0
  13. data/config/unit_primitives/categorize_duo_chat_question.yml +1 -0
  14. data/config/unit_primitives/codebase_search.yml +16 -0
  15. data/config/unit_primitives/documentation_search.yml +1 -0
  16. data/config/unit_primitives/duo_chat.yml +1 -0
  17. data/config/unit_primitives/explain_code.yml +1 -0
  18. data/config/unit_primitives/explain_vulnerability.yml +1 -0
  19. data/config/unit_primitives/fix_code.yml +1 -0
  20. data/config/unit_primitives/generate_commit_message.yml +1 -0
  21. data/config/unit_primitives/include_dependency_context.yml +1 -0
  22. data/config/unit_primitives/include_directory_context.yml +1 -0
  23. data/config/unit_primitives/include_file_context.yml +1 -0
  24. data/config/unit_primitives/include_issue_context.yml +1 -0
  25. data/config/unit_primitives/include_local_git_context.yml +1 -0
  26. data/config/unit_primitives/include_merge_request_context.yml +1 -0
  27. data/config/unit_primitives/include_repository_context.yml +1 -0
  28. data/config/unit_primitives/include_snippet_context.yml +1 -0
  29. data/config/unit_primitives/include_terminal_context.yml +1 -0
  30. data/config/unit_primitives/refactor_code.yml +1 -0
  31. data/config/unit_primitives/resolve_vulnerability.yml +1 -0
  32. data/config/unit_primitives/review_merge_request.yml +1 -0
  33. data/config/unit_primitives/summarize_comments.yml +1 -0
  34. data/config/unit_primitives/summarize_issue_discussions.yml +1 -0
  35. data/config/unit_primitives/summarize_new_merge_request.yml +1 -0
  36. data/config/unit_primitives/summarize_review.yml +1 -0
  37. data/config/unit_primitives/troubleshoot_job.yml +1 -0
  38. data/config/unit_primitives/write_tests.yml +1 -0
  39. data/lib/gitlab/cloud_connector/data_model/associations.rb +12 -0
  40. data/lib/gitlab/cloud_connector/data_model/base.rb +8 -1
  41. data/lib/gitlab/cloud_connector/version.rb +1 -1
  42. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 077de053a3fe1fce666a22074c0b6b8e4eaff5acf93055d3fffbe80ee11edcd2
4
- data.tar.gz: 45161c6c8d5d4a44141845caf4c3a766d3f7521216a6c2fdfc50b6f1f9a9997a
3
+ metadata.gz: 77b68ccbbbd3599d83f1ef7a19c2b2b23d5a15c076606e9e9369ceaf81790c7a
4
+ data.tar.gz: 8da66f4e74f4a6a1a588a160e1c599fe9ff1149d289b711426e985213f1790d7
5
5
  SHA512:
6
- metadata.gz: f45035bc44bd61356cb4de0566ddedb3322dc37535437eb1d7552f29dfe2a4c169e73373432eae44877c96885709c2153e1f43f3430404a14e8755951a95253c
7
- data.tar.gz: 5dc5d7321a6b93f30cba742f3fff4b19440109f88836f0c29da8e940e036aa50ed2441bccc33bf3dea7715e221bc0ec89a2cf9f6094dbfc73f14b5e173fbf2ac
6
+ metadata.gz: de093b831b27a912323e1d6bf45ea165dbabe2e98e7b0477c9d8d71916fa55738c50700ac17eec271d09230720ec7cb9e9331fb282792690d031381eef3b63ba
7
+ data.tar.gz: fa9fa12a1aba3c712a3253454ae68ba124ea69765112f630f9511129f0708633ccff10723b0ae55fa8425254b6dcd60c28c56471c50e2f54915e469ced5471d4
data/README.md CHANGED
@@ -61,14 +61,14 @@ duo_chat.backend_services.map(&:jwt_aud)
61
61
  ## Contributing
62
62
 
63
63
  ### Test your changes locally
64
-
65
- To test changes to the Ruby gem in your environment, you need to source gem contents from you local dir:
66
64
 
67
- 1. add a `path` attribute to the `gem` definition in the `Gemfile:
65
+ To test changes to the Ruby gem in your environment, you need to source gem contents from you local dir:
68
66
 
69
- ```ruby
70
- gem "gitlab-cloud-connector", "~> 1.5", require: 'gitlab/cloud_connector', feature_category: :cloud_connector, path: '<path to gitlab-cloud-connector folder on your machine>/src/ruby/'
71
- ```
67
+ 1. Set `path` in `Gemfile` to point to the library project source:
68
+
69
+ ```ruby
70
+ gem "gitlab-cloud-connector", "~> 1.5", require: 'gitlab/cloud_connector', feature_category: :cloud_connector, path: '/path/to/gitlab-cloud-connector/src/ruby/'
71
+ ```
72
72
 
73
73
  1. Run `bundle install` to apply the changes
74
74
 
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  name: duo_workflow_service
3
- project_url: https://gitlab.com/gitlab-org/duo-workflow/duo-workflow-service
4
- group: group:ai model validation
3
+ project_url: https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist
4
+ group: group::duo workflow
5
5
  jwt_aud: gitlab-duo-workflow-service
@@ -7,6 +7,7 @@ unit_primitives:
7
7
  - ask_epic
8
8
  - ask_issue
9
9
  - ask_merge_request
10
+ - codebase_search
10
11
  - documentation_search
11
12
  - duo_chat
12
13
  - explain_code
@@ -8,6 +8,7 @@ unit_primitives:
8
8
  - ask_epic
9
9
  - ask_issue
10
10
  - ask_merge_request
11
+ - codebase_search
11
12
  - complete_code
12
13
  - generate_code
13
14
  - documentation_search
@@ -5,5 +5,6 @@ group: group::duo_chat
5
5
  feature_category: duo_chat
6
6
  backend_services:
7
7
  - ai_gateway_agent
8
+ - duo_workflow_service
8
9
  license_types:
9
10
  - ultimate
@@ -5,6 +5,7 @@ group: group::duo_chat
5
5
  feature_category: duo_chat
6
6
  backend_services:
7
7
  - ai_gateway
8
+ - duo_workflow_service
8
9
  license_types:
9
10
  - ultimate
10
11
  add_ons:
@@ -7,5 +7,6 @@ feature_category: duo_chat
7
7
  documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo_chat/examples.html#ask-about-cicd
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
@@ -7,5 +7,6 @@ feature_category: duo_chat
7
7
  documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo_chat/examples.html#ask-about-a-specific-commit
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
@@ -8,5 +8,6 @@ documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo_chat/examples.html
8
8
  introduced_by_url: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/10890/diffs
9
9
  backend_services:
10
10
  - ai_gateway
11
+ - duo_workflow_service
11
12
  add_ons:
12
13
  - duo_enterprise
@@ -8,5 +8,6 @@ documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo_chat/examples.html
8
8
  introduced_by_url: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/10890/diffs
9
9
  backend_services:
10
10
  - ai_gateway
11
+ - duo_workflow_service
11
12
  add_ons:
12
13
  - duo_enterprise
@@ -9,5 +9,6 @@ documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo_chat/examples.html
9
9
  unit_primitive_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/485499
10
10
  backend_services:
11
11
  - ai_gateway
12
+ - duo_workflow_service
12
13
  add_ons:
13
14
  - duo_enterprise
@@ -7,6 +7,7 @@ feature_category: duo_chat
7
7
  documentation_url: https://docs.gitlab.com/development/ai_features/duo_chat/#product-analysis
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_pro
12
13
  - duo_enterprise
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: codebase_search
3
+ description: Perform semantic search on a GitLab repository for a given query.
4
+ cut_off_date: 2024-10-17T00:00:00+00:00
5
+ group: group::code creation
6
+ feature_category: duo_chat
7
+ documentation_url: "" # To be added: https://gitlab.com/gitlab-org/gitlab/-/issues/537573
8
+ milestone: "18.1"
9
+ introduced_by_url: "https://gitlab.com/gitlab-org/cloud-connector/gitlab-cloud-connector/-/merge_requests/149"
10
+ unit_primitive_issue_url: https://gitlab.com/gitlab-org/cloud-connector/gitlab-cloud-connector/-/issues/72
11
+ backend_services:
12
+ - ai_gateway
13
+ add_ons:
14
+ - duo_pro
15
+ - duo_enterprise
16
+ - duo_amazon_q
@@ -6,6 +6,7 @@ group: group::duo_chat
6
6
  feature_category: duo_chat
7
7
  backend_services:
8
8
  - ai_gateway
9
+ - duo_workflow_service
9
10
  add_ons:
10
11
  - duo_pro
11
12
  - duo_enterprise
@@ -9,6 +9,7 @@ feature_category: duo_chat
9
9
  documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo/#gitlab-duo-chat
10
10
  backend_services:
11
11
  - ai_gateway
12
+ - duo_workflow_service
12
13
  add_ons:
13
14
  - duo_pro
14
15
  - duo_enterprise
@@ -7,6 +7,7 @@ feature_category: source_code_management
7
7
  documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo/#code-explanation
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_pro
12
13
  - duo_enterprise
@@ -9,5 +9,6 @@ introduced_by_url: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_re
9
9
  unit_primitive_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/470958
10
10
  backend_services:
11
11
  - ai_gateway
12
+ - duo_workflow_service
12
13
  add_ons:
13
14
  - duo_enterprise
@@ -7,6 +7,7 @@ feature_category: duo_chat
7
7
  documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo/#fix-code
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
12
13
  - duo_pro
@@ -8,5 +8,6 @@ documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo/#merge-commit-mess
8
8
  introduced_by_url: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/10371
9
9
  backend_services:
10
10
  - ai_gateway
11
+ - duo_workflow_service
11
12
  add_ons:
12
13
  - duo_enterprise
@@ -8,5 +8,6 @@ unit_primitive_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/491740
8
8
  introduced_by_url: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/11140
9
9
  backend_services:
10
10
  - ai_gateway
11
+ - duo_workflow_service
11
12
  add_ons:
12
13
  - duo_enterprise
@@ -6,6 +6,7 @@ feature_category: duo_chat
6
6
  documentation_url: "" # To be added: https://gitlab.com/gitlab-org/gitlab/-/issues/537573
7
7
  backend_services:
8
8
  - ai_gateway
9
+ - duo_workflow_service
9
10
  add_ons:
10
11
  - duo_pro
11
12
  - duo_enterprise
@@ -7,6 +7,7 @@ feature_category: duo_chat
7
7
  introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/168327/
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
12
13
  - duo_pro
@@ -7,5 +7,6 @@ feature_category: duo_chat
7
7
  introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/168327/
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
@@ -7,5 +7,6 @@ feature_category: duo_chat
7
7
  introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/172401
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
@@ -7,5 +7,6 @@ feature_category: duo_chat
7
7
  introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/168327/
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
@@ -6,6 +6,7 @@ feature_category: duo_chat
6
6
  documentation_url: "" # To be added: https://gitlab.com/gitlab-org/gitlab/-/issues/537573
7
7
  backend_services:
8
8
  - ai_gateway
9
+ - duo_workflow_service
9
10
  add_ons:
10
11
  - duo_pro
11
12
  - duo_enterprise
@@ -7,6 +7,7 @@ feature_category: duo_chat
7
7
  introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/168327/
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
12
13
  - duo_pro
@@ -7,6 +7,7 @@ feature_category: duo_chat
7
7
  documentation_url: "" # To be added: https://gitlab.com/gitlab-org/gitlab/-/issues/504104
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_pro
12
13
  - duo_enterprise
@@ -7,6 +7,7 @@ feature_category: duo_chat
7
7
  documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo/#refactor-code
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
12
13
  - duo_pro
@@ -8,5 +8,6 @@ documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo/#vulnerability-res
8
8
  introduced_by_url: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/10457
9
9
  backend_services:
10
10
  - ai_gateway
11
+ - duo_workflow_service
11
12
  add_ons:
12
13
  - duo_enterprise
@@ -7,5 +7,6 @@ feature_category: code_review_workflow
7
7
  documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo/#code-review
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
@@ -6,5 +6,6 @@ group: group::project management
6
6
  feature_category: team_planning
7
7
  backend_services:
8
8
  - ai_gateway
9
+ - duo_workflow_service
9
10
  add_ons:
10
11
  - duo_enterprise
@@ -5,5 +5,6 @@ group: group::code review
5
5
  feature_category: code_review_workflow
6
6
  backend_services:
7
7
  - ai_gateway
8
+ - duo_workflow_service
8
9
  add_ons:
9
10
  - duo_enterprise
@@ -7,5 +7,6 @@ feature_category: code_review_workflow
7
7
  documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo/#merge-request-summary
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
@@ -7,5 +7,6 @@ feature_category: code_review_workflow
7
7
  documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo/#code-review-summary
8
8
  backend_services:
9
9
  - ai_gateway
10
+ - duo_workflow_service
10
11
  add_ons:
11
12
  - duo_enterprise
@@ -8,5 +8,6 @@ documentation_url: https://docs.gitlab.com/ee/user/gitlab_duo/#root-cause-analys
8
8
  introduced_by_url: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/10457
9
9
  backend_services:
10
10
  - ai_gateway
11
+ - duo_workflow_service
11
12
  add_ons:
12
13
  - duo_enterprise
@@ -6,6 +6,7 @@ group: group::duo_chat
6
6
  feature_category: duo_chat
7
7
  backend_services:
8
8
  - ai_gateway
9
+ - duo_workflow_service
9
10
  add_ons:
10
11
  - duo_pro
11
12
  - duo_enterprise
@@ -5,8 +5,20 @@ module Gitlab
5
5
  module DataModel
6
6
  module Associations
7
7
  module ClassMethods
8
+ def associations
9
+ @associations ||= []
10
+ end
11
+
12
+ def association_cache_keys
13
+ @association_cache_keys ||= associations.map { |a| :"#{a}_association" }
14
+ end
15
+
8
16
  # rubocop:disable Naming/PredicateName
9
17
  def has_and_belongs_to_many(name)
18
+ associations << name.to_sym
19
+
20
+ remove_instance_variable(:@association_cache_keys) if instance_variable_defined?(:@association_cache_keys)
21
+
10
22
  define_method(name) do
11
23
  instance_variable_get(:"@#{name}_association") ||
12
24
  instance_variable_set(:"@#{name}_association", load_association_records(name))
@@ -35,6 +35,8 @@ module Gitlab
35
35
 
36
36
  def initialize(**opts)
37
37
  opts.each do |key, value|
38
+ raise ArgumentError, "Cannot override association '#{key}'" if association_key?(key)
39
+
38
40
  instance_variable_set(:"@#{key}", value)
39
41
  end
40
42
  end
@@ -43,10 +45,15 @@ module Gitlab
43
45
  instance_variable_get(:"@#{name}")
44
46
  end
45
47
 
48
+ def association_key?(key)
49
+ self.class.association_cache_keys.include?(key.to_sym)
50
+ end
51
+
46
52
  def to_hash
47
53
  instance_variables.each_with_object({}) do |var, hash|
48
54
  key = var.to_s.delete('@').to_sym
49
- hash[key] = instance_variable_get(var)
55
+
56
+ hash[key] = instance_variable_get(var) unless association_key?(key)
50
57
  end
51
58
  end
52
59
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module CloudConnector
5
- VERSION = '1.13.0'
5
+ VERSION = '1.15.0'
6
6
  end
7
7
  end
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.13.0
4
+ version: 1.15.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-05-15 00:00:00.000000000 Z
11
+ date: 2025-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -128,6 +128,7 @@ files:
128
128
  - config/unit_primitives/ask_merge_request.yml
129
129
  - config/unit_primitives/categorize_duo_chat_question.yml
130
130
  - config/unit_primitives/code_suggestions.yml
131
+ - config/unit_primitives/codebase_search.yml
131
132
  - config/unit_primitives/complete_code.yml
132
133
  - config/unit_primitives/description_composer.yml
133
134
  - config/unit_primitives/documentation_search.yml