From 39c98649d20e08428f507e0728b0bd87a299e5cf Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 6 Apr 2022 12:08:29 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .rubocop_todo.yml | 29 ---- .rubocop_todo/performance/string_include.yml | 15 +++ .rubocop_todo/rails/inquiry.yml | 4 + .rubocop_todo/rails/render_inline.yml | 4 + .../images/learn_gitlab/graduation_hat.svg | 1 - .../components/available_agents_dropdown.vue | 21 ++- .../jobs/components/trigger_block.vue | 8 +- .../stylesheets/framework/highlight.scss | 2 + app/assets/stylesheets/highlight/hljs.scss | 125 ++++++++++++++++++ .../stylesheets/highlight/themes/dark.scss | 33 +++++ app/models/concerns/issuable.rb | 12 ++ app/policies/project_member_policy.rb | 7 +- .../alert_management/alerts/update_service.rb | 21 ++- .../prepare_update_service.rb | 13 +- app/services/issues/create_service.rb | 5 +- ..._templates_total_unique_counts_monthly.yml | 2 +- ...i_templates_database_liquibase_monthly.yml | 4 +- ...i_templates_total_unique_counts_weekly.yml | 2 +- ...ci_templates_database_liquibase_weekly.yml | 4 +- ...e_statistics_with_dependency_proxy_size.rb | 25 ++++ db/schema_migrations/20220204095121 | 1 + doc/ci/unit_test_reports.md | 2 +- doc/development/documentation/testing.md | 29 ++++ doc/index.md | 26 +--- lefthook.yml | 2 +- .../populate_namespace_statistics.rb | 33 ++++- lib/gitlab/ci/templates/Go.gitlab-ci.yml | 15 --- .../{Database => }/liquibase.gitlab-ci.yml | 6 +- lib/gitlab/data_builder/deployment.rb | 9 +- .../known_events/ci_templates.yml | 2 +- .../projects/menus/learn_gitlab_menu.rb | 6 +- .../available_agents_dropwdown_spec.js | 21 +++ .../jobs/components/trigger_block_spec.js | 7 +- .../populate_namespace_statistics_spec.rb | 71 ++++++++++ .../gitlab/data_builder/deployment_spec.rb | 19 +++ ...tistics_with_dependency_proxy_size_spec.rb | 64 +++++++++ spec/models/concerns/issuable_spec.rb | 27 ++++ spec/policies/project_member_policy_spec.rb | 6 +- .../alerts/update_service_spec.rb | 44 ++++-- .../prepare_update_service_spec.rb | 23 ++++ spec/services/issues/create_service_spec.rb | 19 ++- .../escalation_status_shared_examples.rb | 22 +++ 42 files changed, 666 insertions(+), 125 deletions(-) create mode 100644 .rubocop_todo/performance/string_include.yml create mode 100644 .rubocop_todo/rails/inquiry.yml create mode 100644 .rubocop_todo/rails/render_inline.yml delete mode 100644 app/assets/images/learn_gitlab/graduation_hat.svg create mode 100644 app/assets/stylesheets/highlight/hljs.scss create mode 100644 db/post_migrate/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size.rb create mode 100644 db/schema_migrations/20220204095121 rename lib/gitlab/ci/templates/{Database => }/liquibase.gitlab-ci.yml (93%) create mode 100644 spec/lib/gitlab/background_migration/populate_namespace_statistics_spec.rb create mode 100644 spec/migrations/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size_spec.rb create mode 100644 spec/support/shared_examples/services/incident_management/escalation_status_shared_examples.rb diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 21671ba56ae..534861d90b2 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -143,25 +143,6 @@ Performance/ConstantRegexp: Performance/MethodObjectAsBlock: Enabled: false -# Offense count: 18 -# Cop supports --auto-correct. -# Configuration parameters: AutoCorrect. -Performance/StringInclude: - Exclude: - - 'app/models/snippet_repository.rb' - - 'config/initializers/macos.rb' - - 'config/spring.rb' - - 'ee/app/models/ee/container_registry/event.rb' - - 'ee/lib/gitlab/auth/smartcard/certificate.rb' - - 'lib/gitlab/database/migration_helpers.rb' - - 'lib/kramdown/parser/atlassian_document_format.rb' - - 'lib/prometheus/pid_provider.rb' - - 'qa/qa/ee/page/merge_request/show.rb' - - 'qa/qa/specs/runner.rb' - - 'spec/features/projects/jobs_spec.rb' - - 'spec/spec_helper.rb' - - 'spec/support_specs/helpers/active_record/query_recorder_spec.rb' - # Offense count: 15209 # Configuration parameters: Prefixes. # Prefixes: when, with, without @@ -282,11 +263,6 @@ Rails/HelperInstanceVariable: Rails/IndexWith: Enabled: false -# Offense count: 1 -Rails/Inquiry: - Exclude: - - 'spec/helpers/labels_helper_spec.rb' - # Offense count: 118 # Configuration parameters: Include. # Include: app/models/**/*.rb @@ -335,11 +311,6 @@ Rails/RakeEnvironment: Rails/RedundantForeignKey: Enabled: false -# Offense count: 1 -Rails/RenderInline: - Exclude: - - 'ee/app/controllers/sitemap_controller.rb' - # Offense count: 1144 # Configuration parameters: ForbiddenMethods, AllowedMethods. # ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all diff --git a/.rubocop_todo/performance/string_include.yml b/.rubocop_todo/performance/string_include.yml new file mode 100644 index 00000000000..cb6e566094e --- /dev/null +++ b/.rubocop_todo/performance/string_include.yml @@ -0,0 +1,15 @@ +--- +# Cop supports --auto-correct. +Performance/StringInclude: + Exclude: + - 'app/models/snippet_repository.rb' + - 'config/initializers/macos.rb' + - 'config/spring.rb' + - 'ee/app/models/ee/container_registry/event.rb' + - 'ee/lib/gitlab/auth/smartcard/certificate.rb' + - 'lib/gitlab/database/migration_helpers.rb' + - 'lib/kramdown/parser/atlassian_document_format.rb' + - 'lib/prometheus/pid_provider.rb' + - 'qa/qa/specs/runner.rb' + - 'spec/features/projects/jobs_spec.rb' + - 'spec/spec_helper.rb' diff --git a/.rubocop_todo/rails/inquiry.yml b/.rubocop_todo/rails/inquiry.yml new file mode 100644 index 00000000000..3c999dfbc47 --- /dev/null +++ b/.rubocop_todo/rails/inquiry.yml @@ -0,0 +1,4 @@ +--- +Rails/Inquiry: + Exclude: + - 'spec/helpers/labels_helper_spec.rb' diff --git a/.rubocop_todo/rails/render_inline.yml b/.rubocop_todo/rails/render_inline.yml new file mode 100644 index 00000000000..fbebec72cd7 --- /dev/null +++ b/.rubocop_todo/rails/render_inline.yml @@ -0,0 +1,4 @@ +--- +Rails/RenderInline: + Exclude: + - 'ee/app/controllers/sitemap_controller.rb' diff --git a/app/assets/images/learn_gitlab/graduation_hat.svg b/app/assets/images/learn_gitlab/graduation_hat.svg deleted file mode 100644 index 998d8d9b935..00000000000 --- a/app/assets/images/learn_gitlab/graduation_hat.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/assets/javascripts/clusters_list/components/available_agents_dropdown.vue b/app/assets/javascripts/clusters_list/components/available_agents_dropdown.vue index 662cf2a7e36..bde76c46b4b 100644 --- a/app/assets/javascripts/clusters_list/components/available_agents_dropdown.vue +++ b/app/assets/javascripts/clusters_list/components/available_agents_dropdown.vue @@ -3,6 +3,7 @@ import { GlDropdown, GlDropdownItem, GlDropdownDivider, + GlDropdownText, GlSearchBoxByType, GlSprintf, } from '@gitlab/ui'; @@ -15,6 +16,7 @@ export default { GlDropdown, GlDropdownItem, GlDropdownDivider, + GlDropdownText, GlSearchBoxByType, GlSprintf, }, @@ -73,13 +75,24 @@ export default { this.clearSearch(); this.focusSearch(); }, + onKeyEnter() { + if (!this.searchTerm?.length) { + return; + } + this.$refs.dropdown.hide(); + this.selectAgent(this.searchTerm); + }, }, };