From 16515bdfcb89ccb28e6eb81020d1646dfa7c6fa4 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 13 Oct 2020 15:08:53 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- Gemfile | 2 +- Gemfile.lock | 4 +- .../strategies/flexible_rollout.vue | 121 +++++++++++++ .../strategies/gitlab_user_list.vue | 2 +- .../components/strategies/percent_rollout.vue | 13 +- .../feature_flags/components/strategy.vue | 159 ++++++++++-------- .../components/strategy_parameters.vue | 3 + .../javascripts/feature_flags/constants.js | 5 + app/assets/javascripts/feature_flags/utils.js | 18 ++ .../components/project_feature_setting.vue | 12 +- .../permissions/components/settings_panel.vue | 17 +- .../components/labels/sidebar_labels.vue | 49 +++--- .../javascripts/sidebar/mount_sidebar.js | 6 - .../members/avatars/user_avatar.vue | 11 ++ .../components/members/constants.js | 4 +- .../members/table/members_table.vue | 12 +- .../members/table/members_table_cell.vue | 6 +- .../members/table/role_dropdown.vue | 49 ++++++ .../labels_select_vue/dropdown_value.vue | 17 +- .../labels_select_vue/labels_select_root.vue | 11 +- .../labels_select_vue/store/actions.js | 3 - .../labels_select_vue/store/mutation_types.js | 1 - .../labels_select_vue/store/mutations.js | 4 - .../sidebar/labels_select_vue/store/state.js | 1 + app/assets/stylesheets/pages/members.scss | 4 + app/controllers/admin/users_controller.rb | 2 +- .../merge_requests/drafts_controller.rb | 2 +- app/graphql/types/ci/detailed_status_type.rb | 18 +- app/graphql/types/ci/group_type.rb | 3 + app/graphql/types/ci/job_type.rb | 3 + app/graphql/types/ci/stage_type.rb | 3 + app/helpers/projects_helper.rb | 13 +- app/models/ci/deleted_object.rb | 37 ++++ app/models/ci/job_artifact.rb | 9 + app/models/ci/pipeline.rb | 19 +++ app/models/commit_status.rb | 1 + app/models/group.rb | 11 ++ app/models/namespace_setting.rb | 7 + app/models/project.rb | 4 +- .../project_services/confluence_service.rb | 2 +- .../project_services/packagist_service.rb | 2 +- app/services/ci/delete_objects_service.rb | 62 +++++++ app/uploaders/deleted_object_uploader.rb | 11 ++ .../abuse_reports/_abuse_report.html.haml | 4 +- app/views/admin/applications/_form.html.haml | 4 +- app/views/admin/applications/index.html.haml | 4 +- app/views/admin/applications/show.html.haml | 6 +- app/views/admin/groups/_form.html.haml | 8 +- app/views/admin/groups/index.html.haml | 2 +- app/views/admin/groups/show.html.haml | 2 +- app/views/admin/health_check/show.html.haml | 2 +- app/views/admin/identities/_form.html.haml | 2 +- .../admin/identities/_identity.html.haml | 4 +- app/views/admin/identities/index.html.haml | 2 +- app/views/admin/projects/index.html.haml | 4 +- app/views/admin/projects/show.html.haml | 4 +- app/views/admin/runners/_runner.html.haml | 8 +- app/views/admin/runners/index.html.haml | 10 +- app/views/admin/runners/show.html.haml | 4 +- .../admin/serverless/domains/_form.html.haml | 6 +- app/views/admin/sessions/_new_base.html.haml | 2 +- .../admin/sessions/_two_factor_otp.html.haml | 2 +- app/views/admin/spam_logs/_spam_log.html.haml | 6 +- app/views/admin/users/_form.html.haml | 2 +- .../subscriptions/index.html.haml | 9 + .../layouts/nav/sidebar/_project.html.haml | 6 +- .../shared/notes/_notes_with_form.html.haml | 2 +- app/workers/all_queues.yml | 16 ++ app/workers/ci/delete_objects_worker.rb | 38 +++++ .../ci/schedule_delete_objects_cron_worker.rb | 18 ++ ...tomation-friendly-migration-rake-tasks.yml | 5 + ...ose-button-to-sidebar-labels-to-remove.yml | 5 + ...-should-be-less-project-level-specific.yml | 5 + ...site_cookies_browser_limitaion_message.yml | 5 + .../264790-bs4-optimization-commit-2.yml | 5 + .../add-ci-deleted-objects-table.yml | 5 + .../feature-flags-flexible-rollout-ux.yml | 5 + ...essful-build-including-child-pipelines.yml | 5 + .../unreleased/lm-add-status-graphql.yml | 5 + .../unreleased/move-ff-menu-doc-to-core.yml | 5 + .../mw-project-settings-icon-replacements.yml | 5 + ...ove-pre-receive-error-ff-merge-message.yml | 5 + .../unreleased/sh-update-rack-2-1-4.yml | 5 + .../ci_delete_objects_high_concurrency.yml | 7 + .../ci_delete_objects_low_concurrency.yml | 7 + .../ci_delete_objects_medium_concurrency.yml | 7 + config/gitlab.yml.example | 3 + config/initializers/1_settings.rb | 3 + config/routes/group.rb | 2 +- config/sidekiq_queues.yml | 2 + ...0200813135558_create_ci_deleted_objects.rb | 29 ++++ db/schema_migrations/20200813135558 | 1 + db/structure.sql | 25 +++ doc/api/feature_flags.md | 6 +- doc/api/feature_flags_legacy.md | 6 +- .../graphql/reference/gitlab_schema.graphql | 33 +++- doc/api/graphql/reference/gitlab_schema.json | 68 ++++++-- doc/api/graphql/reference/index.md | 19 ++- doc/api/job_artifacts.md | 10 ++ doc/ci/pipelines/job_artifacts.md | 5 + doc/development/documentation/index.md | 4 +- doc/install/README.md | 10 +- doc/integration/jira_development_panel.md | 2 +- doc/operations/feature_flags.md | 37 ++++ doc/user/project/integrations/overview.md | 2 +- doc/user/project/labels.md | 23 ++- lib/api/ci/runner.rb | 3 + lib/api/helpers.rb | 2 +- lib/api/internal/lfs.rb | 2 +- lib/backup/repositories.rb | 30 +++- lib/gitlab/ci/status/canceled.rb | 4 + lib/gitlab/ci/status/created.rb | 4 + lib/gitlab/ci/status/failed.rb | 4 + lib/gitlab/ci/status/manual.rb | 4 + lib/gitlab/ci/status/pending.rb | 4 + lib/gitlab/ci/status/preparing.rb | 4 + lib/gitlab/ci/status/running.rb | 4 + lib/gitlab/ci/status/scheduled.rb | 4 + lib/gitlab/ci/status/skipped.rb | 4 + lib/gitlab/ci/status/success.rb | 4 + lib/gitlab/ci/status/waiting_for_resource.rb | 4 + lib/gitlab/ci/trace.rb | 6 +- lib/gitlab/git/pre_receive_error.rb | 10 +- lib/gitlab/gitaly_client/operation_service.rb | 2 +- lib/tasks/gitlab/db.rake | 13 ++ locale/gitlab.pot | 69 +++++++- .../admin/users_controller_spec.rb | 21 ++- .../groups/group_links_controller_spec.rb | 21 +++ spec/factories/ci/deleted_object.rb | 9 + spec/factories/ci/pipelines.rb | 16 ++ spec/features/issues/user_edits_issue_spec.rb | 38 ++++- spec/features/projects/navbar_spec.rb | 8 - .../strategies/flexible_rollout_spec.js | 116 +++++++++++++ .../strategies/percent_rollout_spec.js | 13 ++ .../feature_flags/components/strategy_spec.js | 24 ++- spec/frontend/feature_flags/mock_data.js | 25 +++ spec/frontend/sidebar/sidebar_labels_spec.js | 33 ++-- .../members/avatars/user_avatar_spec.js | 30 ++++ .../components/members/mock_data.js | 9 + .../members/table/member_table_cell_spec.js | 58 ++++++- .../members/table/members_table_spec.js | 41 ++++- .../members/table/role_dropdown_spec.js | 87 ++++++++++ .../labels_select_vue/store/actions_spec.js | 15 -- .../labels_select_vue/store/mutations_spec.js | 13 -- spec/graphql/types/ci/group_type_spec.rb | 1 + spec/graphql/types/ci/job_type_spec.rb | 1 + spec/graphql/types/ci/stage_type_spec.rb | 1 + spec/lib/backup/repositories_spec.rb | 62 ++++++- spec/lib/gitlab/ci/status/canceled_spec.rb | 4 + spec/lib/gitlab/ci/status/created_spec.rb | 4 + spec/lib/gitlab/ci/status/failed_spec.rb | 4 + spec/lib/gitlab/ci/status/pending_spec.rb | 4 + spec/lib/gitlab/ci/status/preparing_spec.rb | 4 + spec/lib/gitlab/ci/status/running_spec.rb | 4 + spec/lib/gitlab/ci/status/scheduled_spec.rb | 4 + spec/lib/gitlab/ci/status/skipped_spec.rb | 4 + spec/lib/gitlab/ci/status/success_spec.rb | 4 + .../ci/status/waiting_for_resource_spec.rb | 4 + spec/lib/gitlab/ci/trace_spec.rb | 10 ++ spec/lib/gitlab/git/pre_receive_error_spec.rb | 16 +- spec/lib/gitlab/middleware/go_spec.rb | 9 +- .../middleware/same_site_cookies_spec.rb | 4 +- spec/models/ci/deleted_object_spec.rb | 95 +++++++++++ spec/models/ci/pipeline_spec.rb | 51 ++++++ spec/models/group_spec.rb | 30 ++++ spec/models/namespace_setting_spec.rb | 28 ++- spec/requests/api/jobs_spec.rb | 16 +- .../ci/delete_objects_service_spec.rb | 133 +++++++++++++++ .../merge_requests/ff_merge_service_spec.rb | 2 +- .../navbar_structure_context.rb | 1 + ...st_successful_build_for_shared_examples.rb | 16 ++ spec/tasks/gitlab/db_rake_spec.rb | 23 +++ spec/workers/ci/delete_objects_worker_spec.rb | 49 ++++++ ...chedule_delete_objects_cron_worker_spec.rb | 15 ++ 174 files changed, 2308 insertions(+), 349 deletions(-) create mode 100644 app/assets/javascripts/feature_flags/components/strategies/flexible_rollout.vue create mode 100644 app/assets/javascripts/vue_shared/components/members/table/role_dropdown.vue create mode 100644 app/models/ci/deleted_object.rb create mode 100644 app/services/ci/delete_objects_service.rb create mode 100644 app/uploaders/deleted_object_uploader.rb create mode 100644 app/workers/ci/delete_objects_worker.rb create mode 100644 app/workers/ci/schedule_delete_objects_cron_worker.rb create mode 100644 changelogs/unreleased/198-add-automation-friendly-migration-rake-tasks.yml create mode 100644 changelogs/unreleased/216881-add-close-button-to-sidebar-labels-to-remove.yml create mode 100644 changelogs/unreleased/263484-integration-descriptions-should-be-less-project-level-specific.yml create mode 100644 changelogs/unreleased/263509_add_cross_site_cookies_browser_limitaion_message.yml create mode 100644 changelogs/unreleased/264790-bs4-optimization-commit-2.yml create mode 100644 changelogs/unreleased/add-ci-deleted-objects-table.yml create mode 100644 changelogs/unreleased/feature-flags-flexible-rollout-ux.yml create mode 100644 changelogs/unreleased/latest-successful-build-including-child-pipelines.yml create mode 100644 changelogs/unreleased/lm-add-status-graphql.yml create mode 100644 changelogs/unreleased/move-ff-menu-doc-to-core.yml create mode 100644 changelogs/unreleased/mw-project-settings-icon-replacements.yml create mode 100644 changelogs/unreleased/sh-improve-pre-receive-error-ff-merge-message.yml create mode 100644 changelogs/unreleased/sh-update-rack-2-1-4.yml create mode 100644 config/feature_flags/development/ci_delete_objects_high_concurrency.yml create mode 100644 config/feature_flags/development/ci_delete_objects_low_concurrency.yml create mode 100644 config/feature_flags/development/ci_delete_objects_medium_concurrency.yml create mode 100644 db/migrate/20200813135558_create_ci_deleted_objects.rb create mode 100644 db/schema_migrations/20200813135558 create mode 100644 spec/factories/ci/deleted_object.rb create mode 100644 spec/frontend/feature_flags/components/strategies/flexible_rollout_spec.js create mode 100644 spec/frontend/vue_shared/components/members/table/role_dropdown_spec.js create mode 100644 spec/models/ci/deleted_object_spec.rb create mode 100644 spec/services/ci/delete_objects_service_spec.rb create mode 100644 spec/workers/ci/delete_objects_worker_spec.rb create mode 100644 spec/workers/ci/schedule_delete_objects_cron_worker_spec.rb diff --git a/Gemfile b/Gemfile index 89c04e17ed9..3110bee4979 100644 --- a/Gemfile +++ b/Gemfile @@ -172,7 +172,7 @@ gem 'diffy', '~> 3.3' gem 'diff_match_patch', '~> 0.1.0' # Application server -gem 'rack', '~> 2.0.9' +gem 'rack', '~> 2.1.4' # https://github.com/sharpstone/rack-timeout/blob/master/README.md#rails-apps-manually gem 'rack-timeout', '~> 0.5.1', require: 'rack/timeout/base' diff --git a/Gemfile.lock b/Gemfile.lock index 8699ec0a21d..0a6b37ab9ee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -852,7 +852,7 @@ GEM public_suffix (4.0.3) pyu-ruby-sasl (0.0.3.3) raabro (1.1.6) - rack (2.0.9) + rack (2.1.4) rack-accept (0.4.5) rack (>= 0.4) rack-attack (6.3.0) @@ -1423,7 +1423,7 @@ DEPENDENCIES prometheus-client-mmap (~> 0.12.0) pry-byebug (~> 3.9.0) pry-rails (~> 0.3.9) - rack (~> 2.0.9) + rack (~> 2.1.4) rack-attack (~> 6.3.0) rack-cors (~> 1.0.6) rack-oauth2 (~> 1.9.3) diff --git a/app/assets/javascripts/feature_flags/components/strategies/flexible_rollout.vue b/app/assets/javascripts/feature_flags/components/strategies/flexible_rollout.vue new file mode 100644 index 00000000000..020a0d43096 --- /dev/null +++ b/app/assets/javascripts/feature_flags/components/strategies/flexible_rollout.vue @@ -0,0 +1,121 @@ + + diff --git a/app/assets/javascripts/feature_flags/components/strategies/gitlab_user_list.vue b/app/assets/javascripts/feature_flags/components/strategies/gitlab_user_list.vue index b13bd86e900..ec97e8b1350 100644 --- a/app/assets/javascripts/feature_flags/components/strategies/gitlab_user_list.vue +++ b/app/assets/javascripts/feature_flags/components/strategies/gitlab_user_list.vue @@ -49,7 +49,7 @@ export default { :state="hasUserLists" :invalid-feedback="$options.translations.rolloutUserListNoListError" :label="$options.translations.rolloutUserListLabel" - :description="$options.translations.rolloutUserListDescription" + :description="hasUserLists ? $options.translations.rolloutUserListDescription : ''" >