summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-26 00:10:31 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-26 00:10:31 +0000
commitc08ac104a1e45b0560fb087039517335bac88080 (patch)
tree444971a5ee614c63aa0f2d662916be4387c9e9db
parent7625bc732c8b330989913fd933e6e94ecd4a1957 (diff)
downloadgitlab-ce-c08ac104a1e45b0560fb087039517335bac88080.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.rubocop_todo/layout/argument_alignment.yml1
-rw-r--r--.rubocop_todo/layout/line_length.yml1
-rw-r--r--.rubocop_todo/rspec/context_wording.yml1
-rw-r--r--.rubocop_todo/style/keyword_parameters_order.yml1
-rw-r--r--.rubocop_todo/style/percent_literal_delimiters.yml1
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.checksum2
-rw-r--r--Gemfile.lock8
-rw-r--r--app/assets/javascripts/environments/components/environment_actions.vue3
-rw-r--r--app/views/errors/request_conflict.html.haml2
-rw-r--r--qa/Gemfile2
-rw-r--r--qa/Gemfile.lock4
-rw-r--r--spec/features/projects/branches_spec.rb29
-rw-r--r--spec/features/projects/environments/environments_spec.rb5
14 files changed, 37 insertions, 25 deletions
diff --git a/.rubocop_todo/layout/argument_alignment.yml b/.rubocop_todo/layout/argument_alignment.yml
index 195f3fee98e..4b5fb5ad1a6 100644
--- a/.rubocop_todo/layout/argument_alignment.yml
+++ b/.rubocop_todo/layout/argument_alignment.yml
@@ -655,7 +655,6 @@ Layout/ArgumentAlignment:
- 'spec/features/merge_request/user_sees_versions_spec.rb'
- 'spec/features/merge_requests/user_lists_merge_requests_spec.rb'
- 'spec/features/merge_requests/user_views_open_merge_requests_spec.rb'
- - 'spec/features/projects/branches_spec.rb'
- 'spec/features/projects/commit/mini_pipeline_graph_spec.rb'
- 'spec/features/projects/environments/environment_spec.rb'
- 'spec/features/projects/environments/environments_spec.rb'
diff --git a/.rubocop_todo/layout/line_length.yml b/.rubocop_todo/layout/line_length.yml
index eaa8e6485be..d8d493b4731 100644
--- a/.rubocop_todo/layout/line_length.yml
+++ b/.rubocop_todo/layout/line_length.yml
@@ -4011,7 +4011,6 @@ Layout/LineLength:
- 'spec/features/projects/blobs/shortcuts_blob_spec.rb'
- 'spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb'
- 'spec/features/projects/blobs/user_views_pipeline_editor_button_spec.rb'
- - 'spec/features/projects/branches_spec.rb'
- 'spec/features/projects/ci/editor_spec.rb'
- 'spec/features/projects/commit/cherry_pick_spec.rb'
- 'spec/features/projects/commit/user_reverts_commit_spec.rb'
diff --git a/.rubocop_todo/rspec/context_wording.yml b/.rubocop_todo/rspec/context_wording.yml
index 37553bac410..f5c9e9cc059 100644
--- a/.rubocop_todo/rspec/context_wording.yml
+++ b/.rubocop_todo/rspec/context_wording.yml
@@ -1361,7 +1361,6 @@ RSpec/ContextWording:
- 'spec/features/projects/blobs/blob_show_spec.rb'
- 'spec/features/projects/blobs/edit_spec.rb'
- 'spec/features/projects/branches/user_views_branches_spec.rb'
- - 'spec/features/projects/branches_spec.rb'
- 'spec/features/projects/ci/lint_spec.rb'
- 'spec/features/projects/clusters_spec.rb'
- 'spec/features/projects/commit/comments/user_adds_comment_spec.rb'
diff --git a/.rubocop_todo/style/keyword_parameters_order.yml b/.rubocop_todo/style/keyword_parameters_order.yml
index 3521f295cc1..7c283fed44a 100644
--- a/.rubocop_todo/style/keyword_parameters_order.yml
+++ b/.rubocop_todo/style/keyword_parameters_order.yml
@@ -50,7 +50,6 @@ Style/KeywordParametersOrder:
- 'qa/qa/specs/features/ee/browser_ui/3_create/repository/file_locking_spec.rb'
- 'qa/qa/specs/features/ee/browser_ui/3_create/repository/push_rules_spec.rb'
- 'qa/spec/runtime/env_spec.rb'
- - 'spec/features/projects/branches_spec.rb'
- 'spec/graphql/types/ci/pipeline_counts_type_spec.rb'
- 'spec/lib/gitlab/background_migration/populate_vulnerability_reads_spec.rb'
- 'spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb'
diff --git a/.rubocop_todo/style/percent_literal_delimiters.yml b/.rubocop_todo/style/percent_literal_delimiters.yml
index 472a722ed22..bac2e807053 100644
--- a/.rubocop_todo/style/percent_literal_delimiters.yml
+++ b/.rubocop_todo/style/percent_literal_delimiters.yml
@@ -696,7 +696,6 @@ Style/PercentLiteralDelimiters:
- 'spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb'
- 'spec/features/projects/active_tabs_spec.rb'
- 'spec/features/projects/artifacts/user_downloads_artifacts_spec.rb'
- - 'spec/features/projects/branches_spec.rb'
- 'spec/features/projects/environments/environment_spec.rb'
- 'spec/features/projects/integrations/user_activates_jira_spec.rb'
- 'spec/features/projects/jobs_spec.rb'
diff --git a/Gemfile b/Gemfile
index 83008786a20..2afb575aba0 100644
--- a/Gemfile
+++ b/Gemfile
@@ -370,7 +370,7 @@ group :development do
gem 'solargraph', '~> 0.47.2', require: false
gem 'letter_opener_web', '~> 2.0.0'
- gem 'lookbook', '~> 1.0', '>= 1.0.8'
+ gem 'lookbook', '~> 1.2', '>= 1.2.1'
# Better errors handler
gem 'better_errors', '~> 2.9.1'
diff --git a/Gemfile.checksum b/Gemfile.checksum
index 6a68d1a93f3..ffc1425bb52 100644
--- a/Gemfile.checksum
+++ b/Gemfile.checksum
@@ -315,7 +315,7 @@
{"name":"lockbox","version":"0.6.2","platform":"ruby","checksum":"0136677875c3d6e27cef87cd7bd66610404e2b3cd7f07f1ac8ed34e48f18dc3c"},
{"name":"lograge","version":"0.11.2","platform":"ruby","checksum":"4cbd1554b86f545d795eff15a0c24fd25057d2ac4e1caa5fc186168b3da932ef"},
{"name":"loofah","version":"2.19.0","platform":"ruby","checksum":"302791371f473611e342f9e469e7f2fbf1155bb1b3a978a83ac7df625298feba"},
-{"name":"lookbook","version":"1.0.8","platform":"ruby","checksum":"e4b8789c5ff25c6443394da1d6b62966642c324e19c42d7f4cf3b5da2fe75f77"},
+{"name":"lookbook","version":"1.2.1","platform":"ruby","checksum":"742844b625798b689215d1660f711aa79ff54084f5e8735fe674fe771fc165d7"},
{"name":"lru_redux","version":"1.1.0","platform":"ruby","checksum":"ee71d0ccab164c51de146c27b480a68b3631d5b4297b8ffe8eda1c72de87affb"},
{"name":"lumberjack","version":"1.2.7","platform":"ruby","checksum":"a5c6aae6b4234f1420dbcd80b23e3bca0817bd239440dde097ebe3fa63c63b1f"},
{"name":"mail","version":"2.7.1","platform":"ruby","checksum":"ec2a3d489f7510b90d8eaa3f6abaad7038cf1d663cdf8ee66d0214a0bdf99c03"},
diff --git a/Gemfile.lock b/Gemfile.lock
index 054b5e81443..b210e4afd7f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -840,17 +840,19 @@ GEM
loofah (2.19.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
- lookbook (1.0.8)
+ lookbook (1.2.1)
actioncable
+ activemodel
css_parser
htmlbeautifier (~> 1.3)
htmlentities (~> 4.3.4)
listen (~> 3.0)
railties (>= 5.0)
redcarpet (~> 3.5)
- rouge (~> 3.26)
+ rouge (>= 3.26, < 5.0)
view_component (~> 2.0)
yard (~> 0.9.25)
+ zeitwerk (~> 2.5)
lru_redux (1.1.0)
lumberjack (1.2.7)
mail (2.7.1)
@@ -1689,7 +1691,7 @@ DEPENDENCIES
lockbox (~> 0.6.2)
lograge (~> 0.5)
loofah (~> 2.19.0)
- lookbook (~> 1.0, >= 1.0.8)
+ lookbook (~> 1.2, >= 1.2.1)
lru_redux
mail (= 2.7.1)
mail-smtp_pool (~> 0.1.0)!
diff --git a/app/assets/javascripts/environments/components/environment_actions.vue b/app/assets/javascripts/environments/components/environment_actions.vue
index c7e024aadec..74eef50ebaf 100644
--- a/app/assets/javascripts/environments/components/environment_actions.vue
+++ b/app/assets/javascripts/environments/components/environment_actions.vue
@@ -57,7 +57,8 @@ export default {
this.isLoading = true;
if (this.graphql) {
- this.$apollo.mutate({ mutation: actionMutation, variables: { action } });
+ await this.$apollo.mutate({ mutation: actionMutation, variables: { action } });
+ this.isLoading = false;
} else {
eventHub.$emit('postAction', { endpoint: action.playPath });
}
diff --git a/app/views/errors/request_conflict.html.haml b/app/views/errors/request_conflict.html.haml
index 2f5abaca72f..040aa880e1c 100644
--- a/app/views/errors/request_conflict.html.haml
+++ b/app/views/errors/request_conflict.html.haml
@@ -13,6 +13,6 @@
%p
= s_('409|Please contact your GitLab administrator if you think this is a mistake.')
.action-container.js-go-back{ hidden: true }
- %button{ type: 'button', class: 'gl-button btn btn-primary' }
+ = render Pajamas::ButtonComponent.new(variant: :confirm) do
= _('Go Back')
= render "errors/footer"
diff --git a/qa/Gemfile b/qa/Gemfile
index 35384fbbef3..a5a5da6aac4 100644
--- a/qa/Gemfile
+++ b/qa/Gemfile
@@ -26,7 +26,7 @@ gem 'octokit', '~> 5.6.1'
gem "faraday-retry", "~> 2.0"
gem 'webdrivers', '~> 5.2'
gem 'zeitwerk', '~> 2.4'
-gem 'influxdb-client', '~> 1.17'
+gem 'influxdb-client', '~> 2.7'
gem 'terminal-table', '~> 3.0.2', require: false
gem 'slack-notifier', '~> 2.4', require: false
gem 'fog-google', '~> 1.19', require: false
diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock
index da7238fbc53..71125538eff 100644
--- a/qa/Gemfile.lock
+++ b/qa/Gemfile.lock
@@ -156,7 +156,7 @@ GEM
httpclient (2.8.3)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
- influxdb-client (1.17.0)
+ influxdb-client (2.7.0)
jwt (2.5.0)
knapsack (4.0.0)
rake
@@ -315,7 +315,7 @@ DEPENDENCIES
fog-core (= 2.1.0)
fog-google (~> 1.19)
gitlab-qa (~> 8, >= 8.8.0)
- influxdb-client (~> 1.17)
+ influxdb-client (~> 2.7)
knapsack (~> 4.0)
nokogiri (~> 1.13, >= 1.13.9)
octokit (~> 5.6.1)
diff --git a/spec/features/projects/branches_spec.rb b/spec/features/projects/branches_spec.rb
index 361a07ebd0b..587556cf5ea 100644
--- a/spec/features/projects/branches_spec.rb
+++ b/spec/features/projects/branches_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe 'Branches' do
let_it_be(:project) { create(:project, :public, :repository) }
let(:repository) { project.repository }
- context 'logged in as developer' do
+ context 'when logged in as developer' do
before do
sign_in(user)
project.add_developer(user)
@@ -21,11 +21,15 @@ RSpec.describe 'Branches' do
before do
# Add 4 stale branches
(1..4).reverse_each do |i|
- travel_to((threshold + i.hours).ago) { create_file(message: "a commit in stale-#{i}", branch_name: "stale-#{i}") }
+ travel_to((threshold + i.hours).ago) do
+ create_file(message: "a commit in stale-#{i}", branch_name: "stale-#{i}")
+ end
end
# Add 6 active branches
(1..6).each do |i|
- travel_to((threshold - i.hours).ago) { create_file(message: "a commit in active-#{i}", branch_name: "active-#{i}") }
+ travel_to((threshold - i.hours).ago) do
+ create_file(message: "a commit in active-#{i}", branch_name: "active-#{i}")
+ end
end
end
@@ -38,7 +42,10 @@ RSpec.describe 'Branches' do
expect(page).to have_button('Copy branch name')
- expect(page).to have_link('Show more active branches', href: project_branches_filtered_path(project, state: 'active'))
+ expect(page).to have_link(
+ 'Show more active branches',
+ href: project_branches_filtered_path(project, state: 'active')
+ )
expect(page).not_to have_content('Show more stale branches')
end
end
@@ -75,13 +82,15 @@ RSpec.describe 'Branches' do
it 'shows only default_per_page active branches sorted by last updated' do
visit project_branches_filtered_path(project, state: 'active')
- expect(page).to have_content(sorted_branches(repository, count: Kaminari.config.default_per_page, sort_by: :updated_desc, state: 'active'))
+ expect(page).to have_content(sorted_branches(repository, count: Kaminari.config.default_per_page,
+ sort_by: :updated_desc, state: 'active'))
end
it 'shows only default_per_page branches sorted by last updated on All branches' do
visit project_branches_filtered_path(project, state: 'all')
- expect(page).to have_content(sorted_branches(repository, count: Kaminari.config.default_per_page, sort_by: :updated_desc))
+ expect(page).to have_content(sorted_branches(repository, count: Kaminari.config.default_per_page,
+ sort_by: :updated_desc))
end
end
end
@@ -141,7 +150,7 @@ RSpec.describe 'Branches' do
it 'avoids a N+1 query in branches index' do
control_count = ActiveRecord::QueryRecorder.new { visit project_branches_path(project) }.count
- %w(one two three four five).each { |ref| repository.add_branch(user, ref, 'master') }
+ %w[one two three four five].each { |ref| repository.add_branch(user, ref, 'master') }
expect { visit project_branches_filtered_path(project, state: 'all') }.not_to exceed_query_limit(control_count)
end
@@ -193,7 +202,7 @@ RSpec.describe 'Branches' do
end
end
- context 'logged in as maintainer' do
+ context 'when logged in as maintainer' do
before do
sign_in(user)
project.add_maintainer(user)
@@ -220,7 +229,7 @@ RSpec.describe 'Branches' do
end
end
- context 'logged out' do
+ context 'when logged out' do
before do
visit project_branches_path(project)
end
@@ -314,7 +323,7 @@ RSpec.describe 'Branches' do
Regexp.new(sorted_branches.join('.*'))
end
- def create_file(message: 'message', branch_name:)
+ def create_file(branch_name:, message: 'message')
repository.create_file(user, generate(:branch), 'content', message: message, branch_name: branch_name)
end
diff --git a/spec/features/projects/environments/environments_spec.rb b/spec/features/projects/environments/environments_spec.rb
index 9ec41cd8f8d..b445b0da901 100644
--- a/spec/features/projects/environments/environments_spec.rb
+++ b/spec/features/projects/environments/environments_spec.rb
@@ -336,6 +336,11 @@ RSpec.describe 'Environments page', :js do
accept_gl_confirm do
find(action_link_selector).click
end
+
+ # Wait for UI to transition to ensure we an GraphQL request has been made
+ within(actions_button_selector) { find('.gl-spinner') }
+ within(actions_button_selector) { find('[data-testid="play-icon"]') }
+
wait_for_requests
end