- {{
- __('Cancel')
- }}
+
+ {{ __('Cancel') }}
+
{{ __('Save expiration policy') }}
+
diff --git a/app/assets/javascripts/registry/settings/registry_settings_bundle.js b/app/assets/javascripts/registry/settings/registry_settings_bundle.js
index 927b6059884..6ae1dbb72c4 100644
--- a/app/assets/javascripts/registry/settings/registry_settings_bundle.js
+++ b/app/assets/javascripts/registry/settings/registry_settings_bundle.js
@@ -1,8 +1,10 @@
import Vue from 'vue';
+import { GlToast } from '@gitlab/ui';
import Translate from '~/vue_shared/translate';
import store from './store/';
import RegistrySettingsApp from './components/registry_settings_app.vue';
+Vue.use(GlToast);
Vue.use(Translate);
export default () => {
diff --git a/app/assets/javascripts/registry/settings/store/actions.js b/app/assets/javascripts/registry/settings/store/actions.js
index 5e46d564121..21a2008fef6 100644
--- a/app/assets/javascripts/registry/settings/store/actions.js
+++ b/app/assets/javascripts/registry/settings/store/actions.js
@@ -1,18 +1,10 @@
import Api from '~/api';
-import createFlash from '~/flash';
-import {
- FETCH_SETTINGS_ERROR_MESSAGE,
- UPDATE_SETTINGS_ERROR_MESSAGE,
- UPDATE_SETTINGS_SUCCESS_MESSAGE,
-} from '../constants';
import * as types from './mutation_types';
export const setInitialState = ({ commit }, data) => commit(types.SET_INITIAL_STATE, data);
export const updateSettings = ({ commit }, data) => commit(types.UPDATE_SETTINGS, data);
export const toggleLoading = ({ commit }) => commit(types.TOGGLE_LOADING);
export const receiveSettingsSuccess = ({ commit }, data = {}) => commit(types.SET_SETTINGS, data);
-export const receiveSettingsError = () => createFlash(FETCH_SETTINGS_ERROR_MESSAGE);
-export const updateSettingsError = () => createFlash(UPDATE_SETTINGS_ERROR_MESSAGE);
export const resetSettings = ({ commit }) => commit(types.RESET_SETTINGS);
export const fetchSettings = ({ dispatch, state }) => {
@@ -21,7 +13,6 @@ export const fetchSettings = ({ dispatch, state }) => {
.then(({ data: { container_expiration_policy } }) =>
dispatch('receiveSettingsSuccess', container_expiration_policy),
)
- .catch(() => dispatch('receiveSettingsError'))
.finally(() => dispatch('toggleLoading'));
};
@@ -30,11 +21,9 @@ export const saveSettings = ({ dispatch, state }) => {
return Api.updateProject(state.projectId, {
container_expiration_policy_attributes: state.settings,
})
- .then(({ data: { container_expiration_policy } }) => {
- dispatch('receiveSettingsSuccess', container_expiration_policy);
- createFlash(UPDATE_SETTINGS_SUCCESS_MESSAGE, 'success');
- })
- .catch(() => dispatch('updateSettingsError'))
+ .then(({ data: { container_expiration_policy } }) =>
+ dispatch('receiveSettingsSuccess', container_expiration_policy),
+ )
.finally(() => dispatch('toggleLoading'));
};
diff --git a/app/models/note.rb b/app/models/note.rb
index 7731b477ad0..de9478ce68d 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -124,7 +124,7 @@ class Note < ApplicationRecord
scope :inc_author, -> { includes(:author) }
scope :inc_relations_for_view, -> do
includes(:project, { author: :status }, :updated_by, :resolved_by, :award_emoji,
- :system_note_metadata, :note_diff_file, :suggestions)
+ { system_note_metadata: :description_version }, :note_diff_file, :suggestions)
end
scope :with_notes_filter, -> (notes_filter) do
diff --git a/app/models/project_ci_cd_setting.rb b/app/models/project_ci_cd_setting.rb
index 1dd65c76258..a495d34c07c 100644
--- a/app/models/project_ci_cd_setting.rb
+++ b/app/models/project_ci_cd_setting.rb
@@ -1,9 +1,6 @@
# frozen_string_literal: true
class ProjectCiCdSetting < ApplicationRecord
- include IgnorableColumns
- # https://gitlab.com/gitlab-org/gitlab/issues/36651
- ignore_column :merge_trains_enabled, remove_with: '12.7', remove_after: '2019-12-22'
belongs_to :project, inverse_of: :ci_cd_settings
# The version of the schema that first introduced this model/table.
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml
index f26a2201550..f19dd0e4a48 100644
--- a/app/workers/all_queues.yml
+++ b/app/workers/all_queues.yml
@@ -192,3 +192,4 @@
- self_monitoring_project_create
- self_monitoring_project_delete
- merge_request_mergeability_check
+- phabricator_import_import_tasks
diff --git a/lib/gitlab/phabricator_import/base_worker.rb b/app/workers/gitlab/phabricator_import/base_worker.rb
similarity index 95%
rename from lib/gitlab/phabricator_import/base_worker.rb
rename to app/workers/gitlab/phabricator_import/base_worker.rb
index d2c2ef8db48..faae71d4627 100644
--- a/lib/gitlab/phabricator_import/base_worker.rb
+++ b/app/workers/gitlab/phabricator_import/base_worker.rb
@@ -19,8 +19,7 @@
module Gitlab
module PhabricatorImport
class BaseWorker
- include ApplicationWorker
- include ProjectImportOptions # This marks the project as failed after too many tries
+ include WorkerAttributes
include Gitlab::ExclusiveLeaseHelpers
feature_category :importers
diff --git a/lib/gitlab/phabricator_import/import_tasks_worker.rb b/app/workers/gitlab/phabricator_import/import_tasks_worker.rb
similarity index 63%
rename from lib/gitlab/phabricator_import/import_tasks_worker.rb
rename to app/workers/gitlab/phabricator_import/import_tasks_worker.rb
index c36954a8d41..b5d9e80797b 100644
--- a/lib/gitlab/phabricator_import/import_tasks_worker.rb
+++ b/app/workers/gitlab/phabricator_import/import_tasks_worker.rb
@@ -2,6 +2,9 @@
module Gitlab
module PhabricatorImport
class ImportTasksWorker < BaseWorker
+ include ApplicationWorker
+ include ProjectImportOptions # This marks the project as failed after too many tries
+
def importer_class
Gitlab::PhabricatorImport::Issues::Importer
end
diff --git a/changelogs/unreleased/sh-bump-pg-gem-1-2-2.yml b/changelogs/unreleased/sh-bump-pg-gem-1-2-2.yml
new file mode 100644
index 00000000000..2e2910d17a5
--- /dev/null
+++ b/changelogs/unreleased/sh-bump-pg-gem-1-2-2.yml
@@ -0,0 +1,5 @@
+---
+title: Update pg gem to v1.2.2
+merge_request: 23237
+author:
+type: other
diff --git a/db/migrate/20191209143606_add_deleted_at_to_description_versions.rb b/db/migrate/20191209143606_add_deleted_at_to_description_versions.rb
new file mode 100644
index 00000000000..02a3d1271c2
--- /dev/null
+++ b/db/migrate/20191209143606_add_deleted_at_to_description_versions.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddDeletedAtToDescriptionVersions < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ def change
+ add_column :description_versions, :deleted_at, :datetime_with_timezone
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 39ada44b5aa..ae1b8533102 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1410,6 +1410,7 @@ ActiveRecord::Schema.define(version: 2020_01_21_132641) do
t.integer "merge_request_id"
t.integer "epic_id"
t.text "description"
+ t.datetime_with_timezone "deleted_at"
t.index ["epic_id"], name: "index_description_versions_on_epic_id", where: "(epic_id IS NOT NULL)"
t.index ["issue_id"], name: "index_description_versions_on_issue_id", where: "(issue_id IS NOT NULL)"
t.index ["merge_request_id"], name: "index_description_versions_on_merge_request_id", where: "(merge_request_id IS NOT NULL)"
diff --git a/doc/development/what_requires_downtime.md b/doc/development/what_requires_downtime.md
index 356feae4eaf..841a05d8e61 100644
--- a/doc/development/what_requires_downtime.md
+++ b/doc/development/what_requires_downtime.md
@@ -213,7 +213,7 @@ class ChangeUsersUsernameStringToTextCleanup < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
def up
- cleanup_concurrent_column_type_change :users
+ cleanup_concurrent_column_type_change :users, :username
end
def down
diff --git a/lib/gitlab/experimentation.rb b/lib/gitlab/experimentation.rb
index 9d14695c098..c689142d79d 100644
--- a/lib/gitlab/experimentation.rb
+++ b/lib/gitlab/experimentation.rb
@@ -53,14 +53,14 @@ module Gitlab
Experimentation.enabled_for_user?(experiment_key, experimentation_subject_index) || forced_enabled?(experiment_key)
end
- def track_experiment_event(experiment_key, action)
- track_experiment_event_for(experiment_key, action) do |tracking_data|
+ def track_experiment_event(experiment_key, action, value = nil)
+ track_experiment_event_for(experiment_key, action, value) do |tracking_data|
::Gitlab::Tracking.event(tracking_data.delete(:category), tracking_data.delete(:action), tracking_data)
end
end
- def frontend_experimentation_tracking_data(experiment_key, action)
- track_experiment_event_for(experiment_key, action) do |tracking_data|
+ def frontend_experimentation_tracking_data(experiment_key, action, value = nil)
+ track_experiment_event_for(experiment_key, action, value) do |tracking_data|
gon.push(tracking_data: tracking_data)
end
end
@@ -77,19 +77,20 @@ module Gitlab
experimentation_subject_id.delete('-').hex % 100
end
- def track_experiment_event_for(experiment_key, action)
+ def track_experiment_event_for(experiment_key, action, value)
return unless Experimentation.enabled?(experiment_key)
- yield experimentation_tracking_data(experiment_key, action)
+ yield experimentation_tracking_data(experiment_key, action, value)
end
- def experimentation_tracking_data(experiment_key, action)
+ def experimentation_tracking_data(experiment_key, action, value)
{
category: tracking_category(experiment_key),
action: action,
property: tracking_group(experiment_key),
- label: experimentation_subject_id
- }
+ label: experimentation_subject_id,
+ value: value
+ }.compact
end
def tracking_category(experiment_key)
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb
index e00b49b9042..f10eb82e03e 100644
--- a/lib/gitlab/usage_data.rb
+++ b/lib/gitlab/usage_data.rb
@@ -78,6 +78,7 @@ module Gitlab
clusters_applications_runner: count(::Clusters::Applications::Runner.available),
clusters_applications_knative: count(::Clusters::Applications::Knative.available),
clusters_applications_elastic_stack: count(::Clusters::Applications::ElasticStack.available),
+ clusters_applications_jupyter: count(::Clusters::Applications::Jupyter.available),
in_review_folder: count(::Environment.in_review_folder),
grafana_integrated_projects: count(GrafanaIntegration.enabled),
groups: count(Group),
diff --git a/qa/qa/page/project/settings/protected_branches.rb b/qa/qa/page/project/settings/protected_branches.rb
index f718311fbf2..9d302acb058 100644
--- a/qa/qa/page/project/settings/protected_branches.rb
+++ b/qa/qa/page/project/settings/protected_branches.rb
@@ -47,6 +47,7 @@ module QA
def protect_branch
click_element(:protect_button, wait: QA::Support::Repeater::DEFAULT_MAX_WAIT_TIME)
+ wait_for_requests
end
private
diff --git a/qa/qa/scenario/template.rb b/qa/qa/scenario/template.rb
index 97373f7a059..9c599ec2d4d 100644
--- a/qa/qa/scenario/template.rb
+++ b/qa/qa/scenario/template.rb
@@ -23,6 +23,8 @@ module QA
def perform(options, *args)
extract_address(:gitlab_address, options, args)
+ QA::Runtime::Browser.configure!
+
Runtime::Feature.enable(options[:enable_feature]) if options.key?(:enable_feature)
Specs::Runner.perform do |specs|
diff --git a/qa/qa/scenario/test/instance.rb b/qa/qa/scenario/test/instance.rb
index 79dad7f4619..11b6a7f7dfa 100644
--- a/qa/qa/scenario/test/instance.rb
+++ b/qa/qa/scenario/test/instance.rb
@@ -20,6 +20,8 @@ module QA
def self.do_perform(address, *rspec_options)
Runtime::Scenario.define(:gitlab_address, address)
+ QA::Runtime::Browser.configure!
+
Specs::Runner.perform do |specs|
specs.tty = true
specs.options = rspec_options if rspec_options.any?
diff --git a/spec/features/projects/settings/registry_settings_spec.rb b/spec/features/projects/settings/registry_settings_spec.rb
index 86da866a927..89da9d1b996 100644
--- a/spec/features/projects/settings/registry_settings_spec.rb
+++ b/spec/features/projects/settings/registry_settings_spec.rb
@@ -17,10 +17,10 @@ describe 'Project > Settings > CI/CD > Container registry tag expiration policy'
expect(settings_block).to have_text 'Container Registry tag expiration policy'
end
- it 'Save expiration policy submit the form', :js do
+ it 'Save expiration policy submit the form' do
within '#js-registry-policies' do
within '.card-body' do
- click_button(class: 'gl-toggle')
+ find('#expiration-policy-toggle button:not(.is-disabled)').click
select('7 days until tags are automatically removed', from: 'expiration-policy-interval')
select('Every day', from: 'expiration-policy-schedule')
select('50 tags per image name', from: 'expiration-policy-latest')
@@ -30,8 +30,8 @@ describe 'Project > Settings > CI/CD > Container registry tag expiration policy'
expect(submit_button).not_to be_disabled
submit_button.click
end
- flash_text = find('.flash-text')
- expect(flash_text).to have_content('Expiration policy successfully saved.')
+ toast = find('.gl-toast')
+ expect(toast).to have_content('Expiration policy successfully saved.')
end
end
end
diff --git a/spec/frontend/registry/settings/components/__snapshots__/settings_form_spec.js.snap b/spec/frontend/registry/settings/components/__snapshots__/settings_form_spec.js.snap
index d26df308b97..1d8627da181 100644
--- a/spec/frontend/registry/settings/components/__snapshots__/settings_form_spec.js.snap
+++ b/spec/frontend/registry/settings/components/__snapshots__/settings_form_spec.js.snap
@@ -161,17 +161,20 @@ exports[`Settings Form renders 1`] = `
class="mr-2 d-block"
type="reset"
>
+
Cancel
+