Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
17a58755f3
commit
44bb0760bd
17 changed files with 57 additions and 31 deletions
|
@ -11,8 +11,8 @@ class Groups::BoardsController < Groups::ApplicationController
|
|||
push_frontend_feature_flag(:board_multi_select, group, default_enabled: :yaml)
|
||||
push_frontend_feature_flag(:iteration_cadences, group, default_enabled: :yaml)
|
||||
experiment(:prominent_create_board_btn, subject: current_user) do |e|
|
||||
e.use { }
|
||||
e.try { }
|
||||
e.control { }
|
||||
e.candidate { }
|
||||
end.run
|
||||
end
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ class Projects::BoardsController < Projects::ApplicationController
|
|||
push_frontend_feature_flag(:board_multi_select, project, default_enabled: :yaml)
|
||||
push_frontend_feature_flag(:iteration_cadences, project&.group, default_enabled: :yaml)
|
||||
experiment(:prominent_create_board_btn, subject: current_user) do |e|
|
||||
e.use { }
|
||||
e.try { }
|
||||
e.control { }
|
||||
e.candidate { }
|
||||
end.run
|
||||
end
|
||||
|
||||
|
|
|
@ -428,7 +428,7 @@ module ApplicationHelper
|
|||
experiment(:logged_out_marketing_header, actor: nil) do |e|
|
||||
html_class = 'logged-out-marketing-header-candidate'
|
||||
e.candidate { html_class }
|
||||
e.try(:trial_focused) { html_class }
|
||||
e.variant(:trial_focused) { html_class }
|
||||
e.control {}
|
||||
e.run
|
||||
end
|
||||
|
|
|
@ -34,7 +34,7 @@ module IdeHelper
|
|||
|
||||
def enable_environments_guidance?
|
||||
experiment(:in_product_guidance_environments_webide, project: @project) do |e|
|
||||
e.try { !has_dismissed_ide_environments_callout? }
|
||||
e.candidate { !has_dismissed_ide_environments_callout? }
|
||||
|
||||
e.run
|
||||
end
|
||||
|
|
|
@ -33,8 +33,8 @@ module LearnGitlabHelper
|
|||
actor: current_user,
|
||||
sticky_to: project.namespace
|
||||
) do |e|
|
||||
e.use { urls_to_use = action_urls }
|
||||
e.try { urls_to_use = new_action_urls(project) }
|
||||
e.control { urls_to_use = action_urls }
|
||||
e.candidate { urls_to_use = new_action_urls(project) }
|
||||
end
|
||||
|
||||
urls_to_use.to_h do |action, url|
|
||||
|
|
|
@ -14,6 +14,7 @@ module Projects
|
|||
|
||||
@tag_names = params[:tags]
|
||||
return error('not tags specified') if @tag_names.blank?
|
||||
return error('repository importing') if @container_repository.migration_importing?
|
||||
|
||||
delete_tags
|
||||
end
|
||||
|
|
|
@ -63,13 +63,13 @@
|
|||
= s_('ProjectsNew|Allows you to immediately clone this project’s repository. Skip this if you plan to push up an existing repository.')
|
||||
|
||||
- experiment(:new_project_sast_enabled, user: current_user) do |e|
|
||||
- e.try(:candidate) do
|
||||
- e.variant(:candidate) do
|
||||
= render 'new_project_initialize_with_sast', experiment_name: e.name, track_label: track_label, checked: true, with_free_badge: false
|
||||
- e.try(:unchecked_candidate) do
|
||||
- e.variant(:unchecked_candidate) do
|
||||
= render 'new_project_initialize_with_sast', experiment_name: e.name, track_label: track_label, checked: false, with_free_badge: false
|
||||
- e.try(:free_indicator) do
|
||||
- e.variant(:free_indicator) do
|
||||
= render 'new_project_initialize_with_sast', experiment_name: e.name, track_label: track_label, checked: true, with_free_badge: true
|
||||
- e.try(:unchecked_free_indicator) do
|
||||
- e.variant(:unchecked_free_indicator) do
|
||||
= render 'new_project_initialize_with_sast', experiment_name: e.name, track_label: track_label, checked: false, with_free_badge: true
|
||||
|
||||
= f.submit _('Create project'), class: "btn gl-button btn-confirm", data: { track_label: "#{track_label}", track_action: "click_button", track_property: "create_project", track_value: "" }
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RemoveIndexEpicIssuesOnEpicId < Gitlab::Database::Migration[1.0]
|
||||
INDEX = 'index_epic_issues_on_epic_id'
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
remove_concurrent_index_by_name :epic_issues, name: INDEX
|
||||
end
|
||||
|
||||
def down
|
||||
add_concurrent_index :epic_issues, :epic_id, name: INDEX
|
||||
end
|
||||
end
|
1
db/schema_migrations/20220204053655
Normal file
1
db/schema_migrations/20220204053655
Normal file
|
@ -0,0 +1 @@
|
|||
d6b7fa6e5be83aa67bb479604bf6ddb9d8caae82fc8ea1ab7f34d5c534174ecf
|
|
@ -26245,8 +26245,6 @@ CREATE UNIQUE INDEX index_epic_board_list_preferences_on_user_and_list ON boards
|
|||
|
||||
CREATE UNIQUE INDEX index_epic_board_recent_visits_on_user_group_and_board ON boards_epic_board_recent_visits USING btree (user_id, group_id, epic_board_id);
|
||||
|
||||
CREATE INDEX index_epic_issues_on_epic_id ON epic_issues USING btree (epic_id);
|
||||
|
||||
CREATE INDEX index_epic_issues_on_epic_id_and_issue_id ON epic_issues USING btree (epic_id, issue_id);
|
||||
|
||||
CREATE UNIQUE INDEX index_epic_issues_on_issue_id ON epic_issues USING btree (issue_id);
|
||||
|
|
|
@ -105,7 +105,6 @@ Projects include the following [features](https://about.gitlab.com/features/):
|
|||
- [License Compliance](../compliance/license_compliance/index.md): Approve and deny licenses for projects. **(ULTIMATE)**
|
||||
- [Dependency List](../application_security/dependency_list/index.md): View project dependencies. **(ULTIMATE)**
|
||||
- [Requirements](requirements/index.md): Create criteria to check your products against. **(ULTIMATE)**
|
||||
- [Static Site Editor](static_site_editor/index.md): Edit content on static websites without prior knowledge of the codebase or Git commands.
|
||||
- [Code Intelligence](code_intelligence.md): Navigate code.
|
||||
|
||||
## Project integrations
|
||||
|
|
|
@ -12,6 +12,14 @@ description: "The static site editor enables users to edit content on static web
|
|||
> - WYSIWYG editor [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214559) in GitLab 13.0.
|
||||
> - Non-Markdown content blocks not editable on the WYSIWYG mode [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/216836) in GitLab 13.3.
|
||||
> - Formatting Markdown [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49052) in GitLab 13.7.
|
||||
> - [Deprecated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77246) in GitLab 14.7.
|
||||
|
||||
WARNING:
|
||||
This feature is in its end-of-life process. It is
|
||||
[deprecated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77246)
|
||||
for use in GitLab 14.7, and is planned for
|
||||
[removal](https://gitlab.com/groups/gitlab-org/-/epics/7351) in GitLab 15.0.
|
||||
Users should instead use the [Web Editor](../repository/web_editor.md) or [Web IDE](../web_ide/index.md).
|
||||
|
||||
Static Site Editor (SSE) enables users to edit content on static websites without
|
||||
prior knowledge of the underlying templating language, site architecture, or
|
||||
|
|
|
@ -435,10 +435,6 @@ module Gitlab
|
|||
@utc_date_regex ||= /\A[0-9]{4}-[0-9]{2}-[0-9]{2}\z/.freeze
|
||||
end
|
||||
|
||||
def merge_request_wip
|
||||
/(?i)(\[WIP\]\s*|WIP:\s*|\AWIP\z)/
|
||||
end
|
||||
|
||||
def merge_request_draft
|
||||
/\A(?i)(\[draft\]|\(draft\)|draft:)/
|
||||
end
|
||||
|
|
|
@ -359,8 +359,8 @@ RSpec.describe ApplicationExperiment, :experiment do
|
|||
end
|
||||
|
||||
it "returns an assigned name" do
|
||||
application_experiment.try(:variant1) {}
|
||||
application_experiment.try(:variant2) {}
|
||||
application_experiment.variant(:variant1) {}
|
||||
application_experiment.variant(:variant2) {}
|
||||
|
||||
expect(application_experiment.variant.name).to eq('variant2')
|
||||
end
|
||||
|
@ -395,8 +395,8 @@ RSpec.describe ApplicationExperiment, :experiment do
|
|||
|
||||
cache.clear(key: application_experiment.name)
|
||||
|
||||
application_experiment.use { } # setup the control
|
||||
application_experiment.try { } # setup the candidate
|
||||
application_experiment.control { }
|
||||
application_experiment.candidate { }
|
||||
end
|
||||
|
||||
it "caches the variant determined by the variant resolver" do
|
||||
|
|
|
@ -21,8 +21,8 @@ RSpec.describe "Gitlab::Experiment", :js do
|
|||
allow_next_instance_of(Admin::AbuseReportsController) do |instance|
|
||||
allow(instance).to receive(:index).and_wrap_original do |original|
|
||||
instance.experiment(:null_hypothesis, user: instance.current_user) do |e|
|
||||
e.use { original.call }
|
||||
e.try { original.call }
|
||||
e.control { original.call }
|
||||
e.candidate { original.call }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,7 +14,7 @@ RSpec.describe Projects::ContainerRepository::DeleteTagsService do
|
|||
]
|
||||
end
|
||||
|
||||
RSpec.shared_examples 'logging a success response' do
|
||||
shared_examples 'logging a success response' do
|
||||
it 'logs an info message' do
|
||||
expect(service).to receive(:log_info).with(
|
||||
service_class: 'Projects::ContainerRepository::DeleteTagsService',
|
||||
|
@ -28,7 +28,7 @@ RSpec.describe Projects::ContainerRepository::DeleteTagsService do
|
|||
end
|
||||
end
|
||||
|
||||
RSpec.shared_examples 'logging an error response' do |message: 'could not delete tags', extra_log: {}|
|
||||
shared_examples 'logging an error response' do |message: 'could not delete tags', extra_log: {}|
|
||||
it 'logs an error message' do
|
||||
log_data = {
|
||||
service_class: 'Projects::ContainerRepository::DeleteTagsService',
|
||||
|
@ -45,7 +45,7 @@ RSpec.describe Projects::ContainerRepository::DeleteTagsService do
|
|||
end
|
||||
end
|
||||
|
||||
RSpec.shared_examples 'calling the correct delete tags service' do |expected_service_class|
|
||||
shared_examples 'calling the correct delete tags service' do |expected_service_class|
|
||||
let(:service_response) { { status: :success, deleted: tags } }
|
||||
let(:excluded_service_class) { available_service_classes.excluding(expected_service_class).first }
|
||||
|
||||
|
@ -69,7 +69,7 @@ RSpec.describe Projects::ContainerRepository::DeleteTagsService do
|
|||
end
|
||||
end
|
||||
|
||||
RSpec.shared_examples 'handling invalid params' do
|
||||
shared_examples 'handling invalid params' do
|
||||
context 'with invalid params' do
|
||||
before do
|
||||
expect(::Projects::ContainerRepository::Gitlab::DeleteTagsService).not_to receive(:new)
|
||||
|
@ -91,7 +91,7 @@ RSpec.describe Projects::ContainerRepository::DeleteTagsService do
|
|||
end
|
||||
end
|
||||
|
||||
RSpec.shared_examples 'supporting fast delete' do
|
||||
shared_examples 'supporting fast delete' do
|
||||
context 'when the registry supports fast delete' do
|
||||
before do
|
||||
allow(repository.client).to receive(:supports_tag_delete?).and_return(true)
|
||||
|
@ -155,6 +155,14 @@ RSpec.describe Projects::ContainerRepository::DeleteTagsService do
|
|||
|
||||
it_behaves_like 'handling invalid params'
|
||||
end
|
||||
|
||||
context 'when the repository is importing' do
|
||||
before do
|
||||
repository.update_columns(migration_state: 'importing', migration_import_started_at: Time.zone.now)
|
||||
end
|
||||
|
||||
it { is_expected.to include(status: :error, message: 'repository importing') }
|
||||
end
|
||||
end
|
||||
|
||||
context 'without user' do
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
RSpec.shared_context 'container repository delete tags service shared context' do
|
||||
let_it_be(:user) { create(:user) }
|
||||
let_it_be(:project, reload: true) { create(:project, :private) }
|
||||
let_it_be(:repository) { create(:container_repository, :root, project: project) }
|
||||
let_it_be_with_reload(:repository) { create(:container_repository, :root, project: project) }
|
||||
|
||||
let(:params) { { tags: tags } }
|
||||
|
||||
|
|
Loading…
Reference in a new issue