gitlab-qa 7.24.5 → 7.24.6

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: 68f574050bbfc1f6ede0a0bb9f87b5e5c1e8f5403739f56294cae2fb1e60fccc
4
- data.tar.gz: 57a53ed8a9e1f1071a38bfb96ad46ed13fd566023ac9460751f0dc3da4874291
3
+ metadata.gz: 1ab5663ab224b79f77ee02d363fa0e38d5a14f53e895b5135e87a79e91ebb89a
4
+ data.tar.gz: 0b42e0776e042612565fe7e55af86db3dd3559dcdce549e4d937948e55173f81
5
5
  SHA512:
6
- metadata.gz: da89e0ab1a89cefa915d6b734867a78fd6d8e66725d9ba75dac1eeae8faa007cf7fd8fe97372a5f5919a08a8cc482694cc2d9eab25083fc5502d26c3425e082e
7
- data.tar.gz: a293a8034877b7f64718e18969809e25dac26943667aafed41e93a433677369ee956707d447234c3d75d5112011d9423a9f4f46102ad4817f833122004d3f560
6
+ metadata.gz: a9046b2ee0a0a41d289a3551c4fe5179198b86854bcda525b1bc25915f5cc43f1b2d43f7197f077b55a43dd92bd3e40cd38c5d672bff4aa8b3c166933f7bd941
7
+ data.tar.gz: c3b2491338c9a433cf3cf1ae83864484e1f769cc3626497e2ef2e3b37717b1a58b481aec74fe37024ed7a18e7cd80364f749f6d9cab481a761c81b16aaab2cd8
data/.gitlab-ci.yml CHANGED
@@ -820,7 +820,7 @@ ee:object_storage-quarantine:
820
820
  GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config object_storage"
821
821
  QA_RSPEC_TAGS: "--tag quarantine --tag object_storage"
822
822
 
823
- ee:packages:
823
+ ee:packages-parallel:
824
824
  extends:
825
825
  - .rules:ee-never-when-triggered-by-feature-flag-definition-change
826
826
  - .test
@@ -828,6 +828,7 @@ ee:packages:
828
828
  - .ee-variables
829
829
  - .rspec-report-opts
830
830
  - .combined-gitlab-qa-options-script
831
+ parallel: 2
831
832
  variables:
832
833
  GITLAB_QA_OPTIONS_COMBINED: "$GITLAB_QA_OPTIONS --omnibus-config packages"
833
834
  QA_RSPEC_TAGS: "--tag packages"
@@ -1388,3 +1389,7 @@ include:
1388
1389
  - '/ci/gem-release.yml'
1389
1390
  - '/ci/allure-report.yml'
1390
1391
  - '/ci/knapsack-report.yml'
1392
+ - '/ci/danger-review.yml'
1393
+
1394
+ danger-review:
1395
+ stage: check
data/Dangerfile CHANGED
@@ -1,9 +1,7 @@
1
1
  require 'gitlab-dangerfiles'
2
2
 
3
3
  Gitlab::Dangerfiles.for_project(self) do |dangerfiles|
4
- # Import all plugins from the gem
5
4
  dangerfiles.import_plugins
6
5
 
7
- # Import only a subset of rules
8
- dangerfiles.import_dangerfiles(only: %w[changes_size commit_messages simple_roulette])
6
+ dangerfiles.import_dangerfiles(except: %w[changelog])
9
7
  end
@@ -86,14 +86,16 @@ module Gitlab
86
86
  ld = Class.new.extend(Gem::Text).method(:levenshtein_distance)
87
87
  full_stacktrace = test.failures.first['message_lines'].join("\n")
88
88
  first_test_failure_stacktrace = sanitize_stacktrace(full_stacktrace, FAILURE_STACKTRACE_REGEX) || full_stacktrace
89
+ clean_first_test_failure_stacktrace = remove_unique_resource_names(first_test_failure_stacktrace)
89
90
 
90
91
  # Search with the `search` param returns 500 errors, so we filter by ~QA and then filter further in Ruby
91
92
  failure_issues(test).each_with_object({}) do |issue, memo|
92
93
  relevant_issue_stacktrace = find_issue_stacktrace(issue)
93
94
  next unless relevant_issue_stacktrace
94
95
 
95
- distance = ld.call(first_test_failure_stacktrace, relevant_issue_stacktrace)
96
- diff_ratio = distance.zero? ? 0.0 : (distance.to_f / first_test_failure_stacktrace.size).round(3)
96
+ clean_relevant_issue_stacktrace = remove_unique_resource_names(relevant_issue_stacktrace)
97
+ distance = ld.call(clean_first_test_failure_stacktrace, clean_relevant_issue_stacktrace)
98
+ diff_ratio = distance.zero? ? 0.0 : (distance.to_f / clean_first_test_failure_stacktrace.size).round(3)
97
99
 
98
100
  if diff_ratio <= max_diff_ratio
99
101
  puts " => [DEBUG] Issue #{issue.web_url} has an acceptable diff ratio of #{(diff_ratio * 100).round(2)}%."
@@ -128,6 +130,10 @@ module Gitlab
128
130
  end
129
131
  end
130
132
 
133
+ def remove_unique_resource_names(stacktrace)
134
+ stacktrace.gsub(/qa-(test|user)-[a-z0-9-]+/, '<unique-test-resource>').gsub(/(?:-|_)(?:\d+[a-z]|[a-z]+\d)[a-z\d]{4,}/, '<unique-hash>')
135
+ end
136
+
131
137
  def find_failure_issue(test)
132
138
  relevant_issues = find_relevant_failure_issues(test)
133
139
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Gitlab
4
4
  module QA
5
- VERSION = '7.24.5'
5
+ VERSION = '7.24.6'
6
6
  end
7
7
  end
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: 7.24.5
4
+ version: 7.24.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-21 00:00:00.000000000 Z
11
+ date: 2022-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control
@@ -218,7 +218,6 @@ files:
218
218
  - ".dockerignore"
219
219
  - ".gitignore"
220
220
  - ".gitlab-ci.yml"
221
- - ".gitlab/ci/danger.gitlab-ci.yml"
222
221
  - ".gitlab/ci/rules.gitlab-ci.yml"
223
222
  - ".gitlab/issue_templates/Default.md"
224
223
  - ".gitlab/merge_request_templates/Default.md"
@@ -1,25 +0,0 @@
1
- danger-review:
2
- image: ruby:3.0
3
- stage: check
4
- rules:
5
- - if: '$CI_MERGE_REQUEST_IID'
6
- needs: []
7
- retry:
8
- max: 2
9
- when:
10
- - unknown_failure
11
- - api_failure
12
- - runner_system_failure
13
- - stuck_or_timeout_failure
14
- before_script:
15
- - bundle install
16
- script:
17
- - >
18
- if [ -z "$DANGER_GITLAB_API_TOKEN" ]; then
19
- # Force danger to skip CI source GitLab and fallback to "local only git repo".
20
- unset GITLAB_CI
21
- # We need the base SHA of the merge request diff to help danger determine the base commit for this shallow clone.
22
- bundle exec danger dry_run --fail-on-errors=true --verbose --base='$CI_MERGE_REQUEST_DIFF_BASE_SHA' --head='${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA:-$CI_COMMIT_SHA}'
23
- else
24
- bundle exec danger --fail-on-errors=true --verbose
25
- fi