diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index 4e5792f82a5..5bca1a62d34 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-5aa9d4d29c49ebe427a4a895158e195725cda2da
+47335e9fa13b0185b9d479a9e8bffc535eed6a7c
diff --git a/GITLAB_SHELL_VERSION b/GITLAB_SHELL_VERSION
index 654afc8e19e..a984c5e3f2e 100644
--- a/GITLAB_SHELL_VERSION
+++ b/GITLAB_SHELL_VERSION
@@ -1 +1 @@
-14.7.0
+14.7.1
diff --git a/app/assets/javascripts/editor/source_editor_extension.js b/app/assets/javascripts/editor/source_editor_extension.js
index 6d47e1e2248..7b73da4465f 100644
--- a/app/assets/javascripts/editor/source_editor_extension.js
+++ b/app/assets/javascripts/editor/source_editor_extension.js
@@ -12,6 +12,6 @@ export default class EditorExtension {
}
get api() {
- return this.obj.provides?.();
+ return this.obj.provides?.() || {};
}
}
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
index 9541058ec2a..41d35f68790 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
@@ -417,6 +417,7 @@ export default {
}
this.isMakingRequest = true;
+ this.editCommitMessage = false;
if (!useAutoMerge) {
this.mr.transitionStateMachine({ transition: MERGE });
@@ -663,7 +664,11 @@ export default {
-
+
{ !current_user }
helper_method :can?
end
diff --git a/lib/gitlab/devise_failure.rb b/lib/gitlab/devise_failure.rb
index 111ea697ec2..ffd057e1d33 100644
--- a/lib/gitlab/devise_failure.rb
+++ b/lib/gitlab/devise_failure.rb
@@ -9,3 +9,5 @@ module Gitlab
end
end
end
+
+Gitlab::DeviseFailure.prepend_mod
diff --git a/spec/commands/sidekiq_cluster/cli_spec.rb b/spec/commands/sidekiq_cluster/cli_spec.rb
index 223d0c3b0ec..3bc3b93c250 100644
--- a/spec/commands/sidekiq_cluster/cli_spec.rb
+++ b/spec/commands/sidekiq_cluster/cli_spec.rb
@@ -195,22 +195,22 @@ RSpec.describe Gitlab::SidekiqCluster::CLI, stub_settings_source: true do # rubo
},
'high urgency CI queues' => {
query: 'feature_category=continuous_integration&urgency=high',
- included_queues: %w(pipeline_cache:expire_job_cache pipeline_cache:expire_pipeline_cache),
+ included_queues: %w(pipeline_default:ci_drop_pipeline),
excluded_queues: %w(merge)
},
'CPU-bound high urgency CI queues' => {
query: 'feature_category=continuous_integration&urgency=high&resource_boundary=cpu',
- included_queues: %w(pipeline_cache:expire_pipeline_cache),
- excluded_queues: %w(pipeline_cache:expire_job_cache merge)
+ included_queues: %w(pipeline_default:ci_create_downstream_pipeline),
+ excluded_queues: %w(pipeline_default:ci_drop_pipeline merge)
},
'CPU-bound high urgency non-CI queues' => {
query: 'feature_category!=continuous_integration&urgency=high&resource_boundary=cpu',
included_queues: %w(new_issue),
- excluded_queues: %w(pipeline_cache:expire_pipeline_cache)
+ excluded_queues: %w(pipeline_default:ci_create_downstream_pipeline)
},
'CI and SCM queues' => {
query: 'feature_category=continuous_integration|feature_category=source_code_management',
- included_queues: %w(pipeline_cache:expire_job_cache merge),
+ included_queues: %w(pipeline_default:ci_drop_pipeline merge),
excluded_queues: %w(mailers)
}
}
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index ddd80b67639..c5306fda0a5 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -105,10 +105,6 @@ RSpec.describe ApplicationController do
describe 'session expiration' do
controller(described_class) do
- # The anonymous controller will report 401 and fail to run any actions.
- # Normally, GitLab will just redirect you to sign in.
- skip_before_action :authenticate_user!, only: :index
-
def index
render html: 'authenticated'
end
diff --git a/spec/controllers/oauth/authorizations_controller_spec.rb b/spec/controllers/oauth/authorizations_controller_spec.rb
index 7489f506674..fb90a70d91d 100644
--- a/spec/controllers/oauth/authorizations_controller_spec.rb
+++ b/spec/controllers/oauth/authorizations_controller_spec.rb
@@ -195,6 +195,24 @@ RSpec.describe Oauth::AuthorizationsController do
end
end
end
+
+ context 'when the user is not signed in' do
+ before do
+ sign_out(user)
+ end
+
+ it 'sets a lower session expiry and redirects to the sign in page' do
+ subject
+
+ expect(request.env['rack.session.options'][:expire_after]).to eq(
+ Settings.gitlab['unauthenticated_session_expire_delay']
+ )
+
+ expect(request.session['user_return_to']).to eq("/oauth/authorize?#{params.to_query}")
+ expect(response).to have_gitlab_http_status(:found)
+ expect(response).to redirect_to(new_user_session_path)
+ end
+ end
end
describe 'POST #create' do
diff --git a/spec/frontend/editor/helpers.js b/spec/frontend/editor/helpers.js
index 252d783ad6d..48d83a87a6e 100644
--- a/spec/frontend/editor/helpers.js
+++ b/spec/frontend/editor/helpers.js
@@ -49,6 +49,12 @@ export const SEConstExt = () => {
};
};
+export const SEExtWithoutAPI = () => {
+ return {
+ extensionName: 'SEExtWithoutAPI',
+ };
+};
+
export class SEWithSetupExt {
static get extensionName() {
return 'SEWithSetupExt';
diff --git a/spec/frontend/editor/source_editor_extension_spec.js b/spec/frontend/editor/source_editor_extension_spec.js
index c5fa795f3b7..78453aaa491 100644
--- a/spec/frontend/editor/source_editor_extension_spec.js
+++ b/spec/frontend/editor/source_editor_extension_spec.js
@@ -54,6 +54,7 @@ describe('Editor Extension', () => {
${helpers.SEClassExtension} | ${['shared', 'classExtMethod']}
${helpers.SEFnExtension} | ${['fnExtMethod']}
${helpers.SEConstExt} | ${['constExtMethod']}
+ ${helpers.SEExtWithoutAPI} | ${[]}
`('correctly returns API for $definition', ({ definition, expectedKeys }) => {
const extension = new EditorExtension({ definition });
const expectedApi = Object.fromEntries(
diff --git a/spec/frontend/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js b/spec/frontend/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
index da3a323e8ea..46d90ddc83c 100644
--- a/spec/frontend/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
+++ b/spec/frontend/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
@@ -87,7 +87,11 @@ const createReadyToMergeResponse = (customMr) => {
});
};
-const createComponent = (customConfig = {}, mergeRequestWidgetGraphql = false) => {
+const createComponent = (
+ customConfig = {},
+ mergeRequestWidgetGraphql = false,
+ restructuredMrWidget = false,
+) => {
wrapper = shallowMount(ReadyToMerge, {
localVue,
propsData: {
@@ -97,6 +101,7 @@ const createComponent = (customConfig = {}, mergeRequestWidgetGraphql = false) =
provide: {
glFeatures: {
mergeRequestWidgetGraphql,
+ restructuredMrWidget,
},
},
stubs: {
@@ -307,6 +312,20 @@ describe('ReadyToMerge', () => {
},
});
+ beforeEach(() => {
+ readyToMergeResponseSpy = jest
+ .fn()
+ .mockResolvedValueOnce(createReadyToMergeResponse({ squash: true, squashOnMerge: true }))
+ .mockResolvedValue(
+ createReadyToMergeResponse({
+ squash: true,
+ squashOnMerge: true,
+ defaultMergeCommitMessage: '',
+ defaultSquashCommitMessage: '',
+ }),
+ );
+ });
+
it('should handle merge when pipeline succeeds', async () => {
createComponent();
@@ -379,6 +398,27 @@ describe('ReadyToMerge', () => {
expect(params.should_remove_source_branch).toBeTruthy();
expect(params.auto_merge_strategy).toBeUndefined();
});
+
+ it('hides edit commit message', async () => {
+ createComponent({}, true, true);
+
+ await waitForPromises();
+
+ jest.spyOn(eventHub, '$emit').mockImplementation(() => {});
+ jest.spyOn(wrapper.vm.service, 'merge').mockResolvedValue(response('success'));
+
+ await wrapper
+ .findComponent('[data-testid="widget_edit_commit_message"]')
+ .vm.$emit('input', true);
+
+ expect(wrapper.findComponent('[data-testid="edit_commit_message"]').exists()).toBe(true);
+
+ wrapper.vm.handleMergeButtonClick();
+
+ await waitForPromises();
+
+ expect(wrapper.findComponent('[data-testid="edit_commit_message"]').exists()).toBe(false);
+ });
});
describe('initiateRemoveSourceBranchPolling', () => {
diff --git a/spec/workers/every_sidekiq_worker_spec.rb b/spec/workers/every_sidekiq_worker_spec.rb
index 8b5f850d8de..625b4644649 100644
--- a/spec/workers/every_sidekiq_worker_spec.rb
+++ b/spec/workers/every_sidekiq_worker_spec.rb
@@ -227,8 +227,6 @@ RSpec.describe 'Every Sidekiq worker' do
'Epics::UpdateEpicsDatesWorker' => 3,
'ErrorTrackingIssueLinkWorker' => 3,
'Experiments::RecordConversionEventWorker' => 3,
- 'ExpireJobCacheWorker' => 3,
- 'ExpirePipelineCacheWorker' => 3,
'ExportCsvWorker' => 3,
'ExternalServiceReactiveCachingWorker' => 3,
'FileHookWorker' => false,
diff --git a/spec/workers/expire_job_cache_worker_spec.rb b/spec/workers/expire_job_cache_worker_spec.rb
deleted file mode 100644
index e9af39ed2df..00000000000
--- a/spec/workers/expire_job_cache_worker_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe ExpireJobCacheWorker do
- let_it_be(:pipeline) { create(:ci_empty_pipeline) }
-
- let(:project) { pipeline.project }
-
- describe '#perform' do
- context 'with a job in the pipeline' do
- let_it_be(:job) { create(:ci_build, pipeline: pipeline) }
-
- let(:job_args) { job.id }
-
- it_behaves_like 'an idempotent worker'
-
- it_behaves_like 'worker with data consistency',
- described_class,
- data_consistency: :delayed
- end
-
- context 'when there is no job in the pipeline' do
- it 'does not change the etag store' do
- expect(Gitlab::EtagCaching::Store).not_to receive(:new)
-
- perform_multiple(non_existing_record_id)
- end
- end
- end
-end
diff --git a/spec/workers/expire_pipeline_cache_worker_spec.rb b/spec/workers/expire_pipeline_cache_worker_spec.rb
deleted file mode 100644
index f4c4df2e752..00000000000
--- a/spec/workers/expire_pipeline_cache_worker_spec.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe ExpirePipelineCacheWorker do
- let_it_be(:user) { create(:user) }
- let_it_be(:project) { create(:project) }
- let_it_be(:pipeline) { create(:ci_pipeline, project: project) }
-
- subject { described_class.new }
-
- describe '#perform' do
- it 'executes the service' do
- expect_next_instance_of(Ci::ExpirePipelineCacheService) do |instance|
- expect(instance).to receive(:execute).with(pipeline).and_call_original
- end
-
- subject.perform(pipeline.id)
- end
-
- it "doesn't do anything if the pipeline not exist" do
- expect_any_instance_of(Ci::ExpirePipelineCacheService).not_to receive(:execute)
- expect_any_instance_of(Gitlab::EtagCaching::Store).not_to receive(:touch)
-
- subject.perform(617748)
- end
-
- skip "with https://gitlab.com/gitlab-org/gitlab/-/issues/325291 resolved" do
- it_behaves_like 'an idempotent worker' do
- let(:job_args) { [pipeline.id] }
- end
- end
-
- it_behaves_like 'worker with data consistency',
- described_class,
- data_consistency: :delayed
- end
-end