gitlab_quality-test_tooling 1.14.1 → 1.14.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d4626e6b818482d139f6256f13044ae3434b93989c377526485aae69f32b9eb
4
- data.tar.gz: 148291a52850f6b6b5612dc0e1c46d2a6af0115d771c3ad3c9d1a0af7dbe2280
3
+ metadata.gz: 14bec41f34b3f27d3e5c1c6fe900e918a78d1fbf2e2e44f05e18abb68e533e35
4
+ data.tar.gz: 2613da07d940b2b4c9ee096600417a963fbf670bd5b9b3ecb44263f50775e486
5
5
  SHA512:
6
- metadata.gz: a2fca44f7bf0ccda3cf905e561b8d52f7462df04c35f54a92d61fed7f4e6121e82bd2d3d60757f46b1c8d2cd30e788ac72aad4fd9d96e5607e50960437c7c58c
7
- data.tar.gz: 29a5e42c5c8f34b76e2aabb6280f0150a4aedf5d34a43bf44aef4be25aacb71d6a5f1bd9942f0593ec90626db3079cc2ad2fd4ee40ef084e9de9bd738cd427d4
6
+ metadata.gz: 220ca8d8ced57c9a2294f83ae4bfaacdf293ed4945bd5c986075001a0c302c98b8ddc1aa27bd735b9df8c474a56b9795f8fb44e2a35396d5900799dca0720237
7
+ data.tar.gz: 90af1e3e738f9196bbd8dfa20b4bb973e875e1b1d24eb1e2b6a4de5186e2fb17cfe3eff2b76e02c683e7509a806daf34b71bd8fff0499e23ca0ad0959cc54176
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab_quality-test_tooling (1.14.1)
4
+ gitlab_quality-test_tooling (1.14.2)
5
5
  activesupport (>= 6.1, < 7.1)
6
6
  amatch (~> 0.4.1)
7
7
  gitlab (~> 4.19)
@@ -9,7 +9,7 @@ module GitlabQuality
9
9
  client.create_branch(project, branch_name, ref)
10
10
  end
11
11
 
12
- Runtime::Logger.debug("Created branch #{branch['name']} (#{branch['web_url']})")
12
+ Runtime::Logger.debug("Created branch #{branch['name']} (#{branch['web_url']})") if branch
13
13
  branch
14
14
  end
15
15
  end
@@ -5,11 +5,13 @@ module GitlabQuality
5
5
  module GitlabClient
6
6
  class CommitsClient < GitlabClient
7
7
  def create(branch_name, file_path, new_content, message)
8
- commit = client.create_commit(project, branch_name, message, [
9
- { action: :update, file_path: file_path, content: new_content }
10
- ])
8
+ commit = handle_gitlab_client_exceptions do
9
+ client.create_commit(project, branch_name, message, [
10
+ { action: :update, file_path: file_path, content: new_content }
11
+ ])
12
+ end
11
13
 
12
- Runtime::Logger.debug("Created commit #{commit['id']} (#{commit['web_url']}) on #{branch_name}")
14
+ Runtime::Logger.debug("Created commit #{commit['id']} (#{commit['web_url']}) on #{branch_name}") if commit
13
15
  commit
14
16
  end
15
17
  end
@@ -22,7 +22,7 @@ module GitlabQuality
22
22
  # If so, we want it to terminate at that point
23
23
  raise
24
24
  rescue SystemCallError, OpenSSL::SSL::SSLError, Net::OpenTimeout, Net::ReadTimeout,
25
- Gitlab::Error::InternalServerError, Gitlab::Error::Parsing => e
25
+ Gitlab::Error::InternalServerError, Gitlab::Error::BadRequest, Gitlab::Error::ResponseError, Gitlab::Error::Parsing => e
26
26
  @retry_backoff += RETRY_BACK_OFF_DELAY
27
27
 
28
28
  raise if @retry_backoff > RETRY_BACK_OFF_DELAY * MAX_RETRY_ATTEMPTS
@@ -5,7 +5,9 @@ module GitlabQuality
5
5
  module GitlabClient
6
6
  class MergeRequestsClient < GitlabClient
7
7
  def find_merge_request_changes(merge_request_iid:)
8
- client.merge_request_changes(project, merge_request_iid)
8
+ handle_gitlab_client_exceptions do
9
+ client.merge_request_changes(project, merge_request_iid)
10
+ end
9
11
  end
10
12
 
11
13
  def create_merge_request(title:, source_branch:, target_branch:, description:, labels:, assignee_id: nil)
@@ -89,7 +89,7 @@ module GitlabQuality
89
89
  # @return [Boolean]
90
90
  def proceed_with_merge_request?
91
91
  open_mrs = context.existing_merge_requests(title: mr_title)
92
- if open_mrs.any?
92
+ if open_mrs&.any?
93
93
  puts " An open MR already exists for '#{example_name}': #{open_mrs.first['web_url']}. Will not proceed with creating MR."
94
94
  return false
95
95
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GitlabQuality
4
4
  module TestTooling
5
- VERSION = "1.14.1"
5
+ VERSION = "1.14.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_quality-test_tooling
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.1
4
+ version: 1.14.2
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-26 00:00:00.000000000 Z
11
+ date: 2024-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control