From 86eb30c847058217f94dd71918d8c3ea647cb61d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 17 Sep 2021 00:09:10 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../track_all_ci_template_inclusions.yml | 8 ------ config/sidekiq_queues.yml | 2 ++ data/deprecations/templates/example.yml | 2 +- doc/development/documentation/redirects.md | 8 ++++++ doc/development/migration_style_guide.md | 2 +- .../ci_template_unique_counter.rb | 2 -- .../ci_template_unique_counter_spec.rb | 26 +++---------------- 7 files changed, 16 insertions(+), 34 deletions(-) delete mode 100644 config/feature_flags/development/track_all_ci_template_inclusions.yml diff --git a/config/feature_flags/development/track_all_ci_template_inclusions.yml b/config/feature_flags/development/track_all_ci_template_inclusions.yml deleted file mode 100644 index 1ae27b41e3b..00000000000 --- a/config/feature_flags/development/track_all_ci_template_inclusions.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: track_all_ci_template_inclusions -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69204 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/339684 -milestone: '14.3' -type: development -group: group::pipeline authoring -default_enabled: false diff --git a/config/sidekiq_queues.yml b/config/sidekiq_queues.yml index 78bd030f6ea..d7c6e6031aa 100644 --- a/config/sidekiq_queues.yml +++ b/config/sidekiq_queues.yml @@ -249,6 +249,8 @@ - 1 - - namespaces_onboarding_user_added - 1 +- - namespaces_sync_namespace_name + - 1 - - new_epic - 2 - - new_issue diff --git a/data/deprecations/templates/example.yml b/data/deprecations/templates/example.yml index fa90dba6e84..59e478ab83e 100644 --- a/data/deprecations/templates/example.yml +++ b/data/deprecations/templates/example.yml @@ -29,5 +29,5 @@ documentation_url: # (optional) This is a link to the current documentation page image_url: # (optional) This is a link to a thumbnail image depicting the feature video_url: # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg - announcement_date: # (optional - may be required in the future) YYYY-MM-DD format - the date of the milestone release when this feature was first announced as deprecated + announcement_date: # YYYY-MM-DD format - the date of the milestone release when this feature was first announced as deprecated removal_date: # (optional - may be required in the future) YYYY-MM-DD format - the date of the milestone release when this feature is planned to be removed diff --git a/doc/development/documentation/redirects.md b/doc/development/documentation/redirects.md index 4fd854a90c1..eb6878f5870 100644 --- a/doc/development/documentation/redirects.md +++ b/doc/development/documentation/redirects.md @@ -5,6 +5,14 @@ info: To determine the technical writer assigned to the Stage/Group associated w description: Learn how to contribute to GitLab Documentation. --- + + # Redirects in GitLab documentation Moving or renaming a document is the same as changing its location. Be sure diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index 454eb2d0fc4..ce564551fbf 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -390,7 +390,7 @@ end **Creating a new table when we have two foreign keys:** -Only one foreign key should be created per migration. This is because [the addition of a foreign key constraint requires a `SHARE ROW EXCLUSIVE` lock on the referenced table](https://www.postgresql.org/docs/12/sql-createtable.html#:~:text=The%20addition%20of%20a%20foreign%20key%20constraint%20requires%20a%20SHARE%20ROW%20EXCLUSIVE%20lock%20on%20the%20referenced%20table), and locking multiple tables in the same transaction should be avoided. +Only one foreign key should be created per transaction. This is because [the addition of a foreign key constraint requires a `SHARE ROW EXCLUSIVE` lock on the referenced table](https://www.postgresql.org/docs/12/sql-createtable.html#:~:text=The%20addition%20of%20a%20foreign%20key%20constraint%20requires%20a%20SHARE%20ROW%20EXCLUSIVE%20lock%20on%20the%20referenced%20table), and locking multiple tables in the same transaction should be avoided. For this, we need three migrations: diff --git a/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb b/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb index d92eb22545d..e5a50c92329 100644 --- a/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb +++ b/lib/gitlab/usage_data_counters/ci_template_unique_counter.rb @@ -21,8 +21,6 @@ module Gitlab::UsageDataCounters class << self def track_unique_project_event(project_id:, template:, config_source:) - return unless TEMPLATE_TO_EVENT[template] || Feature.enabled?(:track_all_ci_template_inclusions, default_enabled: :yaml) - Gitlab::UsageDataCounters::HLLRedisCounter.track_event(ci_template_event_name(template, config_source), values: project_id) end diff --git a/spec/lib/gitlab/usage_data_counters/ci_template_unique_counter_spec.rb b/spec/lib/gitlab/usage_data_counters/ci_template_unique_counter_spec.rb index 33e04f8fdb3..4996b0a0089 100644 --- a/spec/lib/gitlab/usage_data_counters/ci_template_unique_counter_spec.rb +++ b/spec/lib/gitlab/usage_data_counters/ci_template_unique_counter_spec.rb @@ -90,29 +90,11 @@ RSpec.describe Gitlab::UsageDataCounters::CiTemplateUniqueCounter do end.not_to raise_error end - context 'when feature flag is disabled' do - before do - stub_feature_flags(track_all_ci_template_inclusions: false) - end + it "tracks #{template}" do + expected_template_event_name = described_class.ci_template_event_name(template, :repository_source) + expect(Gitlab::UsageDataCounters::HLLRedisCounter).to(receive(:track_event)).with(expected_template_event_name, values: project_id) - it "does not track #{template}" do - expect(Gitlab::UsageDataCounters::HLLRedisCounter).not_to(receive(:track_event)) - - described_class.track_unique_project_event(project_id: project_id, template: template, config_source: config_source) - end - end - - context 'when feature flag is enabled' do - before do - stub_feature_flags(track_all_ci_template_inclusions: true) - end - - it "tracks #{template}" do - expected_template_event_name = described_class.ci_template_event_name(template, :repository_source) - expect(Gitlab::UsageDataCounters::HLLRedisCounter).to(receive(:track_event)).with(expected_template_event_name, values: project_id) - - described_class.track_unique_project_event(project_id: project_id, template: template, config_source: config_source) - end + described_class.track_unique_project_event(project_id: project_id, template: template, config_source: config_source) end end end