gitlab_quality-test_tooling 1.38.0 → 1.39.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3637a075d6d648d02c32ba655c94a1fcbe7eb4d6aa1c4cabf3387ea5b00b8af3
4
- data.tar.gz: ba6326ac31d8e7a558069ac6e195841e572ad9f8de772fa3281fd3c7f5c2bc3e
3
+ metadata.gz: e87f64ae21e1503086674e077ee9c65072bbb34b6d5c90a97473aa771c949998
4
+ data.tar.gz: c01d95a8ffc05fb31c58e552c73ba76f60e847dca360bf45f3e5d60a6ebb59f8
5
5
  SHA512:
6
- metadata.gz: 1bed8063e6e2e5504edcf23c88b05390c5ee2ed81651bc108ef28df1d1e70f4ab214fbdb84c0f8e645aaee36f36cfe181ae101a8a5bd9d8063e75bd9ae01e38e
7
- data.tar.gz: ebfadcceffe6327444fd2f614a29fc31c5116902c0113416ba3d40e3f750381cc5263c6b8a399b5eaaa1c3b96b12853e6467989d48c05116fabdd454db590d11
6
+ metadata.gz: 12ce0cf0811d94f50244de3f61247ba992096a8801130f7801d0901f7edfa67861c166e76366d75cf5d3ecbb62112c632b1bac6aa49bda33eeb162c8b36ea146
7
+ data.tar.gz: ed223adb0e1729db0637a49de34e337a1fbfd8b684eadc7272010317008ddaf1503e63b68a7a8caccbc2331b8553c24e7b4bf7e345d6a4b4d1038a6142e31c6f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab_quality-test_tooling (1.38.0)
4
+ gitlab_quality-test_tooling (1.39.0)
5
5
  activesupport (>= 7.0, < 7.2)
6
6
  amatch (~> 0.4.1)
7
7
  fog-google (~> 1.24, >= 1.24.1)
@@ -11,7 +11,7 @@ module GitlabQuality
11
11
  # - Find issue by test hash or create a new issue if no issue was found
12
12
  # - Add a failure report in the "Failure reports" note
13
13
  class FailedTestIssue < HealthProblemReporter
14
- IDENTITY_LABELS = ['test', 'automation:bot-authored'].freeze
14
+ IDENTITY_LABELS = ['test', 'test-health:failures', 'automation:bot-authored'].freeze
15
15
  NEW_ISSUE_LABELS = Set.new(['type::maintenance', 'failure::new', 'priority::3', 'severity::3', *IDENTITY_LABELS]).freeze
16
16
  REPORT_SECTION_HEADER = '#### Failure reports'
17
17
 
@@ -12,7 +12,7 @@ module GitlabQuality
12
12
  # - Find issue by test hash or create a new issue if no issue was found
13
13
  # - Add a flakiness report in the "Flakiness reports" note
14
14
  class FlakyTestIssue < HealthProblemReporter
15
- IDENTITY_LABELS = ['test', 'failure::flaky-test', 'automation:bot-authored'].freeze
15
+ IDENTITY_LABELS = ['test', 'failure::flaky-test', 'test-health:pass-after-retry', 'automation:bot-authored'].freeze
16
16
  NEW_ISSUE_LABELS = Set.new(['type::maintenance', 'priority::3', 'severity::3', *IDENTITY_LABELS]).freeze
17
17
  REPORT_SECTION_HEADER = '### Flakiness reports'
18
18
  REPORTS_DOCUMENTATION = <<~DOC
@@ -33,7 +33,7 @@ module GitlabQuality
33
33
  issue = gitlab.create_issue(
34
34
  title: "#{Time.now.strftime('%Y-%m-%d')} Test session report | #{Runtime::Env.qa_run_type}",
35
35
  description: generate_description(tests),
36
- labels: ['Quality', 'QA', 'triage report', pipeline_name_label],
36
+ labels: ['automation:bot-authored', 'Quality', 'QA', 'triage report', pipeline_name_label],
37
37
  confidential: confidential
38
38
  )
39
39
 
@@ -16,7 +16,10 @@ module GitlabQuality
16
16
  class KnapsackReportIssue < ReportAsIssue
17
17
  include Concerns::GroupAndCategoryLabels
18
18
 
19
- NEW_ISSUE_LABELS = Set.new(['test', 'type::maintenance', 'maintenance::performance', 'priority::3', 'severity::3', 'knapsack_report']).freeze
19
+ NEW_ISSUE_LABELS = Set.new([
20
+ 'test', 'automation::bot-authored', 'type::maintenance', 'maintenance::performance',
21
+ 'priority::3', 'severity::3', 'knapsack_report'
22
+ ]).freeze
20
23
  SEARCH_LABELS = %w[test maintenance::performance knapsack_report].freeze
21
24
  JOB_TIMEOUT_EPIC_URL = 'https://gitlab.com/groups/gitlab-org/quality/engineering-productivity/-/epics/19'
22
25
 
@@ -23,7 +23,7 @@ module GitlabQuality
23
23
  FAILURE_STACKTRACE_REGEX = %r{(?:(?:.*Failure/Error:(?<stacktrace>.+))|(?<stacktrace>.+))}m
24
24
  ISSUE_STACKTRACE_REGEX = /### Stack trace\s*(```)#{FAILURE_STACKTRACE_REGEX}(```)\n*\n###/m
25
25
 
26
- NEW_ISSUE_LABELS = Set.new(%w[test failure::new priority::2]).freeze
26
+ NEW_ISSUE_LABELS = Set.new(%w[test failure::new priority::2 automation:bot-authored]).freeze
27
27
  SCREENSHOT_IGNORED_ERRORS = ['500 Internal Server Error', 'fabricate_via_api!', 'Error Code 500'].freeze
28
28
 
29
29
  MultipleIssuesFound = Class.new(StandardError)
@@ -10,8 +10,8 @@ module GitlabQuality
10
10
  # - Find issue by title (with test description or test file)
11
11
  # - Add test metadata, duration to the issue with group and category labels
12
12
  class SlowTestIssue < HealthProblemReporter
13
- IDENTITY_LABELS = ['test', 'rspec:slow test', 'rspec profiling', 'automation:bot-authored'].freeze
14
- NEW_ISSUE_LABELS = Set.new(['test', 'type::maintenance', 'maintenance::performance', 'priority::3', 'severity::3']).freeze
13
+ IDENTITY_LABELS = ['test', 'rspec:slow test', 'test-health:slow', 'rspec profiling', 'automation:bot-authored'].freeze
14
+ NEW_ISSUE_LABELS = Set.new(['test', 'type::maintenance', 'maintenance::performance', 'priority::3', 'severity::3', *IDENTITY_LABELS]).freeze
15
15
  REPORT_SECTION_HEADER = '### Slowness reports'
16
16
  REPORTS_DOCUMENTATION = <<~DOC
17
17
  Slow tests were detected, please see the [test speed best practices guide](https://docs.gitlab.com/ee/development/testing_guide/best_practices.html#test-speed)
@@ -8,6 +8,7 @@ module GitlabQuality
8
8
  BLOCKING_METADATA = ", :blocking%{suffix}"
9
9
  BRANCH_PREFIX = 'blocking-promotion'
10
10
 
11
+ MAX_LINE_LENGTH = 120
11
12
  class << self
12
13
  # Creates the merge requests for promoting E2E tests to :blocking
13
14
  #
@@ -137,6 +138,17 @@ module GitlabQuality
137
138
  line[line.rindex(' ')] = format(BLOCKING_METADATA, suffix: ' ')
138
139
  end
139
140
 
141
+ check_line_length(line)
142
+ end
143
+ end
144
+
145
+ # Add new line character and indentation if line length is greater than MAX_LINE_LENGTH
146
+ #
147
+ # @return [String]
148
+ def check_line_length(line)
149
+ if line.length > MAX_LINE_LENGTH
150
+ line.gsub(' :blocking', "\n#{context.indentation(line)}:blocking")
151
+ else
140
152
  line
141
153
  end
142
154
  end
@@ -304,7 +304,7 @@ module GitlabQuality
304
304
  (dry_run ? GitlabQuality::TestTooling::Slack::PostToSlackDry : GitlabQuality::TestTooling::Slack::PostToSlack).new(**slack_options).invoke!
305
305
  end
306
306
 
307
- # Provide indentaiton based on the given line
307
+ # Provide indentation based on the given line
308
308
  #
309
309
  # @param[String] line the line to use for indentation
310
310
  # @return[String] indentation
@@ -5,8 +5,13 @@ module GitlabQuality
5
5
  module TestResult
6
6
  class BaseTestResult
7
7
  IGNORED_FAILURES = [
8
- 'Net::ReadTimeout',
9
- '403 Forbidden - Your account has been blocked'
8
+ "Net::ReadTimeout",
9
+ "403 Forbidden - Your account has been blocked",
10
+ "API failed (502) with `GitLab is not responding",
11
+ "unexpected token at 'GitLab is not responding'",
12
+ "GitLab: Internal API error (502).",
13
+ "could not be found (502)",
14
+ "Error reference number: 502"
10
15
  ].freeze
11
16
 
12
17
  SHARED_EXAMPLES_CALLERS = %w[include_examples it_behaves_like].freeze
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GitlabQuality
4
4
  module TestTooling
5
- VERSION = "1.38.0"
5
+ VERSION = "1.39.0"
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.38.0
4
+ version: 1.39.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-09-05 00:00:00.000000000 Z
11
+ date: 2024-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control