From f2c27c6f97cf138acaed79b90be7a5be520746fc Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 6 Jan 2021 12:10:58 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab/ci/dev-fixtures.gitlab-ci.yml | 1 - .gitlab/ci/frontend.gitlab-ci.yml | 1 - .gitlab/ci/rails.gitlab-ci.yml | 36 ++- .rubocop_todo.yml | 6 - GITALY_SERVER_VERSION | 2 +- Gemfile | 2 +- Gemfile.lock | 4 +- .../alert_management_empty_state.vue | 52 +--- .../javascripts/alert_management/list.js | 4 - .../components/alerts_settings_form.vue | 132 +------- .../components/alerts_settings_wrapper.vue | 37 --- .../javascripts/alerts_settings/constants.js | 10 +- .../javascripts/alerts_settings/index.js | 10 - .../registry/settings/constants.js | 4 +- .../components/reviewers/reviewer_title.vue | 17 +- .../reviewers/sidebar_reviewers.vue | 6 - .../javascripts/sidebar/mount_sidebar.js | 1 - .../components/states/mr_widget_rebase.vue | 93 ++++-- .../queries/states/rebase.query.graphql | 11 + .../stylesheets/_page_specific_files.scss | 1 - app/assets/stylesheets/framework/diffs.scss | 16 +- .../incident_management_list.scss | 17 +- .../stylesheets/pages/merge_requests.scss | 6 +- .../stylesheets/startup/startup-general.scss | 4 +- .../jira_connect/app_descriptor_controller.rb | 27 +- .../ci/pipelines_for_merge_request_finder.rb | 18 +- app/models/deployment.rb | 17 ++ .../projects/alert_management/index.html.haml | 1 + app/views/projects/incidents/index.html.haml | 1 + .../projects/settings/ci_cd/show.html.haml | 2 +- .../operations/_alert_management.html.haml | 1 + app/workers/all_queues.yml | 8 + .../jira_connect/sync_deployments_worker.rb | 29 ++ .../273657-remove-opsgenie-integration.yml | 6 + .../andr3-remove-sidebar-toggle-reviewers.yml | 5 + ...ge_request_finder_new_cte-feature-flag.yml | 5 + .../selhorn-cleanup-uistrings-okr.yml | 5 + config/application.rb | 15 +- ..._new_cte.yml => jira_sync_deployments.yml} | 8 +- config/gitlab.yml.example | 2 +- config/initializers/1_settings.rb | 2 +- doc/development/pipelines.md | 88 +++--- .../incident_management/alert_integrations.md | 6 +- .../admin_area/analytics/dev_ops_report.md | 4 +- lib/atlassian/jira_connect/client.rb | 13 + .../jira_connect/serializers/build_entity.rb | 6 +- .../serializers/deployment_entity.rb | 90 ++++++ .../serializers/environment_entity.rb | 39 +++ .../serializers/pipeline_entity.rb | 31 ++ locale/gitlab.pot | 28 +- package.json | 2 +- .../1_manage/project/create_project_spec.rb | 3 +- rubocop/rubocop.rb | 2 +- scripts/gitaly-test-build | 2 +- scripts/gitaly-test-spawn | 1 + scripts/gitaly_test.rb | 10 +- ...pipelines_for_merge_request_finder_spec.rb | 18 -- .../alert_management_empty_state_spec.js | 12 - .../mocks/alerts_provide_config.json | 4 +- .../alerts_settings_form_spec.js.snap | 3 +- .../alerts_settings_form_spec.js | 1 - .../alerts_settings_wrapper_spec.js | 15 +- spec/frontend/alerts_settings/util.js | 6 - .../components/diff_expansion_cell_spec.js | 51 ++-- .../diffs/components/file_row_stats_spec.js | 24 +- .../__snapshots__/settings_form_spec.js.snap | 4 +- spec/frontend/sidebar/reviewer_title_spec.js | 21 -- .../components/mr_widget_rebase_spec.js | 282 ++++++++++-------- .../lib/atlassian/jira_connect/client_spec.rb | 89 +++++- .../serializers/deployment_entity_spec.rb | 95 ++++++ spec/models/deployment_spec.rb | 50 ++++ .../atlassian/jira_connect/schemata.rb | 233 +++++++++++---- spec/support/capybara.rb | 2 +- spec/support/helpers/test_env.rb | 2 +- .../sync_deployments_worker_spec.rb | 60 ++++ yarn.lock | 8 +- 76 files changed, 1189 insertions(+), 741 deletions(-) create mode 100644 app/assets/javascripts/vue_merge_request_widget/queries/states/rebase.query.graphql rename app/assets/stylesheets/{pages => page_bundles}/incident_management_list.scss (88%) create mode 100644 app/workers/jira_connect/sync_deployments_worker.rb create mode 100644 changelogs/unreleased/273657-remove-opsgenie-integration.yml create mode 100644 changelogs/unreleased/andr3-remove-sidebar-toggle-reviewers.yml create mode 100644 changelogs/unreleased/remove-ci_pipelines_for_merge_request_finder_new_cte-feature-flag.yml create mode 100644 changelogs/unreleased/selhorn-cleanup-uistrings-okr.yml rename config/feature_flags/development/{ci_pipelines_for_merge_request_finder_new_cte.yml => jira_sync_deployments.yml} (63%) create mode 100644 lib/atlassian/jira_connect/serializers/deployment_entity.rb create mode 100644 lib/atlassian/jira_connect/serializers/environment_entity.rb create mode 100644 lib/atlassian/jira_connect/serializers/pipeline_entity.rb create mode 100644 spec/lib/atlassian/jira_connect/serializers/deployment_entity_spec.rb create mode 100644 spec/workers/jira_connect/sync_deployments_worker_spec.rb diff --git a/.gitlab/ci/dev-fixtures.gitlab-ci.yml b/.gitlab/ci/dev-fixtures.gitlab-ci.yml index c19dce7e4a9..1848283f921 100644 --- a/.gitlab/ci/dev-fixtures.gitlab-ci.yml +++ b/.gitlab/ci/dev-fixtures.gitlab-ci.yml @@ -15,7 +15,6 @@ # SEED_NESTED_GROUPS: "false" # requires network connection .run-dev-fixtures-script: &run-dev-fixtures-script - - run_timed_command "scripts/gitaly-test-build" - run_timed_command "scripts/gitaly-test-spawn" - run_timed_command "RAILS_ENV=test bundle exec rake db:seed_fu" diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 0b921309ced..be606fbe7b0 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -103,7 +103,6 @@ update-yarn-cache: WEBPACK_VENDOR_DLL: "true" script: - run_timed_command "gem install knapsack --no-document" - - run_timed_command "scripts/gitaly-test-build" - run_timed_command "scripts/gitaly-test-spawn" - source ./scripts/rspec_helpers.sh - rspec_paralellized_job "--tag frontend_fixture" diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 516816fab56..4430fed2e3c 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -10,7 +10,6 @@ # Only install knapsack after bundle install! Otherwise oddly some native # gems could not be found under some circumstance. No idea why, hours wasted. - run_timed_command "gem install knapsack --no-document" - - run_timed_command "scripts/gitaly-test-build" - run_timed_command "scripts/gitaly-test-spawn" - source ./scripts/rspec_helpers.sh @@ -150,20 +149,35 @@ setup-test-env: script: - run_timed_command "bundle exec ruby -I. -e 'require \"config/environment\"; TestEnv.init'" - run_timed_command "scripts/gitaly-test-build" # Do not use 'bundle exec' here - - rm tmp/tests/gitaly/.ruby-bundle # This file prevents gems from being installed even if vendor/gitaly-ruby is missing artifacts: expire_in: 7d paths: - config/secrets.yml - - tmp/tests/gitaly - - tmp/tests/gitlab-elasticsearch-indexer - - tmp/tests/gitlab-shell - - tmp/tests/gitlab-test-fork - - tmp/tests/gitlab-test-fork_bare - - tmp/tests/gitlab-test - - tmp/tests/gitlab-workhorse - - tmp/tests/repositories - - tmp/tests/second_storage + - tmp/tests/gitaly/config.toml + - tmp/tests/gitaly/gitaly + - tmp/tests/gitaly/gitaly2.config.toml + - tmp/tests/gitaly/gitaly-git2go + - tmp/tests/gitaly/gitaly-hooks + - tmp/tests/gitaly/gitaly-lfs-smudge + - tmp/tests/gitaly/gitaly-ssh + - tmp/tests/gitaly/internal/ + - tmp/tests/gitaly/internal_sockets/ + - tmp/tests/gitaly/Makefile + - tmp/tests/gitaly/praefect + - tmp/tests/gitaly/praefect.config.toml + - tmp/tests/gitaly/ruby/ + - tmp/tests/gitlab-elasticsearch-indexer/bin/gitlab-elasticsearch-indexer + - tmp/tests/gitlab-shell/ + - tmp/tests/gitlab-test-fork/ + - tmp/tests/gitlab-test-fork_bare/ + - tmp/tests/gitlab-test/ + - tmp/tests/gitlab-workhorse/gitlab-zip-metadata + - tmp/tests/gitlab-workhorse/gitlab-zip-cat + - tmp/tests/gitlab-workhorse/gitlab-workhorse + - tmp/tests/gitlab-workhorse/gitlab-resize-image + - tmp/tests/gitlab-workhorse/config.toml + - tmp/tests/repositories/ + - tmp/tests/second_storage/ when: always update-rails-cache: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ab1b8bbc11a..1ba05e770c5 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -166,12 +166,6 @@ Lint/MixedRegexpCaptureTypes: - 'lib/gitlab/slash_commands/issue_new.rb' - 'lib/gitlab/slash_commands/run.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Lint/NonDeterministicRequireOrder: - Exclude: - - 'rubocop/rubocop.rb' - # Offense count: 135 # Cop supports --auto-correct. Lint/RedundantCopDisableDirective: diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 26376013ac7..27bca4317e0 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -01e940cac5cdeaf1b14a18f3f71e0a3c50d1c60c +4cc3e803023c9178a2112ac3f6bcd5b6b8660fd1 diff --git a/Gemfile b/Gemfile index 8630276d6c7..bf502506fc8 100644 --- a/Gemfile +++ b/Gemfile @@ -22,7 +22,7 @@ gem 'rugged', '~> 0.28' gem 'grape-path-helpers', '~> 1.5' gem 'faraday', '~> 1.0' -gem 'marginalia', '~> 1.9.0' +gem 'marginalia', '~> 1.10.0' # Authentication libraries gem 'devise', '~> 4.7.2' diff --git a/Gemfile.lock b/Gemfile.lock index d3d0e996915..bcc334054f1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -695,7 +695,7 @@ GEM mini_mime (>= 0.1.1) marcel (0.3.3) mimemagic (~> 0.3.2) - marginalia (1.9.0) + marginalia (1.10.0) actionpack (>= 2.3) activerecord (>= 2.3) memoist (0.16.2) @@ -1415,7 +1415,7 @@ DEPENDENCIES loofah (~> 2.2) lru_redux mail (= 2.7.1) - marginalia (~> 1.9.0) + marginalia (~> 1.10.0) memory_profiler (~> 0.9) method_source (~> 1.0) mimemagic (~> 0.3.2) diff --git a/app/assets/javascripts/alert_management/components/alert_management_empty_state.vue b/app/assets/javascripts/alert_management/components/alert_management_empty_state.vue index c5ff2dc0d11..9b0e5090a75 100644 --- a/app/assets/javascripts/alert_management/components/alert_management_empty_state.vue +++ b/app/assets/javascripts/alert_management/components/alert_management_empty_state.vue @@ -6,20 +6,11 @@ import alertsHelpUrlQuery from '../graphql/queries/alert_help_url.query.graphql' export default { i18n: { emptyState: { - opsgenie: { - title: s__('AlertManagement|Opsgenie is enabled'), - info: s__( - 'AlertManagement|You have enabled the Opsgenie integration. Your alerts will be visible directly in Opsgenie.', - ), - buttonText: s__('AlertManagement|View alerts in Opsgenie'), - }, - gitlab: { - title: s__('AlertManagement|Surface alerts in GitLab'), - info: s__( - 'AlertManagement|Display alerts from all your monitoring tools directly within GitLab. Streamline the investigation of your alerts and the escalation of alerts to incidents.', - ), - buttonText: s__('AlertManagement|Authorize external service'), - }, + title: s__('AlertManagement|Surface alerts in GitLab'), + info: s__( + 'AlertManagement|Display alerts from all your monitoring tools directly within GitLab. Streamline the investigation of your alerts and the escalation of alerts to incidents.', + ), + buttonText: s__('AlertManagement|Authorize external service'), }, moreInformation: s__('AlertManagement|More information'), }, @@ -33,46 +24,27 @@ export default { query: alertsHelpUrlQuery, }, }, - inject: [ - 'enableAlertManagementPath', - 'userCanEnableAlertManagement', - 'emptyAlertSvgPath', - 'opsgenieMvcEnabled', - 'opsgenieMvcTargetUrl', - ], + inject: ['enableAlertManagementPath', 'userCanEnableAlertManagement', 'emptyAlertSvgPath'], data() { return { alertsHelpUrl: '', }; }, - computed: { - emptyState() { - return { - ...(this.opsgenieMvcEnabled - ? this.$options.i18n.emptyState.opsgenie - : this.$options.i18n.emptyState.gitlab), - link: this.opsgenieMvcEnabled ? this.opsgenieMvcTargetUrl : this.enableAlertManagementPath, - }; - }, - alertsCanBeEnabled() { - return this.userCanEnableAlertManagement || this.opsgenieMvcEnabled; - }, - }, };