From e4ea43b2b85ad5f3115f00220601eb719705139a Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 27 Jan 2020 21:08:47 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .rubocop_todo.yml | 124 +-------- .../monitoring/components/dashboard.vue | 10 +- .../javascripts/monitoring/stores/mutations.js | 1 - app/assets/javascripts/monitoring/stores/state.js | 1 - .../javascripts/serverless/components/url.vue | 12 - .../components/states/ready_to_merge.vue | 8 +- app/controllers/dashboard/projects_controller.rb | 2 + app/finders/projects_finder.rb | 4 +- app/helpers/environments_helper.rb | 1 - app/mailers/abuse_report_mailer.rb | 2 +- app/mailers/application_mailer.rb | 36 +++ app/mailers/base_mailer.rb | 36 --- app/mailers/email_rejection_mailer.rb | 2 +- app/mailers/notify.rb | 2 +- app/mailers/repository_check_mailer.rb | 2 +- app/models/application_setting.rb | 2 +- app/models/clusters/applications/elastic_stack.rb | 2 +- app/models/concerns/relative_positioning.rb | 3 +- app/models/concerns/resolvable_discussion.rb | 2 +- app/models/project.rb | 7 + app/models/uploads/base.rb | 2 +- app/views/clusters/clusters/show.html.haml | 2 +- .../198938-fix-invalid-issue-tracker-data.yml | 5 + ...-name-endpoint-section-links-to-invalid-doc.yml | 5 + changelogs/unreleased/ak-migration-cleanu.yml | 5 + .../selective-sync-params-create-geo.yml | 5 + changelogs/unreleased/sh-fix-squash-one-commit.yml | 5 + .../unreleased/sh-use-cte-for-projects-finder.yml | 5 + config/initializers/rspec_profiling.rb | 2 +- .../20200122144759_drop_kibana_column.rb | 9 + ...0127090233_remove_invalid_issue_tracker_data.rb | 24 ++ db/schema.rb | 3 +- doc/api/geo_nodes.md | 8 + lib/api/commit_statuses.rb | 14 +- lib/backup/manager.rb | 6 +- lib/gitlab/ci/ansi2html.rb | 2 +- lib/gitlab/cycle_analytics/usage_data.rb | 2 +- lib/gitlab/git/diff_collection.rb | 2 +- lib/gitlab/gpg/commit.rb | 4 +- lib/gitlab/highlight.rb | 2 +- lib/gitlab/project_search_results.rb | 6 +- lib/gitlab/project_transfer.rb | 2 +- lib/gitlab/template/base_template.rb | 2 +- lib/system_check/helpers.rb | 6 +- lib/tasks/yarn.rake | 1 + locale/gitlab.pot | 15 -- package.json | 1 - qa/qa.rb | 2 +- .../deploy_key/clone_using_deploy_key_spec.rb | 2 +- spec/features/admin/admin_groups_spec.rb | 2 +- .../user_squashes_merge_request_spec.rb | 27 +- spec/finders/projects_finder_spec.rb | 277 +++++++++++---------- spec/frontend/monitoring/init_utils.js | 1 - spec/frontend/monitoring/store/actions_spec.js | 2 - spec/frontend/monitoring/store/mutations_spec.js | 2 - spec/helpers/environments_helper_spec.rb | 1 - .../monitoring/components/dashboard_resize_spec.js | 1 - .../lib/gitlab/metrics/dashboard/processor_spec.rb | 2 +- spec/lib/marginalia_spec.rb | 2 +- ...90233_remove_invalid_issue_tracker_data_spec.rb | 59 +++++ spec/models/project_spec.rb | 19 ++ .../create_from_issue_service_spec.rb | 6 +- yarn.lock | 12 +- 63 files changed, 420 insertions(+), 401 deletions(-) create mode 100644 app/mailers/application_mailer.rb delete mode 100644 app/mailers/base_mailer.rb create mode 100644 changelogs/unreleased/198938-fix-invalid-issue-tracker-data.yml create mode 100644 changelogs/unreleased/38297-knative-domain-name-endpoint-section-links-to-invalid-doc.yml create mode 100644 changelogs/unreleased/ak-migration-cleanu.yml create mode 100644 changelogs/unreleased/selective-sync-params-create-geo.yml create mode 100644 changelogs/unreleased/sh-fix-squash-one-commit.yml create mode 100644 changelogs/unreleased/sh-use-cte-for-projects-finder.yml create mode 100644 db/post_migrate/20200122144759_drop_kibana_column.rb create mode 100644 db/post_migrate/20200127090233_remove_invalid_issue_tracker_data.rb create mode 100644 spec/migrations/20200127090233_remove_invalid_issue_tracker_data_spec.rb diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ad9e255e93b..6648b358557 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -52,14 +52,6 @@ Layout/ClosingParenthesisIndentation: - 'spec/support/helpers/stub_object_storage.rb' - 'spec/workers/remove_unreferenced_lfs_objects_worker_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. -# SupportedStyles: leading, trailing -Layout/DotPosition: - Exclude: - - 'app/models/concerns/relative_positioning.rb' - # Offense count: 69 # Cop supports --auto-correct. Layout/EmptyLinesAroundArguments: @@ -100,12 +92,6 @@ Layout/IndentFirstParameter: - 'spec/support/helpers/repo_helpers.rb' - 'spec/support/helpers/stub_object_storage.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Layout/LeadingBlankLines: - Exclude: - - 'lib/tasks/yarn.rake' - # Offense count: 54 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. @@ -150,11 +136,6 @@ Layout/SpaceInsideBlockBraces: Layout/SpaceInsideParens: Enabled: false -# Offense count: 1 -Lint/DisjunctiveAssignmentInConstructor: - Exclude: - - 'app/models/uploads/base.rb' - # Offense count: 19 Lint/DuplicateMethods: Exclude: @@ -177,21 +158,6 @@ Lint/DuplicateMethods: Lint/MissingCopEnableDirective: Enabled: false -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: Whitelist. -# Whitelist: present?, blank?, presence, try, try! -Lint/SafeNavigationConsistency: - Exclude: - - 'lib/gitlab/gpg/commit.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -Lint/ToJSON: - Exclude: - - 'lib/gitlab/cycle_analytics/usage_data.rb' - - 'lib/gitlab/template/base_template.rb' - # Offense count: 6 Lint/UriEscapeUnescape: Exclude: @@ -200,12 +166,6 @@ Lint/UriEscapeUnescape: - 'spec/lib/google_api/auth_spec.rb' - 'spec/requests/api/files_spec.rb' -# Offense count: 1 -# Configuration parameters: CheckForMethodsWithNoSideEffects. -Lint/Void: - Exclude: - - 'lib/gitlab/git/diff_collection.rb' - # Offense count: 165 # Cop supports --auto-correct. # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. @@ -284,12 +244,6 @@ RSpec/LetBeforeExamples: - 'spec/rubocop/cop/migration/update_column_in_batches_spec.rb' - 'spec/serializers/pipeline_details_entity_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -RSpec/MultipleSubjects: - Exclude: - - 'spec/services/merge_requests/create_from_issue_service_spec.rb' - # Offense count: 2018 # Cop supports --auto-correct. # Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers. @@ -319,12 +273,6 @@ RSpec/ScatteredSetup: - 'spec/requests/api/jobs_spec.rb' - 'spec/services/projects/create_service_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -RSpec/SharedContext: - Exclude: - - 'spec/features/admin/admin_groups_spec.rb' - # Offense count: 4 RSpec/VoidExpect: Exclude: @@ -348,12 +296,6 @@ Rails/ApplicationController: - 'spec/controllers/concerns/continue_params_spec.rb' - 'spec/lib/marginalia_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Rails/ApplicationMailer: - Exclude: - - 'app/mailers/base_mailer.rb' - # Offense count: 8 # Cop supports --auto-correct. Rails/BelongsTo: @@ -414,14 +356,6 @@ Rails/LinkToBlank: Rails/RakeEnvironment: Enabled: false -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: Include. -# Include: app/models/**/*.rb -Rails/RedundantAllowNil: - Exclude: - - 'app/models/application_setting.rb' - # Offense count: 868 # Configuration parameters: Blacklist, Whitelist. # Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters @@ -457,12 +391,6 @@ Style/CommentedKeyword: - 'lib/tasks/gitlab/backup.rake' - 'spec/tasks/gitlab/backup_rake_spec.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Style/Dir: - Exclude: - - 'qa/qa.rb' - # Offense count: 6 # Cop supports --auto-correct. Style/EachWithObject: @@ -591,13 +519,6 @@ Style/NumericLiteralPrefix: Style/NumericPredicate: Enabled: false -# Offense count: 2 -# Cop supports --auto-correct. -Style/OrAssignment: - Exclude: - - 'lib/api/commit_statuses.rb' - - 'lib/gitlab/project_transfer.rb' - # Offense count: 106 # Cop supports --auto-correct. Style/ParallelAssignment: @@ -632,12 +553,6 @@ Style/PerlBackrefs: Style/RaiseArgs: Enabled: false -# Offense count: 1 -# Cop supports --auto-correct. -Style/RedundantConditional: - Exclude: - - 'lib/system_check/helpers.rb' - # Offense count: 221 # Cop supports --auto-correct. Style/RedundantFreeze: @@ -704,12 +619,6 @@ Style/SingleLineMethods: Style/SpecialGlobalVars: EnforcedStyle: use_perl_names -# Offense count: 1 -# Cop supports --auto-correct. -Style/StderrPuts: - Exclude: - - 'config/initializers/rspec_profiling.rb' - # Offense count: 75 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. @@ -736,30 +645,6 @@ Style/TernaryParentheses: - 'spec/requests/api/pipeline_schedules_spec.rb' - 'spec/support/capybara.rb' -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleForMultiline. -# SupportedStylesForMultiline: comma, consistent_comma, no_comma -Style/TrailingCommaInArrayLiteral: - Exclude: - - 'ee/spec/models/project_spec.rb' - - 'spec/lib/gitlab/metrics/dashboard/processor_spec.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleForMultiline. -# SupportedStylesForMultiline: comma, consistent_comma, no_comma -Style/TrailingCommaInHashLiteral: - Exclude: - - 'lib/gitlab/ci/ansi2html.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -Style/UnlessElse: - Exclude: - - 'lib/backup/manager.rb' - - 'lib/gitlab/project_search_results.rb' - # Offense count: 8 # Cop supports --auto-correct. Style/UnneededCondition: @@ -776,13 +661,6 @@ Style/UnneededCondition: Style/UnneededInterpolation: Enabled: false -# Offense count: 2 -# Cop supports --auto-correct. -Style/UnneededSort: - Exclude: - - 'app/models/concerns/resolvable_discussion.rb' - - 'lib/gitlab/highlight.rb' - RSpec/ReceiveCounts: Exclude: - 'ee/spec/models/broadcast_message_spec.rb' @@ -907,4 +785,4 @@ RSpec/ContextMethod: - 'spec/services/projects/open_issues_count_service_spec.rb' - 'spec/services/quick_actions/interpret_service_spec.rb' - 'spec/support/shared_examples/services/boards/issues_list_service_shared_examples.rb' - - 'spec/uploaders/namespace_file_uploader_spec.rb' \ No newline at end of file + - 'spec/uploaders/namespace_file_uploader_spec.rb' diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index 9b9c380c9af..c34623cf858 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -132,11 +132,6 @@ export default { type: String, required: true, }, - environmentsEndpoint: { - type: String, - required: false, - default: '', - }, currentEnvironmentName: { type: String, required: true, @@ -218,9 +213,7 @@ export default { ]), ...mapGetters('monitoringDashboard', ['getMetricStates', 'filteredEnvironments']), firstDashboard() { - return this.environmentsEndpoint.length > 0 && this.allDashboards.length > 0 - ? this.allDashboards[0] - : {}; + return this.allDashboards.length > 0 ? this.allDashboards[0] : {}; }, selectedDashboard() { return this.allDashboards.find(d => d.path === this.currentDashboard) || this.firstDashboard; @@ -246,7 +239,6 @@ export default { created() { this.setEndpoints({ metricsEndpoint: this.metricsEndpoint, - environmentsEndpoint: this.environmentsEndpoint, deploymentsEndpoint: this.deploymentsEndpoint, dashboardEndpoint: this.dashboardEndpoint, dashboardsEndpoint: this.dashboardsEndpoint, diff --git a/app/assets/javascripts/monitoring/stores/mutations.js b/app/assets/javascripts/monitoring/stores/mutations.js index e14425d7c6c..f0390bfc636 100644 --- a/app/assets/javascripts/monitoring/stores/mutations.js +++ b/app/assets/javascripts/monitoring/stores/mutations.js @@ -172,7 +172,6 @@ export default { [types.SET_ENDPOINTS](state, endpoints) { state.metricsEndpoint = endpoints.metricsEndpoint; - state.environmentsEndpoint = endpoints.environmentsEndpoint; state.deploymentsEndpoint = endpoints.deploymentsEndpoint; state.dashboardEndpoint = endpoints.dashboardEndpoint; state.dashboardsEndpoint = endpoints.dashboardsEndpoint; diff --git a/app/assets/javascripts/monitoring/stores/state.js b/app/assets/javascripts/monitoring/stores/state.js index 2c6758dfce2..2a2a7c9c88d 100644 --- a/app/assets/javascripts/monitoring/stores/state.js +++ b/app/assets/javascripts/monitoring/stores/state.js @@ -2,7 +2,6 @@ import invalidUrl from '~/lib/utils/invalid_url'; export default () => ({ metricsEndpoint: null, - environmentsEndpoint: null, deploymentsEndpoint: null, dashboardEndpoint: invalidUrl, emptyState: 'gettingStarted', diff --git a/app/assets/javascripts/serverless/components/url.vue b/app/assets/javascripts/serverless/components/url.vue index 5e30c8d614e..d6de5e56a5c 100644 --- a/app/assets/javascripts/serverless/components/url.vue +++ b/app/assets/javascripts/serverless/components/url.vue @@ -1,12 +1,8 @@