From 01034c2c457bad1933e954ba01e5f21cdf546168 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 5 Aug 2021 15:09:46 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .rubocop.yml | 1 + GITALY_SERVER_VERSION | 2 +- Gemfile | 2 +- Gemfile.lock | 4 +- .../components/issuables_list_app.vue | 6 +- app/assets/javascripts/jobs/store/actions.js | 14 +- app/assets/javascripts/jobs/utils.js | 9 ++ .../details/composer_installation.vue | 42 ++++-- .../components/details/conan_installation.vue | 40 ++++-- .../details/installation_commands.vue | 42 +++--- .../components/details/maven_installation.vue | 133 ++++++++++++++---- .../package_registry/constants.js | 41 +++++- .../graph/graph_component_wrapper.vue | 26 ++++ .../pipelines/components/header_component.vue | 9 +- app/controllers/projects_controller.rb | 2 + .../resolvers/paginated_tree_resolver.rb | 47 +++++++ app/graphql/types/repository_type.rb | 4 + app/helpers/nav/top_nav_helper.rb | 6 +- app/services/issuable_base_service.rb | 6 + app/services/issues/close_service.rb | 8 +- app/services/issues/reopen_service.rb | 6 + .../application_settings/_plantuml.html.haml | 7 +- .../paginated_tree_graphql_query.yml | 8 ++ .../check_decomposition_database_config.rb | 7 - db/ci_migrate | 1 + ...1848_create_ci_instance_variables_on_ci.rb | 31 ---- db/ci_schema_migrations/20210617101848 | 1 - db/ci_structure.sql | 46 +----- ...applied_issuable_closed_to_issuable_sla.rb | 8 ++ ...index_for_label_applied_to_issuable_sla.rb | 17 +++ .../20210729123101_confirm_security_bot.rb | 18 +++ ...update_issuable_slas_where_issue_closed.rb | 31 ++++ db/schema_migrations/20210712052519 | 1 + db/schema_migrations/20210714043818 | 1 + db/schema_migrations/20210722042939 | 1 + db/schema_migrations/20210729123101 | 1 + db/structure.sql | 6 +- doc/api/graphql/reference/index.md | 41 ++++++ .../database/multiple_databases.md | 2 - doc/user/profile/index.md | 3 +- .../database/schema_migrations/context.rb | 13 +- lib/gitlab/usage/docs/renderer.rb | 2 +- locale/gitlab.pot | 9 +- package.json | 2 +- spec/controllers/projects_controller_spec.rb | 26 ++++ .../projects/pipelines/pipeline_spec.rb | 45 ++++-- .../conan_installation_spec.js.snap | 4 +- .../maven_installation_spec.js.snap | 37 ++++- .../details/composer_installation_spec.js | 70 ++++----- .../details/conan_installation_spec.js | 45 +++--- .../details/installations_commands_spec.js | 30 ++-- .../details/maven_installation_spec.js | 111 +++++++++------ .../graph/graph_component_wrapper_spec.js | 12 ++ .../pipelines/header_component_spec.js | 18 --- spec/frontend/pipelines/mock_data.js | 22 +++ .../resolvers/paginated_tree_resolver_spec.rb | 102 ++++++++++++++ spec/graphql/types/repository_type_spec.rb | 2 + .../schema_migrations/context_spec.rb | 61 +++++++- ...e_issuable_slas_where_issue_closed_spec.rb | 31 ++++ spec/migrations/confirm_security_bot_spec.rb | 38 +++++ .../api/graphql/project/repository_spec.rb | 22 +++ spec/services/issues/close_service_spec.rb | 2 +- yarn.lock | 8 +- 63 files changed, 1019 insertions(+), 374 deletions(-) create mode 100644 app/graphql/resolvers/paginated_tree_resolver.rb create mode 100644 config/feature_flags/development/paginated_tree_graphql_query.yml delete mode 100644 config/initializers/check_decomposition_database_config.rb create mode 120000 db/ci_migrate delete mode 100644 db/ci_migrate/20210617101848_create_ci_instance_variables_on_ci.rb delete mode 100644 db/ci_schema_migrations/20210617101848 mode change 100644 => 120000 db/ci_structure.sql create mode 100644 db/migrate/20210712052519_add_label_applied_issuable_closed_to_issuable_sla.rb create mode 100644 db/migrate/20210714043818_add_index_for_label_applied_to_issuable_sla.rb create mode 100644 db/migrate/20210729123101_confirm_security_bot.rb create mode 100644 db/post_migrate/20210722042939_update_issuable_slas_where_issue_closed.rb create mode 100644 db/schema_migrations/20210712052519 create mode 100644 db/schema_migrations/20210714043818 create mode 100644 db/schema_migrations/20210722042939 create mode 100644 db/schema_migrations/20210729123101 create mode 100644 spec/graphql/resolvers/paginated_tree_resolver_spec.rb create mode 100644 spec/migrations/20210722042939_update_issuable_slas_where_issue_closed_spec.rb create mode 100644 spec/migrations/confirm_security_bot_spec.rb diff --git a/.rubocop.yml b/.rubocop.yml index 0853b418a4c..7b2b8ca70f5 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -37,6 +37,7 @@ AllCops: - 'file_hooks/**/*' - 'workhorse/**/*' - 'spec/support/*.git/**/*' # e.g. spec/support/gitlab-git-test.git + - 'db/ci_migrate/*.rb' # since the `db/ci_migrate` is a symlinked to `db/migrate` CacheRootDirectory: tmp MaxFilesInCache: 25000 diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index df0556ead12..a7802efdf73 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -6430f0f4df82aecc0b282d8fb620d1d9219a6aee +59dfc252c79b7f9d290a3ede54c9ba8a3b12d4bd diff --git a/Gemfile b/Gemfile index d89e8f6adec..a8e18170d88 100644 --- a/Gemfile +++ b/Gemfile @@ -339,7 +339,7 @@ gem 'warning', '~> 1.2.0' group :development do gem 'lefthook', '~> 0.7.0', require: false - gem 'solargraph', '~> 0.42', require: false + gem 'solargraph', '~> 0.43', require: false gem 'letter_opener_web', '~> 1.4.0' diff --git a/Gemfile.lock b/Gemfile.lock index 02298bca3c8..4fc082bbe1b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1206,7 +1206,7 @@ GEM slack-messenger (2.3.4) snowplow-tracker (0.6.1) contracts (~> 0.7, <= 0.11) - solargraph (0.42.3) + solargraph (0.43.0) backport (~> 1.2) benchmark bundler (>= 1.17.2) @@ -1631,7 +1631,7 @@ DEPENDENCIES simplecov-cobertura (~> 1.3.1) slack-messenger (~> 2.3.4) snowplow-tracker (~> 0.6.1) - solargraph (~> 0.42) + solargraph (~> 0.43) spamcheck (~> 0.1.0) spring (~> 2.1.0) spring-commands-rspec (~> 1.0.4) diff --git a/app/assets/javascripts/issues_list/components/issuables_list_app.vue b/app/assets/javascripts/issues_list/components/issuables_list_app.vue index b13a389b963..62b52afdaca 100644 --- a/app/assets/javascripts/issues_list/components/issuables_list_app.vue +++ b/app/assets/javascripts/issues_list/components/issuables_list_app.vue @@ -9,8 +9,7 @@ import { toNumber, omit } from 'lodash'; import createFlash from '~/flash'; import axios from '~/lib/utils/axios_utils'; import { scrollToElement, historyPushState } from '~/lib/utils/common_utils'; -// eslint-disable-next-line import/no-deprecated -import { setUrlParams, urlParamsToObject, getParameterByName } from '~/lib/utils/url_utility'; +import { setUrlParams, queryToObject, getParameterByName } from '~/lib/utils/url_utility'; import { __ } from '~/locale'; import initManualOrdering from '~/manual_ordering'; import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; @@ -264,8 +263,7 @@ export default { }); }, getQueryObject() { - // eslint-disable-next-line import/no-deprecated - return urlParamsToObject(window.location.search); + return queryToObject(window.location.search, { gatherArrays: true }); }, onPaginate(newPage) { if (newPage === this.page) return; diff --git a/app/assets/javascripts/jobs/store/actions.js b/app/assets/javascripts/jobs/store/actions.js index a8be5d8d039..53e3dbbad0d 100644 --- a/app/assets/javascripts/jobs/store/actions.js +++ b/app/assets/javascripts/jobs/store/actions.js @@ -13,6 +13,7 @@ import { scrollUp, } from '~/lib/utils/scroll_utils'; import { __ } from '~/locale'; +import { reportToSentry } from '../utils'; import * as types from './mutation_types'; export const init = ({ dispatch }, { endpoint, logState, pagePath }) => { @@ -175,11 +176,14 @@ export const fetchTrace = ({ dispatch, state }) => dispatch('startPollingTrace'); } }) - .catch((e) => - e.response.status === httpStatusCodes.FORBIDDEN - ? dispatch('receiveTraceUnauthorizedError') - : dispatch('receiveTraceError'), - ); + .catch((e) => { + if (e.response.status === httpStatusCodes.FORBIDDEN) { + dispatch('receiveTraceUnauthorizedError'); + } else { + reportToSentry('job_actions', e); + dispatch('receiveTraceError'); + } + }); export const startPollingTrace = ({ dispatch, commit }) => { const traceTimeout = setTimeout(() => { diff --git a/app/assets/javascripts/jobs/utils.js b/app/assets/javascripts/jobs/utils.js index 1ccecf3eb53..bb27658369f 100644 --- a/app/assets/javascripts/jobs/utils.js +++ b/app/assets/javascripts/jobs/utils.js @@ -1,3 +1,5 @@ +import * as Sentry from '@sentry/browser'; + /** * capture anything starting with http:// or https:// * https?:\/\/ @@ -10,3 +12,10 @@ */ export const linkRegex = /(https?:\/\/[^"<>()\\^`{|}\s]+[^"<>()\\^`{|}\s.,:;!?])/g; export default { linkRegex }; + +export const reportToSentry = (component, failureType) => { + Sentry.withScope((scope) => { + scope.setTag('component', component); + Sentry.captureException(failureType); + }); +}; diff --git a/app/assets/javascripts/packages_and_registries/package_registry/components/details/composer_installation.vue b/app/assets/javascripts/packages_and_registries/package_registry/components/details/composer_installation.vue index b3979a620f0..cc629ae394c 100644 --- a/app/assets/javascripts/packages_and_registries/package_registry/components/details/composer_installation.vue +++ b/app/assets/javascripts/packages_and_registries/package_registry/components/details/composer_installation.vue @@ -1,9 +1,12 @@ @@ -41,8 +63,8 @@ export default { :label="$options.i18n.registryInclude" :instruction="composerRegistryInclude" :copy-text="$options.i18n.copyRegistryInclude" - :tracking-action="$options.trackingActions.COPY_COMPOSER_REGISTRY_INCLUDE_COMMAND" - :tracking-label="$options.TrackingLabels.CODE_INSTRUCTION" + :tracking-action="$options.tracking.TRACKING_ACTION_COPY_COMPOSER_REGISTRY_INCLUDE_COMMAND" + :tracking-label="$options.tracking.TRACKING_LABEL_CODE_INSTRUCTION" data-testid="registry-include" /> @@ -50,8 +72,8 @@ export default { :label="$options.i18n.packageInclude" :instruction="composerPackageInclude" :copy-text="$options.i18n.copyPackageInclude" - :tracking-action="$options.trackingActions.COPY_COMPOSER_PACKAGE_INCLUDE_COMMAND" - :tracking-label="$options.TrackingLabels.CODE_INSTRUCTION" + :tracking-action="$options.tracking.TRACKING_ACTION_COPY_COMPOSER_PACKAGE_INCLUDE_COMMAND" + :tracking-label="$options.tracking.TRACKING_LABEL_CODE_INSTRUCTION" data-testid="package-include" /> diff --git a/app/assets/javascripts/packages_and_registries/package_registry/components/details/conan_installation.vue b/app/assets/javascripts/packages_and_registries/package_registry/components/details/conan_installation.vue index 59b446e46b5..99e27c9d44a 100644 --- a/app/assets/javascripts/packages_and_registries/package_registry/components/details/conan_installation.vue +++ b/app/assets/javascripts/packages_and_registries/package_registry/components/details/conan_installation.vue @@ -1,9 +1,12 @@ @@ -37,8 +57,8 @@ export default { :label="s__('PackageRegistry|Conan Command')" :instruction="conanInstallationCommand" :copy-text="s__('PackageRegistry|Copy Conan Command')" - :tracking-action="$options.trackingActions.COPY_CONAN_COMMAND" - :tracking-label="$options.TrackingLabels.CODE_INSTRUCTION" + :tracking-action="$options.tracking.TRACKING_ACTION_COPY_CONAN_COMMAND" + :tracking-label="$options.tracking.TRACKING_LABEL_CODE_INSTRUCTION" />

{{ __('Registry setup') }}

@@ -47,8 +67,8 @@ export default { :label="s__('PackageRegistry|Add Conan Remote')" :instruction="conanSetupCommand" :copy-text="s__('PackageRegistry|Copy Conan Setup Command')" - :tracking-action="$options.trackingActions.COPY_CONAN_SETUP_COMMAND" - :tracking-label="$options.TrackingLabels.CODE_INSTRUCTION" + :tracking-action="$options.tracking.TRACKING_ACTION_COPY_CONAN_SETUP_COMMAND" + :tracking-label="$options.tracking.TRACKING_LABEL_CODE_INSTRUCTION" />