Commit 1ae56f36 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'add-context-metadata-to-project-creation-jobs' into 'master'

Set project correctly in Sidekiq logs when creating a project

See merge request gitlab-org/gitlab!38568
parents a47de6cb 5859a258
......@@ -55,7 +55,11 @@ module Projects
save_project_and_import_data
after_create_actions if @project.persisted?
if @project.persisted?
Gitlab::ApplicationContext.with_context(related_class: "Projects::CreateService", project: @project) do
after_create_actions
end
end
import_schedule
......
......@@ -48,6 +48,12 @@ RSpec.describe Projects::CreateService, '#execute' do
expect(project.project_setting).to be_new_record
end
it_behaves_like 'storing arguments in the application context' do
let(:expected_params) { { project: subject.full_path, related_class: described_class.to_s } }
subject { create_project(user, opts) }
end
end
context "admin creates project with other user's namespace_id" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment