gitlab-qa 14.0.1 → 14.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e82e5e8777aac74ac46ccdc60d9fdc8df5c4136523c92d8f5fd88ab21f25c86
4
- data.tar.gz: 5c6e6cff8abd9abe2b8442e9d41718a6f5af17ce01b70770e075490d8d0d8ca9
3
+ metadata.gz: acdd50bfdfe882c975ccd807c9215a3b3e598e15427a05046a0775940b5a7246
4
+ data.tar.gz: f1b20ae89321a207ff4d53c00f1207344236e610eecfd30a65498ea714e672d1
5
5
  SHA512:
6
- metadata.gz: f89a050668380aea6fe6032eedd280f4a51b6163c920f31d4fecd4596b3a7a077f037ef6196d7a8e86f77c1df56c80f4e80ea9857b81c74573bdad79c05a9d1e
7
- data.tar.gz: b2ec3b5c597de4d3fcdb320e4351c3df2d6f4fb62916479f03005a9680d79250defaa331dd14deea03d657384cf05a1a16909463493fe3600d7e3df87690c0a3
6
+ metadata.gz: 2035dd020578666e40deb9cbfb0296f63599dcd3bd5187ccc8a8a72b9c73fbaa4649e9b9de31166393749bab2441fa2b4dd6980363892c612dad3ed2d99ce7b5
7
+ data.tar.gz: 56b89359923d019df2f2383fe4629105311d5ee9c9030827cc61f89dad20502ef1897a9e7fc03ac93b03c935e33122a25a3ba8d482bf56eac2182c3be5229f82
@@ -41,6 +41,7 @@ Example below:
41
41
 
42
42
  This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
43
43
 
44
+ * [ ] Commits include `Changelog:` [trailer](https://docs.gitlab.com/ee/development/changelog.html)
44
45
  * [ ] I have evaluated the [MR acceptance checklist](https://docs.gitlab.com/ee/development/code_review.html#acceptance-checklist) for this MR.
45
46
 
46
47
  /label ~QA ~Quality
@@ -2,7 +2,7 @@
2
2
  commit from this merge request, and `<NEW_VERSION>` with the upcoming version number. -->
3
3
  ## Diff
4
4
 
5
- https://gitlab.com/gitlab-org/gitlab-qa/-/compare/v<PREVIOUS_VERSION>...<COMMIT_UPDATING_VERSION>
5
+ https://gitlab.com/gitlab-org/gitlab-qa/-/compare/<PREVIOUS_VERSION>...<COMMIT_UPDATING_VERSION>
6
6
 
7
7
  ## Pre-merge checklist
8
8
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-qa (14.0.1)
4
+ gitlab-qa (14.1.0)
5
5
  activesupport (>= 6.1, < 7.2)
6
6
  gitlab (~> 4.19)
7
7
  http (~> 5.0)
@@ -40,7 +40,7 @@ module Gitlab
40
40
  gitlab.name = 'gitlab'
41
41
  gitlab.network = @network
42
42
 
43
- gitlab.omnibus_gitlab_rails_env['CODE_SUGGESTIONS_BASE_URL'] = "http://#{@ai_gateway_hostname}:#{@ai_gateway_port}"
43
+ gitlab.omnibus_gitlab_rails_env['AI_GATEWAY_URL'] = "http://#{@ai_gateway_hostname}:#{@ai_gateway_port}"
44
44
 
45
45
  gitlab.set_ee_activation_code
46
46
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '14.0.1'
5
+ VERSION = '14.1.0'
6
6
  end
7
7
  end
@@ -3,26 +3,28 @@
3
3
  class CodeSuggestionsSetup
4
4
  class << self
5
5
  def configure!
6
- puts 'Enabling code_suggestions_tokens_api feature flag...'
7
- Feature.enable(:code_suggestions_tokens_api)
8
-
9
6
  activate_cloud_license
10
7
 
11
8
  # Due to the various async Sidekiq processes involved, we wait to verify
12
9
  # that the code suggestions access token has been generated before proceeding
13
10
  verify_code_suggestions_access_token
14
11
 
12
+ # TODO: Remove after service start date
13
+ # This toggle will no longer be used to control access to code suggestions
14
+ # See https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/policies/ee/global_policy.rb#L62
15
15
  puts 'Enabling application setting instance_level_code_suggestions_enabled...'
16
16
  ApplicationSetting.last.update(instance_level_code_suggestions_enabled: true)
17
+
18
+ assign_code_suggestions_seat_to_admin
17
19
  end
18
20
 
19
21
  private
20
22
 
21
23
  def activate_cloud_license
22
24
  puts 'Activating cloud license...'
23
- activation_result = ::GitlabSubscriptions::ActivateService.new.execute(ENV.fetch('QA_EE_ACTIVATION_CODE', nil))
25
+ result = ::GitlabSubscriptions::ActivateService.new.execute(ENV.fetch('QA_EE_ACTIVATION_CODE', nil))
24
26
 
25
- if activation_result[:success]
27
+ if result[:success]
26
28
  puts 'Cloud license activation successful'
27
29
  else
28
30
  puts 'Cloud license activation failed!'
@@ -48,6 +50,26 @@ class CodeSuggestionsSetup
48
50
  puts "Failed to create code suggestions access token after #{max_attempts} attempts"
49
51
  exit 1
50
52
  end
53
+
54
+ def assign_code_suggestions_seat_to_admin
55
+ puts 'Assigning code suggestions seat to admin...'
56
+
57
+ admin = User.find_by(username: 'root')
58
+ add_on = GitlabSubscriptions::AddOnPurchase.find_by(add_on: GitlabSubscriptions::AddOn.code_suggestions.last)
59
+
60
+ result = ::GitlabSubscriptions::UserAddOnAssignments::SelfManaged::CreateService.new(
61
+ add_on_purchase: add_on, user: admin
62
+ ).execute
63
+
64
+ if result.is_a?(ServiceResponse) && result[:status] == :success
65
+ puts 'Seat assignment for admin successful'
66
+ else
67
+ puts 'Seat assignment for admin failed!'
68
+
69
+ error = result.is_a?(ServiceResponse) ? result[:message] : result
70
+ puts error
71
+ end
72
+ end
51
73
  end
52
74
  end
53
75
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-qa
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.0.1
4
+ version: 14.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-24 00:00:00.000000000 Z
11
+ date: 2024-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control