Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-21 09:11:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-21 09:11:31 +0300
commitac9b29213b08a6b52d7b788bda6413d4b2e621c3 (patch)
tree372fd1a98374b87c9b465cb9c8625daffc201298
parentd63d9aebd74436a74f1ff45e26f6565341d5956b (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--Gemfile4
-rw-r--r--Gemfile.checksum4
-rw-r--r--Gemfile.lock8
-rw-r--r--config/feature_flags/development/project_templates_without_min_access.yml8
-rw-r--r--doc/api/graphql/reference/index.md2
-rw-r--r--qa/qa/specs/features/api/1_manage/import/import_large_github_repo_spec.rb7
-rw-r--r--qa/qa/specs/features/api/1_manage/migration/gitlab_migration_large_project_spec.rb7
-rw-r--r--qa/qa/support/formatters/test_metrics_formatter.rb4
-rw-r--r--qa/spec/support/formatters/test_metrics_formatter_spec.rb26
-rw-r--r--spec/lib/gitlab/git/tree_spec.rb8
10 files changed, 59 insertions, 19 deletions
diff --git a/Gemfile b/Gemfile
index 5516307a5bf..45c5d9930b0 100644
--- a/Gemfile
+++ b/Gemfile
@@ -186,9 +186,9 @@ gem 'seed-fu', '~> 2.3.7'
gem 'elasticsearch-model', '~> 7.2'
gem 'elasticsearch-rails', '~> 7.2', require: 'elasticsearch/rails/instrumentation'
gem 'elasticsearch-api', '7.13.3'
-gem 'aws-sdk-core', '~> 3.182.0'
+gem 'aws-sdk-core', '~> 3.183.0'
gem 'aws-sdk-cloudformation', '~> 1'
-gem 'aws-sdk-s3', '~> 1.134.0'
+gem 'aws-sdk-s3', '~> 1.135.0'
gem 'faraday_middleware-aws-sigv4', '~>0.3.0'
gem 'typhoeus', '~> 1.4.0' # Used with Elasticsearch to support http keep-alive connections
diff --git a/Gemfile.checksum b/Gemfile.checksum
index 702f6471230..68ae0ebdea5 100644
--- a/Gemfile.checksum
+++ b/Gemfile.checksum
@@ -37,9 +37,9 @@
{"name":"aws-eventstream","version":"1.2.0","platform":"ruby","checksum":"ffa53482c92880b001ff2fb06919b9bb82fd847cbb0fa244985d2ebb6dd0d1df"},
{"name":"aws-partitions","version":"1.761.0","platform":"ruby","checksum":"291e444e1edfc92c5521a6dbdd1236ccc3f122b3520163b2be6ec5b6ef350ef2"},
{"name":"aws-sdk-cloudformation","version":"1.41.0","platform":"ruby","checksum":"31e47539719734413671edf9b1a31f8673fbf9688549f50c41affabbcb1c6b26"},
-{"name":"aws-sdk-core","version":"3.182.0","platform":"ruby","checksum":"1a08b53c380223cee2a159fd3b4b8e19db27cd1f98ac789fb6dd8c11bcee0d7c"},
+{"name":"aws-sdk-core","version":"3.183.0","platform":"ruby","checksum":"ab9fa89ef57bade14aebb3e1a1ca82026dfa0d9b1b39bea8daad038d997efc78"},
{"name":"aws-sdk-kms","version":"1.64.0","platform":"ruby","checksum":"40de596c95047bfc6e1aacea24f3df6241aa716b6f7ce08ac4c5f7e3120395ad"},
-{"name":"aws-sdk-s3","version":"1.134.0","platform":"ruby","checksum":"25135ec8af8b44c5221f50241810d3ae60bad0f52bfd618ab31d18ad52117fb9"},
+{"name":"aws-sdk-s3","version":"1.135.0","platform":"ruby","checksum":"80507daf642d04fbd9311e5804ec37201901293b474737400982f77efc36116b"},
{"name":"aws-sigv4","version":"1.6.0","platform":"ruby","checksum":"ca9e6a15cd424f1f32b524b9760995331459bc22e67d3daad4fcf0c0084b087d"},
{"name":"axe-core-api","version":"4.6.0","platform":"ruby","checksum":"1b0ddec3353f108dc10363baf2282f43a5ff7f13d4e25f99071294e78f8a6c62"},
{"name":"axe-core-rspec","version":"4.6.0","platform":"ruby","checksum":"11c25bc9dd388c137ba4e5e63d64d20092bf22c884d8ffc829a22acfbacd747f"},
diff --git a/Gemfile.lock b/Gemfile.lock
index 8b812860e84..e0ca67172bf 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -265,7 +265,7 @@ GEM
aws-sdk-cloudformation (1.41.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
- aws-sdk-core (3.182.0)
+ aws-sdk-core (3.183.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
@@ -273,7 +273,7 @@ GEM
aws-sdk-kms (1.64.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
- aws-sdk-s3 (1.134.0)
+ aws-sdk-s3 (1.135.0)
aws-sdk-core (~> 3, >= 3.181.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.6)
@@ -1745,8 +1745,8 @@ DEPENDENCIES
autoprefixer-rails (= 10.2.5.1)
awesome_print
aws-sdk-cloudformation (~> 1)
- aws-sdk-core (~> 3.182.0)
- aws-sdk-s3 (~> 1.134.0)
+ aws-sdk-core (~> 3.183.0)
+ aws-sdk-s3 (~> 1.135.0)
axe-core-rspec
babosa (~> 2.0)
base32 (~> 0.3.0)
diff --git a/config/feature_flags/development/project_templates_without_min_access.yml b/config/feature_flags/development/project_templates_without_min_access.yml
new file mode 100644
index 00000000000..5de9ba18191
--- /dev/null
+++ b/config/feature_flags/development/project_templates_without_min_access.yml
@@ -0,0 +1,8 @@
+---
+name: project_templates_without_min_access
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132025
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/425452
+milestone: '16.5'
+type: development
+group: group::source code
+default_enabled: false
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index 51e36917770..4542df348b8 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -16643,6 +16643,7 @@ Relationship between an epic and an issue.
| <a id="epicissueescalationstatus"></a>`escalationStatus` | [`IssueEscalationStatus`](#issueescalationstatus) | Escalation status of the issue. |
| <a id="epicissueexternalauthor"></a>`externalAuthor` | [`String`](#string) | Email address of non-GitLab user reporting the issue. For guests, the email address is obfuscated. |
| <a id="epicissuehasepic"></a>`hasEpic` | [`Boolean!`](#boolean) | Indicates if the issue belongs to an epic. Can return true and not show an associated epic when the user has no access to the epic. |
+| <a id="epicissuehasparent"></a>`hasParent` **{warning-solid}** | [`Boolean!`](#boolean) | **Introduced** in 16.5. This feature is an Experiment. It can be changed or removed at any time. Indicates if the issue has a parent work item. |
| <a id="epicissuehealthstatus"></a>`healthStatus` | [`HealthStatus`](#healthstatus) | Current health status. |
| <a id="epicissuehidden"></a>`hidden` | [`Boolean`](#boolean) | Indicates the issue is hidden because the author has been banned. |
| <a id="epicissuehumantimeestimate"></a>`humanTimeEstimate` | [`String`](#string) | Human-readable time estimate of the issue. |
@@ -18904,6 +18905,7 @@ Describes an issuable resource link for incident issues.
| <a id="issueescalationstatus"></a>`escalationStatus` | [`IssueEscalationStatus`](#issueescalationstatus) | Escalation status of the issue. |
| <a id="issueexternalauthor"></a>`externalAuthor` | [`String`](#string) | Email address of non-GitLab user reporting the issue. For guests, the email address is obfuscated. |
| <a id="issuehasepic"></a>`hasEpic` | [`Boolean!`](#boolean) | Indicates if the issue belongs to an epic. Can return true and not show an associated epic when the user has no access to the epic. |
+| <a id="issuehasparent"></a>`hasParent` **{warning-solid}** | [`Boolean!`](#boolean) | **Introduced** in 16.5. This feature is an Experiment. It can be changed or removed at any time. Indicates if the issue has a parent work item. |
| <a id="issuehealthstatus"></a>`healthStatus` | [`HealthStatus`](#healthstatus) | Current health status. |
| <a id="issuehidden"></a>`hidden` | [`Boolean`](#boolean) | Indicates the issue is hidden because the author has been banned. |
| <a id="issuehumantimeestimate"></a>`humanTimeEstimate` | [`String`](#string) | Human-readable time estimate of the issue. |
diff --git a/qa/qa/specs/features/api/1_manage/import/import_large_github_repo_spec.rb b/qa/qa/specs/features/api/1_manage/import/import_large_github_repo_spec.rb
index d90a6aea864..555b05c99d6 100644
--- a/qa/qa/specs/features/api/1_manage/import/import_large_github_repo_spec.rb
+++ b/qa/qa/specs/features/api/1_manage/import/import_large_github_repo_spec.rb
@@ -6,7 +6,11 @@ require "etc"
# rubocop:disable Rails/Pluck
module QA
- RSpec.describe 'Manage', :github, requires_admin: 'creates users', only: { job: 'large-github-import' } do
+ RSpec.describe 'Manage', :github, requires_admin: 'creates users',
+ only: { condition: -> { ENV["CI_PROJECT_NAME"] == "import-metrics" } },
+ custom_test_metrics: {
+ tags: { import_type: ENV["QA_IMPORT_TYPE"], import_repo: ENV["QA_LARGE_IMPORT_REPO"] || "rspec/rspec-core" }
+ } do
describe 'Project import', product_group: :import_and_integrate do # rubocop:disable RSpec/MultipleMemoizedHelpers
let(:github_repo) { ENV['QA_LARGE_IMPORT_REPO'] || 'rspec/rspec-core' }
let(:import_max_duration) { ENV['QA_LARGE_IMPORT_DURATION']&.to_i || 7200 }
@@ -224,6 +228,7 @@ module QA
save_json(
"data",
{
+ status: example.exception ? "failed" : "passed",
importer: :github,
import_time: @import_time,
errors: imported_project.project_import_status[:failed_relations],
diff --git a/qa/qa/specs/features/api/1_manage/migration/gitlab_migration_large_project_spec.rb b/qa/qa/specs/features/api/1_manage/migration/gitlab_migration_large_project_spec.rb
index 541f057eba1..bc03d229678 100644
--- a/qa/qa/specs/features/api/1_manage/migration/gitlab_migration_large_project_spec.rb
+++ b/qa/qa/specs/features/api/1_manage/migration/gitlab_migration_large_project_spec.rb
@@ -4,7 +4,11 @@
# rubocop:disable Rails/Pluck, Layout/LineLength, RSpec/MultipleMemoizedHelpers
module QA
- RSpec.describe "Manage", :skip_live_env, only: { job: "large-gitlab-import" } do
+ RSpec.describe "Manage", :skip_live_env,
+ only: { condition: -> { ENV["CI_PROJECT_NAME"] == "import-metrics" } },
+ custom_test_metrics: {
+ tags: { import_type: ENV["QA_IMPORT_TYPE"], import_repo: ENV["QA_LARGE_IMPORT_REPO"] || "migration-test-project" }
+ } do
describe "Gitlab migration", orchestrated: false, product_group: :import_and_integrate do
include_context "with gitlab group migration"
@@ -79,6 +83,7 @@ module QA
save_json(
"data",
{
+ status: example.exception ? "failed" : "passed",
importer: :gitlab,
import_time: @import_time,
errors: import_failures,
diff --git a/qa/qa/support/formatters/test_metrics_formatter.rb b/qa/qa/support/formatters/test_metrics_formatter.rb
index 5b3f5d1d77a..f6f8940b360 100644
--- a/qa/qa/support/formatters/test_metrics_formatter.rb
+++ b/qa/qa/support/formatters/test_metrics_formatter.rb
@@ -89,7 +89,9 @@ module QA
# @param [RSpec::Core::Example] example
# @return [Hash]
def test_stats(example)
- file_path = example.metadata[:file_path].gsub('./qa/specs/features', '')
+ # use rerun_file_path so shared_examples have the correct file path
+ file_path = example.metadata[:rerun_file_path].gsub('./qa/specs/features', '')
+
api_fabrication = ((example.metadata[:api_fabrication] || 0) * 1000).round
ui_fabrication = ((example.metadata[:browser_ui_fabrication] || 0) * 1000).round
diff --git a/qa/spec/support/formatters/test_metrics_formatter_spec.rb b/qa/spec/support/formatters/test_metrics_formatter_spec.rb
index 5342cfe12e3..0e8673f1c0f 100644
--- a/qa/spec/support/formatters/test_metrics_formatter_spec.rb
+++ b/qa/spec/support/formatters/test_metrics_formatter_spec.rb
@@ -22,8 +22,8 @@ describe QA::Support::Formatters::TestMetricsFormatter do
let(:quarantined) { 'false' }
let(:influx_client) { instance_double('InfluxDB2::Client', create_write_api: influx_write_api) }
let(:influx_write_api) { instance_double('InfluxDB2::WriteApi', write: nil) }
- let(:stage) { '1_manage' }
- let(:file_path) { "./qa/specs/features/#{stage}/subfolder/some_spec.rb" }
+ let(:file_path) { "./qa/specs/features/1_manage/subfolder/some_spec.rb" }
+ let(:rerun_file_path) { "./qa/specs/features/1_manage/subfolder/some_spec.rb" }
let(:ui_fabrication) { 0 }
let(:api_fabrication) { 0 }
let(:fabrication_resources) { {} }
@@ -53,7 +53,7 @@ describe QA::Support::Formatters::TestMetricsFormatter do
job_name: 'test-job',
merge_request: 'false',
run_type: run_type,
- stage: stage.match(%r{\d{1,2}_(\w+)}).captures.first,
+ stage: 'manage',
product_group: product_group,
testcase: testcase
},
@@ -78,7 +78,10 @@ describe QA::Support::Formatters::TestMetricsFormatter do
spec ||= -> { it('spec', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/1234') {} }
describe_successfully('stats export', &spec).tap do |example_group|
- example_group.examples.each { |ex| ex.metadata[:file_path] = file_path }
+ example_group.examples.each do |ex|
+ ex.metadata[:file_path] = file_path
+ ex.metadata[:rerun_file_path] = rerun_file_path
+ end
end
send_stop_notification
end
@@ -192,7 +195,7 @@ describe QA::Support::Formatters::TestMetricsFormatter do
context 'with context quarantined spec' do
let(:quarantined) { 'false' }
- it 'exports data to influxdb with correct qurantine tag' do
+ it 'exports data to influxdb with correct quarantine tag' do
run_spec do
it(
'spec',
@@ -294,6 +297,19 @@ describe QA::Support::Formatters::TestMetricsFormatter do
end
end
+ context 'with a shared example' do
+ let(:file_path) { './qa/specs/features/shared_examples/merge_with_code_owner_shared_examples.rb' }
+ let(:rerun_file_path) { './qa/specs/features/3_create/subfolder/another_spec.rb' }
+
+ it 'exports data to influxdb with correct filename' do
+ run_spec
+
+ data[:tags][:file_path] = '/3_create/subfolder/another_spec.rb'
+ data[:tags][:stage] = 'create'
+ expect(influx_write_api).to have_received(:write).with(data: [data])
+ end
+ end
+
context 'with fabrication resources' do
let(:fabrication_resources) do
{
diff --git a/spec/lib/gitlab/git/tree_spec.rb b/spec/lib/gitlab/git/tree_spec.rb
index 84ab8376fe1..896339be0e3 100644
--- a/spec/lib/gitlab/git/tree_spec.rb
+++ b/spec/lib/gitlab/git/tree_spec.rb
@@ -2,11 +2,11 @@
require "spec_helper"
-RSpec.describe Gitlab::Git::Tree do
+RSpec.describe Gitlab::Git::Tree, feature_category: :source_code_management do
let_it_be(:user) { create(:user) }
- let(:project) { create(:project, :repository) }
- let(:repository) { project.repository.raw }
+ let_it_be(:project) { create(:project, :repository) }
+ let_it_be(:repository) { project.repository.raw }
shared_examples 'repo' do
subject(:tree) { Gitlab::Git::Tree.where(repository, sha, path, recursive, skip_flat_paths, rescue_not_found, pagination_params) }
@@ -95,6 +95,8 @@ RSpec.describe Gitlab::Git::Tree do
end
context :flat_path do
+ let(:project) { create(:project, :repository) }
+ let(:repository) { project.repository.raw }
let(:filename) { 'files/flat/path/correct/content.txt' }
let(:path) { 'files/flat' }
# rubocop: disable Rails/FindBy