summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-20 12:11:29 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-20 12:11:29 +0000
commit7b384a1f3d2608898318e67d11eea2914889ae81 (patch)
treeaf33e77d13b18a96156c69616cb09a3a4f7697c6
parentd46287cc16ba244720c6d5c00491944336972988 (diff)
downloadgitlab-ce-7b384a1f3d2608898318e67d11eea2914889ae81.tar.gz
Add latest changes from gitlab-org/gitlab@12-3-stable
-rw-r--r--.eslintrc.yml6
-rw-r--r--.gitlab/ci/frontend.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/global.gitlab-ci.yml3
-rw-r--r--.gitlab/ci/qa.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/reports.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/review.gitlab-ci.yml127
-rw-r--r--.gitlab/issue_templates/Acceptance_Testing.md12
-rw-r--r--CHANGELOG-EE.md4
-rw-r--r--CHANGELOG.md4
-rw-r--r--Gemfile4
-rw-r--r--Gemfile.lock8
-rw-r--r--README.md4
-rw-r--r--app/assets/javascripts/badges/components/badge_settings.vue4
-rw-r--r--app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js37
-rw-r--r--app/assets/javascripts/blob/template_selector.js1
-rw-r--r--app/assets/javascripts/boards/index.js1
-rw-r--r--app/assets/javascripts/commons/vue.js1
-rw-r--r--app/assets/javascripts/create_item_dropdown.js1
-rw-r--r--app/assets/javascripts/diff_notes/services/resolve.js1
-rw-r--r--app/assets/javascripts/environments/components/stop_environment_modal.vue4
-rw-r--r--app/assets/javascripts/event_tracking/issue_sidebar.js2
-rw-r--r--app/assets/javascripts/event_tracking/notes.js2
-rw-r--r--app/assets/javascripts/filterable_list.js1
-rw-r--r--app/assets/javascripts/header.js5
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/list.vue4
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue4
-rw-r--r--app/assets/javascripts/ide/components/new_dropdown/modal.vue4
-rw-r--r--app/assets/javascripts/image_diff/helpers/badge_helper.js4
-rw-r--r--app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js4
-rw-r--r--app/assets/javascripts/import_projects/components/import_projects_table.vue45
-rw-r--r--app/assets/javascripts/import_projects/index.js2
-rw-r--r--app/assets/javascripts/import_projects/store/actions.js22
-rw-r--r--app/assets/javascripts/import_projects/store/getters.js5
-rw-r--r--app/assets/javascripts/import_projects/store/mutation_types.js2
-rw-r--r--app/assets/javascripts/import_projects/store/mutations.js4
-rw-r--r--app/assets/javascripts/import_projects/store/state.js1
-rw-r--r--app/assets/javascripts/integrations/integration_settings_form.js1
-rw-r--r--app/assets/javascripts/issue_show/components/app.vue36
-rw-r--r--app/assets/javascripts/issue_show/index.js5
-rw-r--r--app/assets/javascripts/issue_show/services/index.js9
-rw-r--r--app/assets/javascripts/issue_show/stores/index.js1
-rw-r--r--app/assets/javascripts/jobs/components/log/collapsible_section.vue55
-rw-r--r--app/assets/javascripts/jobs/components/log/log.vue29
-rw-r--r--app/assets/javascripts/lib/utils/axios_utils.js8
-rw-r--r--app/assets/javascripts/main.js3
-rw-r--r--app/assets/javascripts/namespace_select.js1
-rw-r--r--app/assets/javascripts/notes.js1
-rw-r--r--app/assets/javascripts/notes/components/note_actions/reply_button.vue4
-rw-r--r--app/assets/javascripts/notes/index.js4
-rw-r--r--app/assets/javascripts/pages/admin/jobs/index/components/stop_jobs_modal.vue4
-rw-r--r--app/assets/javascripts/pages/dashboard/todos/index/todos.js6
-rw-r--r--app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue4
-rw-r--r--app/assets/javascripts/pages/projects/commit/pipelines/index.js1
-rw-r--r--app/assets/javascripts/pages/projects/commit/show/index.js1
-rw-r--r--app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue4
-rw-r--r--app/assets/javascripts/pages/search/show/search.js1
-rw-r--r--app/assets/javascripts/performance_bar/components/detailed_metric.vue4
-rw-r--r--app/assets/javascripts/pipelines/components/pipeline_stop_modal.vue4
-rw-r--r--app/assets/javascripts/privacy_policy_update_callout.js2
-rw-r--r--app/assets/javascripts/profile/account/components/update_username.vue4
-rw-r--r--app/assets/javascripts/project_find_file.js2
-rw-r--r--app/assets/javascripts/ref_select_dropdown.js1
-rw-r--r--app/assets/javascripts/reports/components/modal.vue4
-rw-r--r--app/assets/javascripts/sidebar/components/assignees/assignee_title.vue10
-rw-r--r--app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue11
-rw-r--r--app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue11
-rw-r--r--app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue8
-rw-r--r--app/assets/javascripts/sidebar/lib/sidebar_move_issue.js1
-rw-r--r--app/assets/javascripts/tracking.js103
-rw-r--r--app/assets/javascripts/vue_shared/components/deprecated_modal_2.vue118
-rw-r--r--app/assets/javascripts/vue_shared/components/gl_modal.vue117
-rw-r--r--app/assets/javascripts/vue_shared/components/pagination/table_pagination.vue3
-rw-r--r--app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue2
-rw-r--r--app/assets/javascripts/vue_shared/vue_resource_interceptor.js34
-rw-r--r--app/assets/stylesheets/framework.scss1
-rw-r--r--app/assets/stylesheets/framework/contextual_sidebar.scss2
-rw-r--r--app/assets/stylesheets/framework/flash.scss2
-rw-r--r--app/assets/stylesheets/framework/selects.scss2
-rw-r--r--app/assets/stylesheets/framework/sidebar.scss4
-rw-r--r--app/assets/stylesheets/pages/projects.scss7
-rw-r--r--app/controllers/dashboard/todos_controller.rb4
-rw-r--r--app/controllers/import/github_controller.rb21
-rw-r--r--app/controllers/projects/artifacts_controller.rb38
-rw-r--r--app/controllers/projects/registry/tags_controller.rb35
-rw-r--r--app/controllers/projects/templates_controller.rb8
-rw-r--r--app/finders/artifacts_finder.rb24
-rw-r--r--app/helpers/issuables_helper.rb8
-rw-r--r--app/helpers/search_helper.rb19
-rw-r--r--app/helpers/sorting_helper.rb20
-rw-r--r--app/models/ci/build.rb2
-rw-r--r--app/models/ci/job_artifact.rb6
-rw-r--r--app/models/clusters/cluster.rb2
-rw-r--r--app/models/lfs_object.rb1
-rw-r--r--app/models/project.rb1
-rw-r--r--app/models/project_services/jira_service.rb2
-rw-r--r--app/models/release.rb1
-rw-r--r--app/models/repository.rb28
-rw-r--r--app/presenters/project_presenter.rb3
-rw-r--r--app/services/import_export_clean_up_service.rb14
-rw-r--r--app/services/projects/container_repository/cleanup_tags_service.rb2
-rw-r--r--app/services/projects/container_repository/delete_tags_service.rb66
-rw-r--r--app/views/admin/projects/index.html.haml32
-rw-r--r--app/views/ci/runner/_how_to_setup_runner_automatically.html.haml22
-rw-r--r--app/views/clusters/clusters/show.html.haml9
-rw-r--r--app/views/groups/projects.html.haml41
-rw-r--r--app/views/groups/runners/_group_runners.html.haml4
-rw-r--r--app/views/layouts/_page.html.haml2
-rw-r--r--app/views/projects/issues/_issue.html.haml5
-rw-r--r--app/views/projects/mirrors/_mirror_repos.html.haml6
-rw-r--r--app/views/projects/mirrors/_ssh_host_keys.html.haml4
-rw-r--r--app/views/projects/runners/_specific_runners.html.haml25
-rw-r--r--app/views/projects/settings/ci_cd/_autodevops_form.html.haml4
-rw-r--r--app/views/search/results/_empty.html.haml3
-rw-r--r--app/views/shared/_remote_mirror_update_button.html.haml2
-rw-r--r--changelogs/unreleased/21405-fix-registry-tag-delete.yml5
-rw-r--r--changelogs/unreleased/24818-fix-jira-favicon-link.yml5
-rw-r--r--changelogs/unreleased/28311-extremely-low-contrast-in-dropdown-for-group-file-templates.yml5
-rw-r--r--changelogs/unreleased/31837-sidebar-icons-jump.yml5
-rw-r--r--changelogs/unreleased/59036-object-to-local-storage.yml5
-rw-r--r--changelogs/unreleased/63768-group-settings-kubernetes-runner-section.yml5
-rw-r--r--changelogs/unreleased/66123-over-a-thousand-todos-displays-count-of-one.yml6
-rw-r--r--changelogs/unreleased/66330-confidential-quick-action-is-available-for-confidential-issues.yml5
-rw-r--r--changelogs/unreleased/add-first-parent-to-find-commits.yml5
-rw-r--r--changelogs/unreleased/dz-fix-group-settings-projects-page.yml5
-rw-r--r--changelogs/unreleased/expose-name-property-in-import-api.yml5
-rw-r--r--changelogs/unreleased/georgekoltsov-add-github-importer-filtering.yml5
-rw-r--r--changelogs/unreleased/gitaly-1-64.yml5
-rw-r--r--changelogs/unreleased/github-release-importer-fixup.yml5
-rw-r--r--changelogs/unreleased/improve-search-empty-message.yml5
-rw-r--r--changelogs/unreleased/issue_26823_sync_state_id.yml5
-rw-r--r--changelogs/unreleased/mc-feature-show-setup-cicd-empty-repo.yml5
-rw-r--r--changelogs/unreleased/sh-bump-rouge-3-11-0.yml5
-rw-r--r--changelogs/unreleased/winh-issue-list-moved.yml5
-rw-r--r--changelogs/unreleased/zj-timeouts-gitaly-rpcs.yml5
-rw-r--r--config/application.rb49
-rw-r--r--config/initializers/sidekiq.rb14
-rw-r--r--config/routes/project.rb8
-rw-r--r--db/migrate/20190903150358_create_analytics_repository_files_table.rb21
-rw-r--r--db/migrate/20190903150435_create_analytics_repository_file_edits_table.rb29
-rw-r--r--db/post_migrate/20190911251732_sync_issuables_state_id.rb79
-rw-r--r--db/schema.rb18
-rw-r--r--doc/administration/auth/ldap.md12
-rw-r--r--doc/administration/geo/replication/configuration.md4
-rw-r--r--doc/administration/high_availability/README.md2
-rw-r--r--doc/administration/high_availability/database.md2
-rw-r--r--doc/administration/high_availability/redis_source.md2
-rw-r--r--doc/administration/issue_closing_pattern.md2
-rw-r--r--doc/administration/job_artifacts.md12
-rw-r--r--doc/administration/job_traces.md40
-rw-r--r--doc/administration/logs.md2
-rw-r--r--doc/administration/merge_request_diffs.md3
-rw-r--r--doc/administration/monitoring/github_imports.md10
-rw-r--r--doc/administration/operations/sidekiq_memory_killer.md58
-rw-r--r--doc/administration/packages/container_registry.md6
-rw-r--r--doc/administration/pages/index.md32
-rw-r--r--doc/administration/pages/source.md2
-rw-r--r--doc/administration/raketasks/uploads/migrate.md36
-rw-r--r--doc/administration/repository_storage_paths.md4
-rw-r--r--doc/administration/restart_gitlab.md2
-rw-r--r--doc/api/commits.md7
-rw-r--r--doc/api/container_registry.md4
-rw-r--r--doc/api/features.md2
-rw-r--r--doc/api/project_aliases.md16
-rw-r--r--doc/api/project_import_export.md9
-rw-r--r--doc/api/projects.md13
-rw-r--r--doc/api/protected_branches.md38
-rw-r--r--doc/api/runners.md8
-rw-r--r--doc/api/services.md2
-rw-r--r--doc/api/tags.md6
-rw-r--r--doc/api/todos.md12
-rw-r--r--doc/api/users.md29
-rw-r--r--doc/ci/ci_cd_for_external_repos/index.md1
-rw-r--r--doc/ci/pipelines.md2
-rw-r--r--doc/ci/variables/README.md6
-rw-r--r--doc/ci/yaml/README.md28
-rw-r--r--doc/customization/libravatar.md2
-rw-r--r--doc/development/api_graphql_styleguide.md2
-rw-r--r--doc/development/api_styleguide.md4
-rw-r--r--doc/development/architecture.md4
-rw-r--r--doc/development/automatic_ce_ee_merge.md8
-rw-r--r--doc/development/build_test_package.md2
-rw-r--r--doc/development/contributing/merge_request_workflow.md4
-rw-r--r--doc/development/dangerbot.md2
-rw-r--r--doc/development/database_review.md2
-rw-r--r--doc/development/documentation/improvement-workflow.md4
-rw-r--r--doc/development/documentation/site_architecture/index.md4
-rw-r--r--doc/development/documentation/styleguide.md18
-rw-r--r--doc/development/ee_features.md4
-rw-r--r--doc/development/elasticsearch.md2
-rw-r--r--doc/development/emails.md8
-rw-r--r--doc/development/fe_guide/components.md23
-rw-r--r--doc/development/fe_guide/design_patterns.md2
-rw-r--r--doc/development/fe_guide/frontend_faq.md2
-rw-r--r--doc/development/fe_guide/graphql.md2
-rw-r--r--doc/development/fe_guide/style_guide_js.md4
-rw-r--r--doc/development/fe_guide/style_guide_scss.md10
-rw-r--r--doc/development/feature_flags/controls.md4
-rw-r--r--doc/development/file_storage.md2
-rw-r--r--doc/development/go_guide/index.md4
-rw-r--r--doc/development/gotchas.md4
-rw-r--r--doc/development/i18n/externalization.md6
-rw-r--r--doc/development/import_export.md4
-rw-r--r--doc/development/kubernetes.md12
-rw-r--r--doc/development/migration_style_guide.md2
-rw-r--r--doc/development/namespaces_storage_statistics.md4
-rw-r--r--doc/development/new_fe_guide/modules/dirty_submit.md2
-rw-r--r--doc/development/prometheus_metrics.md2
-rw-r--r--doc/development/query_recorder.md2
-rw-r--r--doc/development/routing.md6
-rw-r--r--doc/development/testing_guide/end_to_end/index.md8
-rw-r--r--doc/development/testing_guide/end_to_end/quick_start_guide.md2
-rw-r--r--doc/development/testing_guide/flaky_tests.md2
-rw-r--r--doc/development/testing_guide/frontend_testing.md10
-rw-r--r--doc/development/testing_guide/review_apps.md16
-rw-r--r--doc/development/testing_guide/testing_levels.md2
-rw-r--r--doc/development/uploads.md4
-rw-r--r--doc/development/utilities.md16
-rw-r--r--doc/downgrade_ee_to_ce/README.md2
-rw-r--r--doc/gitlab-basics/start-using-git.md8
-rw-r--r--doc/integration/bitbucket.md2
-rw-r--r--doc/integration/kerberos.md6
-rw-r--r--doc/integration/omniauth.md2
-rw-r--r--doc/raketasks/backup_restore.md2
-rw-r--r--doc/raketasks/cleanup.md2
-rw-r--r--doc/raketasks/import.md4
-rw-r--r--doc/security/crime_vulnerability.md2
-rw-r--r--doc/topics/autodevops/index.md2
-rw-r--r--doc/update/upgrading_from_source.md8
-rw-r--r--doc/user/analytics/cycle_analytics.md2
-rw-r--r--doc/user/analytics/productivity_analytics.md9
-rw-r--r--doc/user/clusters/applications.md12
-rw-r--r--doc/user/clusters/environments.md4
-rw-r--r--doc/user/gitlab_com/index.md14
-rw-r--r--doc/user/group/saml_sso/index.md2
-rw-r--r--doc/user/group/subgroups/index.md13
-rw-r--r--doc/user/packages/npm_registry/index.md48
-rw-r--r--doc/user/permissions.md7
-rw-r--r--doc/user/project/import/gitea.md10
-rw-r--r--doc/user/project/import/github.md5
-rw-r--r--doc/user/project/import/img/import_projects_from_gitea_importer_v12_3.pngbin50650 -> 0 bytes
-rw-r--r--doc/user/project/import/img/import_projects_from_github_importer.pngbin0 -> 17953 bytes
-rw-r--r--doc/user/project/import/img/import_projects_from_github_importer_v12_3.pngbin53497 -> 0 bytes
-rw-r--r--doc/user/project/index.md8
-rw-r--r--doc/user/project/integrations/generic_alerts.md2
-rw-r--r--doc/user/project/integrations/gitlab_slack_application.md4
-rw-r--r--doc/user/project/integrations/jira.md2
-rw-r--r--doc/user/project/merge_requests/browser_performance_testing.md2
-rw-r--r--doc/user/project/merge_requests/merge_request_dependencies.md6
-rw-r--r--doc/user/project/pipelines/job_artifacts.md10
-rw-r--r--doc/user/project/protected_branches.md8
-rw-r--r--doc/user/project/quick_actions.md4
-rw-r--r--doc/user/reserved_names.md2
-rw-r--r--doc/workflow/lfs/lfs_administration.md10
-rw-r--r--jest.config.js13
-rw-r--r--lib/api/commits.rb9
-rw-r--r--lib/api/project_container_repositories.rb12
-rw-r--r--lib/api/project_import.rb2
-rw-r--r--lib/container_registry/client.rb51
-rw-r--r--lib/container_registry/tag.rb9
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events.rb6
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/code_stage_start.rb15
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/issue_created.rb4
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/issue_first_mentioned_in_commit.rb10
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/issue_stage_end.rb13
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_created.rb4
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production.rb10
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_finished.rb10
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_started.rb10
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_merged.rb10
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/plan_stage_start.rb16
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/production_stage_end.rb33
-rw-r--r--lib/gitlab/analytics/cycle_analytics/stage_events/stage_event.rb17
-rw-r--r--lib/gitlab/artifacts/migration_helper.rb33
-rw-r--r--lib/gitlab/gitaly_client.rb25
-rw-r--r--lib/gitlab/gitaly_client/cleanup_service.rb2
-rw-r--r--lib/gitlab/gitaly_client/commit_service.rb8
-rw-r--r--lib/gitlab/gitaly_client/conflicts_service.rb2
-rw-r--r--lib/gitlab/gitaly_client/namespace_service.rb2
-rw-r--r--lib/gitlab/gitaly_client/object_pool_service.rb9
-rw-r--r--lib/gitlab/gitaly_client/operation_service.rb37
-rw-r--r--lib/gitlab/gitaly_client/ref_service.rb10
-rw-r--r--lib/gitlab/gitaly_client/remote_service.rb9
-rw-r--r--lib/gitlab/gitaly_client/repository_service.rb23
-rw-r--r--lib/gitlab/gitaly_client/storage_service.rb4
-rw-r--r--lib/gitlab/gitaly_client/wiki_service.rb6
-rw-r--r--lib/gitlab/github_import/importer/releases_importer.rb3
-rw-r--r--lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb54
-rw-r--r--lib/gitlab/import_export/after_export_strategies/download_notification_strategy.rb6
-rw-r--r--lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb2
-rw-r--r--lib/gitlab/import_export/shared.rb52
-rw-r--r--lib/gitlab/quick_actions/issue_actions.rb3
-rw-r--r--lib/gitlab/sidekiq_daemon/memory_killer.rb221
-rw-r--r--lib/gitlab/sidekiq_daemon/monitor.rb50
-rw-r--r--lib/gitlab/sidekiq_middleware/monitor.rb2
-rw-r--r--lib/gitlab/uploads/migration_helper.rb72
-rw-r--r--lib/gitlab/usage_data.rb1
-rw-r--r--lib/tasks/gitlab/artifacts/migrate.rake29
-rw-r--r--lib/tasks/gitlab/lfs/migrate.rake15
-rw-r--r--lib/tasks/gitlab/traces.rake38
-rw-r--r--lib/tasks/gitlab/uploads/migrate.rake51
-rw-r--r--locale/gitlab.pot99
-rw-r--r--package.json8
-rw-r--r--qa/qa.rb3
-rw-r--r--qa/qa/git/repository.rb11
-rw-r--r--qa/qa/page/base.rb12
-rw-r--r--qa/qa/page/project/settings/mirroring_repositories.rb55
-rw-r--r--qa/qa/page/project/settings/repository.rb6
-rw-r--r--qa/qa/resource/issue.rb14
-rw-r--r--qa/qa/resource/repository/push.rb44
-rw-r--r--qa/qa/resource/tag.rb30
-rw-r--r--qa/qa/resource/user_gpg.rb46
-rw-r--r--qa/qa/runtime/gpg.rb37
-rw-r--r--qa/qa/runtime/user.rb4
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb1
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb4
-rw-r--r--qa/qa/support/page/logging.rb9
-rw-r--r--rubocop/migration_helpers.rb12
-rw-r--r--spec/controllers/dashboard/todos_controller_spec.rb4
-rw-r--r--spec/controllers/projects/artifacts_controller_spec.rb111
-rw-r--r--spec/controllers/projects/registry/tags_controller_spec.rb20
-rw-r--r--spec/controllers/projects/templates_controller_spec.rb40
-rw-r--r--spec/features/clusters/cluster_detail_page_spec.rb44
-rw-r--r--spec/features/container_registry_spec.rb4
-rw-r--r--spec/features/issues/gfm_autocomplete_spec.rb2
-rw-r--r--spec/features/issues_spec.rb3
-rw-r--r--spec/features/projects/import_export/export_file_spec.rb3
-rw-r--r--spec/features/runners_spec.rb6
-rw-r--r--spec/finders/artifacts_finder_spec.rb31
-rw-r--r--spec/frontend/helpers/vue_resource_helper.js11
-rw-r--r--spec/frontend/import_projects/components/import_projects_table_spec.js8
-rw-r--r--spec/frontend/import_projects/store/actions_spec.js64
-rw-r--r--spec/frontend/jobs/components/log/collapsible_section_spec.js60
-rw-r--r--spec/frontend/jobs/components/log/mock_data.js70
-rw-r--r--spec/frontend/tracking_spec.js81
-rw-r--r--spec/helpers/issuables_helper_spec.rb1
-rw-r--r--spec/helpers/search_helper_spec.rb19
-rw-r--r--spec/javascripts/blob/balsamiq/balsamiq_viewer_spec.js63
-rw-r--r--spec/javascripts/header_spec.js8
-rw-r--r--spec/javascripts/helpers/tracking_helper.js25
-rw-r--r--spec/javascripts/helpers/vue_resource_helper.js11
-rw-r--r--spec/javascripts/integrations/integration_settings_form_spec.js1
-rw-r--r--spec/javascripts/issue_show/components/app_spec.js60
-rw-r--r--spec/javascripts/sidebar/assignee_title_spec.js14
-rw-r--r--spec/javascripts/sidebar/confidential_issue_sidebar_spec.js13
-rw-r--r--spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js13
-rw-r--r--spec/javascripts/sidebar/subscriptions_spec.js9
-rw-r--r--spec/javascripts/test_bundle.js9
-rw-r--r--spec/javascripts/todos_spec.js51
-rw-r--r--spec/javascripts/vue_shared/components/gl_modal_spec.js (renamed from spec/javascripts/vue_shared/components/deprecated_modal_2_spec.js)14
-rw-r--r--spec/lib/container_registry/client_spec.rb65
-rw-r--r--spec/lib/container_registry/tag_spec.rb4
-rw-r--r--spec/lib/gitlab/analytics/cycle_analytics/stage_events/code_stage_start_spec.rb22
-rw-r--r--spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_created_spec.rb7
-rw-r--r--spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_first_mentioned_in_commit_spec.rb7
-rw-r--r--spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_stage_end_spec.rb7
-rw-r--r--spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_created_spec.rb7
-rw-r--r--spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production_spec.rb7
-rw-r--r--spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_finished_spec.rb7
-rw-r--r--spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_started_spec.rb7
-rw-r--r--spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_merged_spec.rb7
-rw-r--r--spec/lib/gitlab/analytics/cycle_analytics/stage_events/plan_stage_start_spec.rb24
-rw-r--r--spec/lib/gitlab/analytics/cycle_analytics/stage_events/stage_event_spec.rb7
-rw-r--r--spec/lib/gitlab/gitaly_client_spec.rb10
-rw-r--r--spec/lib/gitlab/github_import/importer/releases_importer_spec.rb40
-rw-r--r--spec/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy_spec.rb26
-rw-r--r--spec/lib/gitlab/import_export/all_models.yml1
-rw-r--r--spec/lib/gitlab/import_export/shared_spec.rb29
-rw-r--r--spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb402
-rw-r--r--spec/lib/gitlab/sidekiq_daemon/monitor_spec.rb48
-rw-r--r--spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb2
-rw-r--r--spec/lib/gitlab/usage_data_spec.rb2
-rw-r--r--spec/migrations/sync_issuables_state_id_spec.rb37
-rw-r--r--spec/models/clusters/cluster_spec.rb9
-rw-r--r--spec/models/project_services/jira_service_spec.rb2
-rw-r--r--spec/models/release_spec.rb1
-rw-r--r--spec/models/repository_spec.rb4
-rw-r--r--spec/presenters/project_presenter_spec.rb22
-rw-r--r--spec/requests/api/commits_spec.rb12
-rw-r--r--spec/requests/api/project_container_repositories_spec.rb36
-rw-r--r--spec/requests/api/project_export_spec.rb2
-rw-r--r--spec/requests/api/project_import_spec.rb47
-rw-r--r--spec/services/projects/container_repository/delete_tags_service_spec.rb120
-rw-r--r--spec/services/quick_actions/interpret_service_spec.rb16
-rw-r--r--spec/support/controllers/githubish_import_controller_shared_examples.rb32
-rw-r--r--spec/support/helpers/wait_for_requests.rb6
-rw-r--r--spec/support/shared_examples/cycle_analytics_event_shared_examples.rb19
-rw-r--r--spec/support/shared_examples/snippet_visibility_shared_examples.rb26
-rw-r--r--spec/tasks/gitlab/artifacts/migrate_rake_spec.rb42
-rw-r--r--spec/tasks/gitlab/lfs/migrate_rake_spec.rb43
-rw-r--r--spec/tasks/gitlab/traces_rake_spec.rb113
-rw-r--r--spec/tasks/gitlab/uploads/migrate_rake_spec.rb25
-rw-r--r--spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb22
-rw-r--r--spec/workers/object_pool/destroy_worker_spec.rb4
-rw-r--r--vendor/licenses.csv1
-rw-r--r--yarn.lock229
395 files changed, 1795 insertions, 4726 deletions
diff --git a/.eslintrc.yml b/.eslintrc.yml
index 59eec634e8b..70a71baa590 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -10,7 +10,6 @@ plugins:
- import
- "@gitlab/i18n"
- "@gitlab/vue-i18n"
- - no-jquery
settings:
import/resolver:
webpack:
@@ -37,11 +36,6 @@ rules:
vue/no-use-v-if-with-v-for: off
vue/no-v-html: off
vue/use-v-on-exact: off
- no-jquery/no-ajax: error
- no-jquery/no-ajax-events: error
- no-jquery/no-load: error
- no-jquery/no-load-shorthand: error
- no-jquery/no-serialize: error
overrides:
files:
- '**/spec/**/*'
diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml
index 92149d5a93e..2f53c6e3fcf 100644
--- a/.gitlab/ci/frontend.gitlab-ci.yml
+++ b/.gitlab/ci/frontend.gitlab-ci.yml
@@ -47,7 +47,7 @@
- rm -f /etc/apt/sources.list.d/google*.list # We don't need to update Chrome here
only:
variables:
- - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ # Matches the gitlab-org group and its subgroups
+ - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
- $CI_SERVER_HOST == "dev.gitlab.org"
tags:
- gitlab-org
diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml
index fa328b7ba64..94d7d2cdaa4 100644
--- a/.gitlab/ci/global.gitlab-ci.yml
+++ b/.gitlab/ci/global.gitlab-ci.yml
@@ -33,7 +33,6 @@
- master
- /^[\d-]+-stable(-ee)?$/
- /^\d+-\d+-auto-deploy-\d+$/
- - /^security\//
- merge_requests
- tags
@@ -103,7 +102,7 @@
refs:
- schedules
variables:
- - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
+ - $REVIEW_APP_CLEANUP && $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
kubernetes: active
.use-pg:
diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml
index d07b9a1055c..013af3d61a4 100644
--- a/.gitlab/ci/qa.gitlab-ci.yml
+++ b/.gitlab/ci/qa.gitlab-ci.yml
@@ -12,7 +12,7 @@
- ./scripts/trigger-build omnibus
only:
variables:
- - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-org($|\/)/ # Matches the gitlab-org group or its subgroups
+ - $CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org"
package-and-qa-manual:
extends:
diff --git a/.gitlab/ci/reports.gitlab-ci.yml b/.gitlab/ci/reports.gitlab-ci.yml
index e380838ea7d..38da73034d5 100644
--- a/.gitlab/ci/reports.gitlab-ci.yml
+++ b/.gitlab/ci/reports.gitlab-ci.yml
@@ -44,8 +44,6 @@ code_quality:
# We need to duplicate this job's definition because it seems it's impossible to
# override an included `only.refs`.
# See https://gitlab.com/gitlab-org/gitlab/issues/31371.
-# Once https://gitlab.com/gitlab-org/gitlab/merge_requests/16487 will be deployed
-# to GitLab.com, we should be able to use the template and set SAST_DISABLE_DIND: "true".
sast:
extends:
- .default-retry
diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml
index 9251644911f..c7b79dac9dd 100644
--- a/.gitlab/ci/review.gitlab-ci.yml
+++ b/.gitlab/ci/review.gitlab-ci.yml
@@ -1,3 +1,15 @@
+.review-base:
+ extends:
+ - .default-tags
+ - .default-retry
+ - .default-only
+ - .only-review
+ - .only-code-qa-changes
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
+ dependencies: []
+ before_script:
+ - source scripts/utils.sh
+
.review-docker:
extends:
- .default-tags
@@ -29,25 +41,6 @@ build-qa-image:
- echo "${CI_JOB_TOKEN}" | docker login --username gitlab-ci-token --password-stdin ${CI_REGISTRY}
- time docker push ${QA_IMAGE}
-schedule:review-cleanup:
- extends:
- - .default-tags
- - .default-retry
- - .default-only
- - .only-code-qa-changes
- - .only-review-schedules
- stage: prepare
- image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
- allow_failure: true
- environment:
- name: review/auto-cleanup
- action: stop
- before_script:
- - source scripts/utils.sh
- - install_gitlab_gem
- script:
- - ruby -rrubygems scripts/review_apps/automated_cleanup.rb
-
.review-build-cng-base:
extends:
- .default-only
@@ -75,15 +68,9 @@ schedule:review-build-cng:
needs: ["gitlab:assets:compile"]
.review-deploy-base:
- extends:
- - .default-tags
- - .default-retry
- - .default-only
- - .only-code-qa-changes
- stage: review
- image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-charts-build-base
- dependencies: []
+ extends: .review-base
allow_failure: true
+ stage: review
variables:
HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}"
DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}"
@@ -118,7 +105,6 @@ schedule:review-build-cng:
review-deploy:
extends:
- .review-deploy-base
- - .only-review
needs: ["review-build-cng"]
schedule:review-deploy:
@@ -162,7 +148,6 @@ review-cleanup-failed-deployment:
- .only-review
- .only-code-qa-changes
stage: qa
- allow_failure: true
variables:
QA_ARTIFACTS_DIR: "${CI_PROJECT_DIR}/qa"
QA_CAN_TEST_GIT_PROTOCOL_V2: "false"
@@ -191,11 +176,13 @@ review-cleanup-failed-deployment:
review-qa-smoke:
extends: .review-qa-base
+ allow_failure: true
script:
- gitlab-qa Test::Instance::Smoke "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}"
review-qa-all:
extends: .review-qa-base
+ allow_failure: true
when: manual
parallel: 5
script:
@@ -203,32 +190,39 @@ review-qa-all:
- export KNAPSACK_TEST_FILE_PATTERN=qa/specs/features/**/*_spec.rb
- gitlab-qa Test::Instance::Any "${QA_IMAGE}" "${CI_ENVIRONMENT_URL}" -- --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format html --out tmp/rspec.htm --color --format documentation
-.review-performance-base:
+parallel-spec-reports:
extends:
- - .review-docker
+ - .default-tags
+ - .default-only
- .only-code-qa-changes
- stage: qa
+ - .only-review
+ image: ruby:2.6-alpine
+ stage: post-test
+ dependencies: ["review-qa-all"]
+ variables:
+ NEW_PARALLEL_SPECS_REPORT: qa/report-new.html
+ BASE_ARTIFACT_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/"
allow_failure: true
- before_script:
- - export CI_ENVIRONMENT_URL="$(cat review_app_url.txt)"
- - echo "${CI_ENVIRONMENT_URL}"
- - mkdir -p gitlab-exporter
- - wget -O ./gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/master/index.js
- - mkdir -p sitespeed-results
- script:
- - docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:6.3.1 --plugins.add ./gitlab-exporter --outputFolder sitespeed-results "${CI_ENVIRONMENT_URL}"
- after_script:
- - mv sitespeed-results/data/performance.json performance.json
+ when: manual
artifacts:
+ when: always
paths:
- - sitespeed-results/
+ - qa/report-new.html
+ - qa/gitlab-qa-run-*
reports:
- performance: performance.json
+ junit: qa/gitlab-qa-run-*/**/rspec-*.xml
+ script:
+ - apk add --update build-base libxml2-dev libxslt-dev && rm -rf /var/cache/apk/*
+ - gem install nokogiri --no-document
+ - cd qa/gitlab-qa-run-*/gitlab-*
+ - ARTIFACT_DIRS=$(pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_)
+ - cd -
+ - '[[ -f $NEW_PARALLEL_SPECS_REPORT ]] || echo "{}" > ${NEW_PARALLEL_SPECS_REPORT}'
+ - scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} ${BASE_ARTIFACT_URL}${ARTIFACT_DIRS} qa/gitlab-qa-run-*/**/rspec.htm
review-performance:
- extends:
- - .review-performance-base
- - .only-review
+ extends: .review-qa-base
+ allow_failure: true
before_script:
- export CI_ENVIRONMENT_URL="$(cat review_app_url.txt)"
- echo "${CI_ENVIRONMENT_URL}"
@@ -247,39 +241,24 @@ review-performance:
schedule:review-performance:
extends:
- - .review-performance-base
+ - review-performance
- .only-review-schedules
dependencies: ["schedule:review-deploy"]
-parallel-spec-reports:
+schedule:review-cleanup:
extends:
- - .default-tags
- - .default-only
- - .only-code-qa-changes
- - .only-review
- image: ruby:2.6-alpine
- stage: post-test
- dependencies: ["review-qa-all"]
- variables:
- NEW_PARALLEL_SPECS_REPORT: qa/report-new.html
- BASE_ARTIFACT_URL: "${CI_PROJECT_URL}/-/jobs/${CI_JOB_ID}/artifacts/file/qa/"
+ - .review-base
+ - .only-review-schedules
+ stage: prepare
allow_failure: true
- when: manual
- artifacts:
- when: always
- paths:
- - qa/report-new.html
- - qa/gitlab-qa-run-*
- reports:
- junit: qa/gitlab-qa-run-*/**/rspec-*.xml
+ environment:
+ name: review/auto-cleanup
+ action: stop
+ before_script:
+ - source scripts/utils.sh
+ - install_gitlab_gem
script:
- - apk add --update build-base libxml2-dev libxslt-dev && rm -rf /var/cache/apk/*
- - gem install nokogiri --no-document
- - cd qa/gitlab-qa-run-*/gitlab-*
- - ARTIFACT_DIRS=$(pwd |rev| awk -F / '{print $1,$2}' | rev | sed s_\ _/_)
- - cd -
- - '[[ -f $NEW_PARALLEL_SPECS_REPORT ]] || echo "{}" > ${NEW_PARALLEL_SPECS_REPORT}'
- - scripts/merge-html-reports ${NEW_PARALLEL_SPECS_REPORT} ${BASE_ARTIFACT_URL}${ARTIFACT_DIRS} qa/gitlab-qa-run-*/**/rspec.htm
+ - ruby -rrubygems scripts/review_apps/automated_cleanup.rb
danger-review:
extends:
diff --git a/.gitlab/issue_templates/Acceptance_Testing.md b/.gitlab/issue_templates/Acceptance_Testing.md
index 5a6c35f28ad..f1fbb96ce61 100644
--- a/.gitlab/issue_templates/Acceptance_Testing.md
+++ b/.gitlab/issue_templates/Acceptance_Testing.md
@@ -25,7 +25,7 @@ Then leave running while monitoring and performing some testing through web, api
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
-- [ ] [Check for errors in GitLab Dev Sentry](https://sentry.gitlab.net/gitlab/devgitlaborg/?query=is%3Aunresolved)
+- [ ] [Check for errors in GitLab Dev Sentry](https://sentry.gitlap.com/gitlab/devgitlaborg/?query=is%3Aunresolved)
## 2. Staging Trial
@@ -41,7 +41,7 @@ Then leave running while monitoring for at least **15 minutes** while performing
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
-- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlab.net/gitlab/gitlabcom/?query=is%3Aunresolved)
+- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved)
## 4. Production Server Version Check
@@ -57,7 +57,7 @@ Then leave running while monitoring for at least **15 minutes** while performing
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
-- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlab.net/gitlab/gitlabcom/?query=is%3Aunresolved)
+- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved)
## 6. Low Impact Check
@@ -69,7 +69,7 @@ Then leave running while monitoring for at least **30 minutes** while performing
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
-- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlab.net/gitlab/gitlabcom/?query=is%3Aunresolved)
+- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved)
## 7. Mid Impact Trial
@@ -81,7 +81,7 @@ Then leave running while monitoring for at least **12 hours** while performing s
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
-- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlab.net/gitlab/gitlabcom/?query=is%3Aunresolved)
+- [ ] [Check for errors in GitLab Sentry](https://sentry.gitlap.com/gitlab/gitlabcom/?query=is%3Aunresolved)
## 8. Full Impact Trial
@@ -93,7 +93,7 @@ Then leave running while monitoring for at least **1 week**.
- [ ] [Monitor Using Grafana](https://dashboards.gitlab.net)
- [ ] [Inspect logs in ELK](https://log.gitlab.net/app/kibana)
-- [ ] [Check for errors in GitLab Dev Sentry](https://sentry.gitlab.net/gitlab/devgitlaborg/?query=is%3Aunresolved)
+- [ ] [Check for errors in GitLab Dev Sentry](https://sentry.gitlap.com/gitlab/devgitlaborg/?query=is%3Aunresolved)
#### Success?
diff --git a/CHANGELOG-EE.md b/CHANGELOG-EE.md
index 9bd0b921665..544033aea1e 100644
--- a/CHANGELOG-EE.md
+++ b/CHANGELOG-EE.md
@@ -252,10 +252,6 @@ Please view this file on the master branch, on stable branches it's out of date.
- Fix alignment of activity dropdown in epic tabs; add counter to discussion tab.
-## 12.1.10
-
-- No changes.
-
## 12.1.5
- No changes.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4235fd5fc1f..6b446b3533b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -320,10 +320,6 @@ entry.
- Update Packer.gitlab-ci.yml to use latest image. (Kelly Hair)
-## 12.1.10
-
-- No changes.
-
## 12.1.5
### Security (2 changes)
diff --git a/Gemfile b/Gemfile
index 5a3a6791b29..864e514ae0d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -148,7 +148,7 @@ gem 'wikicloth', '0.8.1'
gem 'asciidoctor', '~> 2.0.10'
gem 'asciidoctor-include-ext', '~> 0.3.1', require: false
gem 'asciidoctor-plantuml', '0.0.9'
-gem 'rouge', '~> 3.11.0'
+gem 'rouge', '~> 3.7'
gem 'truncato', '~> 0.7.11'
gem 'bootstrap_form', '~> 4.2.0'
gem 'nokogiri', '~> 1.10.4'
@@ -446,7 +446,7 @@ group :ed25519 do
end
# Gitaly GRPC protocol definitions
-gem 'gitaly', '~> 1.65.0'
+gem 'gitaly', '~> 1.58.0'
gem 'grpc', '~> 1.19.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index 3142ba094cd..fec34622be3 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -358,7 +358,7 @@ GEM
po_to_json (>= 1.0.0)
rails (>= 3.2.0)
git (1.5.0)
- gitaly (1.65.0)
+ gitaly (1.58.0)
grpc (~> 1.0)
github-markup (1.7.0)
gitlab-labkit (0.5.2)
@@ -834,7 +834,7 @@ GEM
retriable (3.1.2)
rinku (2.0.0)
rotp (2.1.2)
- rouge (3.11.0)
+ rouge (3.7.0)
rqrcode (0.7.0)
chunky_png
rqrcode-rails3 (0.1.7)
@@ -1168,7 +1168,7 @@ DEPENDENCIES
gettext (~> 3.2.2)
gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.3)
- gitaly (~> 1.65.0)
+ gitaly (~> 1.58.0)
github-markup (~> 1.7.0)
gitlab-labkit (~> 0.5)
gitlab-license (~> 1.0)
@@ -1276,7 +1276,7 @@ DEPENDENCIES
redis-rails (~> 5.0.2)
request_store (~> 1.3)
responders (~> 2.0)
- rouge (~> 3.11.0)
+ rouge (~> 3.7)
rqrcode-rails3 (~> 0.1.7)
rspec-parameterized
rspec-rails (~> 3.8.0)
diff --git a/README.md b/README.md
index 153878c5799..bfc55f28279 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,9 @@
## Canonical source
-The canonical source of GitLab where development takes place is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab).
+The canonical source of GitLab Community Edition is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/).
-A FOSS source of GitLab is hosted on a [mirrored, read-only project on GitLab.com](https://gitlab.com/gitlab-org/gitlab-foss/).
+The source of GitLab Enterprise Edition is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ee).
## Free trial
diff --git a/app/assets/javascripts/badges/components/badge_settings.vue b/app/assets/javascripts/badges/components/badge_settings.vue
index 531f84ad272..75a522efe7e 100644
--- a/app/assets/javascripts/badges/components/badge_settings.vue
+++ b/app/assets/javascripts/badges/components/badge_settings.vue
@@ -2,7 +2,7 @@
import { mapState, mapActions } from 'vuex';
import createFlash from '~/flash';
import { s__ } from '~/locale';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
import Badge from './badge.vue';
import BadgeForm from './badge_form.vue';
import BadgeList from './badge_list.vue';
@@ -13,7 +13,7 @@ export default {
Badge,
BadgeForm,
BadgeList,
- GlModal: DeprecatedModal2,
+ GlModal,
},
computed: {
...mapState(['badgeInModal', 'isEditing']),
diff --git a/app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js b/app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js
index 87c8568802e..75777b910ca 100644
--- a/app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js
+++ b/app/assets/javascripts/blob/balsamiq/balsamiq_viewer.js
@@ -1,7 +1,5 @@
import sqljs from 'sql.js';
import { template as _template } from 'underscore';
-import axios from '~/lib/utils/axios_utils';
-import { successCodes } from '~/lib/utils/http_status';
const PREVIEW_TEMPLATE = _template(`
<div class="card">
@@ -18,25 +16,30 @@ class BalsamiqViewer {
}
loadFile(endpoint) {
- return axios
- .get(endpoint, {
- responseType: 'arraybuffer',
- validateStatus(status) {
- return status !== successCodes.OK;
- },
- })
- .then(({ data }) => {
- this.renderFile(data);
- })
- .catch(e => {
- throw new Error(e);
- });
+ return new Promise((resolve, reject) => {
+ const xhr = new XMLHttpRequest();
+
+ xhr.open('GET', endpoint, true);
+ xhr.responseType = 'arraybuffer';
+ xhr.onload = loadEvent => this.fileLoaded(loadEvent, resolve, reject);
+ xhr.onerror = reject;
+
+ xhr.send();
+ });
+ }
+
+ fileLoaded(loadEvent, resolve, reject) {
+ if (loadEvent.target.status !== 200) return reject();
+
+ this.renderFile(loadEvent);
+
+ return resolve();
}
- renderFile(fileBuffer) {
+ renderFile(loadEvent) {
const container = document.createElement('ul');
- this.initDatabase(fileBuffer);
+ this.initDatabase(loadEvent.target.response);
const previews = this.getPreviews();
previews.forEach(preview => {
diff --git a/app/assets/javascripts/blob/template_selector.js b/app/assets/javascripts/blob/template_selector.js
index 02216e4e93d..9e69c7d7164 100644
--- a/app/assets/javascripts/blob/template_selector.js
+++ b/app/assets/javascripts/blob/template_selector.js
@@ -1,7 +1,6 @@
/* eslint-disable class-methods-use-this */
import $ from 'jquery';
-import '~/gl_dropdown';
export default class TemplateSelector {
constructor({ dropdown, data, pattern, wrapper, editor, $input } = {}) {
diff --git a/app/assets/javascripts/boards/index.js b/app/assets/javascripts/boards/index.js
index da2669e7cde..3bded4a3258 100644
--- a/app/assets/javascripts/boards/index.js
+++ b/app/assets/javascripts/boards/index.js
@@ -22,6 +22,7 @@ import Board from 'ee_else_ce/boards/components/board';
import BoardSidebar from 'ee_else_ce/boards/components/board_sidebar';
import initNewListDropdown from 'ee_else_ce/boards/components/new_list_dropdown';
import BoardAddIssuesModal from '~/boards/components/modal/index.vue';
+import '~/vue_shared/vue_resource_interceptor';
import {
NavigationType,
convertObjectPropsToCamelCase,
diff --git a/app/assets/javascripts/commons/vue.js b/app/assets/javascripts/commons/vue.js
index 8b62d78c043..798623b94fb 100644
--- a/app/assets/javascripts/commons/vue.js
+++ b/app/assets/javascripts/commons/vue.js
@@ -1,4 +1,5 @@
import Vue from 'vue';
+import '../vue_shared/vue_resource_interceptor';
if (process.env.NODE_ENV !== 'production') {
Vue.config.productionTip = false;
diff --git a/app/assets/javascripts/create_item_dropdown.js b/app/assets/javascripts/create_item_dropdown.js
index 95b890b04c1..fa0f04c7d82 100644
--- a/app/assets/javascripts/create_item_dropdown.js
+++ b/app/assets/javascripts/create_item_dropdown.js
@@ -1,5 +1,4 @@
import _ from 'underscore';
-import '~/gl_dropdown';
export default class CreateItemDropdown {
/**
diff --git a/app/assets/javascripts/diff_notes/services/resolve.js b/app/assets/javascripts/diff_notes/services/resolve.js
index 27990b0a45e..0687028ca54 100644
--- a/app/assets/javascripts/diff_notes/services/resolve.js
+++ b/app/assets/javascripts/diff_notes/services/resolve.js
@@ -2,6 +2,7 @@
import Vue from 'vue';
import Flash from '../../flash';
+import '../../vue_shared/vue_resource_interceptor';
import { __ } from '~/locale';
window.gl = window.gl || {};
diff --git a/app/assets/javascripts/environments/components/stop_environment_modal.vue b/app/assets/javascripts/environments/components/stop_environment_modal.vue
index 1ea4e30a7c1..2cc3412e075 100644
--- a/app/assets/javascripts/environments/components/stop_environment_modal.vue
+++ b/app/assets/javascripts/environments/components/stop_environment_modal.vue
@@ -1,7 +1,7 @@
<script>
/* eslint-disable @gitlab/vue-i18n/no-bare-strings */
import { GlTooltipDirective } from '@gitlab/ui';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
import { s__, sprintf } from '~/locale';
import LoadingButton from '~/vue_shared/components/loading_button.vue';
import eventHub from '../event_hub';
@@ -11,7 +11,7 @@ export default {
name: 'StopEnvironmentModal',
components: {
- GlModal: DeprecatedModal2,
+ GlModal,
LoadingButton,
},
diff --git a/app/assets/javascripts/event_tracking/issue_sidebar.js b/app/assets/javascripts/event_tracking/issue_sidebar.js
new file mode 100644
index 00000000000..6909f82c66f
--- /dev/null
+++ b/app/assets/javascripts/event_tracking/issue_sidebar.js
@@ -0,0 +1,2 @@
+export const initSidebarTracking = () => {};
+export const trackEvent = () => {};
diff --git a/app/assets/javascripts/event_tracking/notes.js b/app/assets/javascripts/event_tracking/notes.js
new file mode 100644
index 00000000000..1f70290c397
--- /dev/null
+++ b/app/assets/javascripts/event_tracking/notes.js
@@ -0,0 +1,2 @@
+// Noop function which has a EE counter-part
+export default () => {};
diff --git a/app/assets/javascripts/filterable_list.js b/app/assets/javascripts/filterable_list.js
index c21fba06d42..77080691dcb 100644
--- a/app/assets/javascripts/filterable_list.js
+++ b/app/assets/javascripts/filterable_list.js
@@ -22,7 +22,6 @@ export default class FilterableList {
getPagePath() {
const action = this.filterForm.getAttribute('action');
- // eslint-disable-next-line no-jquery/no-serialize
const params = $(this.filterForm).serialize();
return `${action}${action.indexOf('?') > 0 ? '&' : '?'}${params}`;
}
diff --git a/app/assets/javascripts/header.js b/app/assets/javascripts/header.js
index fdd27e08793..3d846310008 100644
--- a/app/assets/javascripts/header.js
+++ b/app/assets/javascripts/header.js
@@ -15,10 +15,11 @@ import { parseBoolean } from '~/lib/utils/common_utils';
*/
export default function initTodoToggle() {
$(document).on('todo:toggle', (e, count) => {
+ const parsedCount = parseInt(count, 10);
const $todoPendingCount = $('.todos-count');
- $todoPendingCount.text(highCountTrim(count));
- $todoPendingCount.toggleClass('hidden', count === 0);
+ $todoPendingCount.text(highCountTrim(parsedCount));
+ $todoPendingCount.toggleClass('hidden', parsedCount === 0);
});
}
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/list.vue b/app/assets/javascripts/ide/components/commit_sidebar/list.vue
index e16918ae025..4f1260de0bc 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/list.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/list.vue
@@ -3,7 +3,7 @@ import $ from 'jquery';
import { mapActions } from 'vuex';
import { __, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
import tooltip from '~/vue_shared/directives/tooltip';
import ListItem from './list_item.vue';
@@ -11,7 +11,7 @@ export default {
components: {
Icon,
ListItem,
- GlModal: DeprecatedModal2,
+ GlModal,
},
directives: {
tooltip,
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue b/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue
index c14b8a47841..09c9d135614 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue
@@ -4,12 +4,12 @@ import { mapActions } from 'vuex';
import { sprintf, __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
export default {
components: {
Icon,
- GlModal: DeprecatedModal2,
+ GlModal,
},
directives: {
tooltip,
diff --git a/app/assets/javascripts/ide/components/new_dropdown/modal.vue b/app/assets/javascripts/ide/components/new_dropdown/modal.vue
index a2dd31aebd4..f67666f1fbf 100644
--- a/app/assets/javascripts/ide/components/new_dropdown/modal.vue
+++ b/app/assets/javascripts/ide/components/new_dropdown/modal.vue
@@ -3,12 +3,12 @@ import $ from 'jquery';
import flash from '~/flash';
import { __, sprintf, s__ } from '~/locale';
import { mapActions, mapState, mapGetters } from 'vuex';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
import { modalTypes } from '../../constants';
export default {
components: {
- GlModal: DeprecatedModal2,
+ GlModal,
},
data() {
return {
diff --git a/app/assets/javascripts/image_diff/helpers/badge_helper.js b/app/assets/javascripts/image_diff/helpers/badge_helper.js
index 7921650e8a0..000157efad0 100644
--- a/app/assets/javascripts/image_diff/helpers/badge_helper.js
+++ b/app/assets/javascripts/image_diff/helpers/badge_helper.js
@@ -1,5 +1,3 @@
-import { spriteIcon } from '~/lib/utils/common_utils';
-
export function createImageBadge(noteId, { x, y }, classNames = []) {
const buttonEl = document.createElement('button');
const classList = classNames.concat(['js-image-badge']);
@@ -22,7 +20,7 @@ export function addImageBadge(containerEl, { coordinate, badgeText, noteId }) {
export function addImageCommentBadge(containerEl, { coordinate, noteId }) {
const buttonEl = createImageBadge(noteId, coordinate, ['image-comment-badge']);
- buttonEl.innerHTML = spriteIcon('image-comment-dark');
+ buttonEl.innerHTML = gl.utils.spriteIcon('image-comment-dark');
containerEl.appendChild(buttonEl);
}
diff --git a/app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js b/app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js
index df3d90cff68..7051a968dac 100644
--- a/app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js
+++ b/app/assets/javascripts/image_diff/helpers/comment_indicator_helper.js
@@ -1,5 +1,3 @@
-import { spriteIcon } from '~/lib/utils/common_utils';
-
export function addCommentIndicator(containerEl, { x, y }) {
const buttonEl = document.createElement('button');
buttonEl.classList.add('btn-transparent');
@@ -8,7 +6,7 @@ export function addCommentIndicator(containerEl, { x, y }) {
buttonEl.style.left = `${x}px`;
buttonEl.style.top = `${y}px`;
- buttonEl.innerHTML = spriteIcon('image-comment-dark');
+ buttonEl.innerHTML = gl.utils.spriteIcon('image-comment-dark');
containerEl.appendChild(buttonEl);
}
diff --git a/app/assets/javascripts/import_projects/components/import_projects_table.vue b/app/assets/javascripts/import_projects/components/import_projects_table.vue
index e5ac3cbafe5..00eb0afb3bf 100644
--- a/app/assets/javascripts/import_projects/components/import_projects_table.vue
+++ b/app/assets/javascripts/import_projects/components/import_projects_table.vue
@@ -1,5 +1,4 @@
<script>
-import _ from 'underscore';
import { mapActions, mapState, mapGetters } from 'vuex';
import { GlLoadingIcon } from '@gitlab/ui';
import LoadingButton from '~/vue_shared/components/loading_button.vue';
@@ -8,8 +7,6 @@ import ImportedProjectTableRow from './imported_project_table_row.vue';
import ProviderRepoTableRow from './provider_repo_table_row.vue';
import eventHub from '../event_hub';
-const reposFetchThrottleDelay = 1000;
-
export default {
name: 'ImportProjectsTable',
components: {
@@ -26,11 +23,11 @@ export default {
},
computed: {
- ...mapState(['importedProjects', 'providerRepos', 'isLoadingRepos', 'filter']),
+ ...mapState(['importedProjects', 'providerRepos', 'isLoadingRepos']),
...mapGetters(['isImportingAnyRepo', 'hasProviderRepos', 'hasImportedProjects']),
emptyStateText() {
- return sprintf(__('No %{providerTitle} repositories found'), {
+ return sprintf(__('No %{providerTitle} repositories available to import'), {
providerTitle: this.providerTitle,
});
},
@@ -50,38 +47,21 @@ export default {
},
methods: {
- ...mapActions([
- 'fetchRepos',
- 'fetchReposFiltered',
- 'fetchJobs',
- 'stopJobsPolling',
- 'clearJobsEtagPoll',
- 'setFilter',
- ]),
+ ...mapActions(['fetchRepos', 'fetchJobs', 'stopJobsPolling', 'clearJobsEtagPoll']),
importAll() {
eventHub.$emit('importAll');
},
-
- handleFilterInput({ target }) {
- this.setFilter(target.value);
- },
-
- throttledFetchRepos: _.throttle(function fetch() {
- eventHub.$off('importAll');
- this.fetchRepos();
- }, reposFetchThrottleDelay),
},
};
</script>
<template>
<div>
- <p class="light text-nowrap mt-2">
- {{ s__('ImportProjects|Select the projects you want to import') }}
- </p>
-
<div class="d-flex justify-content-between align-items-end flex-wrap mb-3">
+ <p class="light text-nowrap mt-2 my-sm-0">
+ {{ s__('ImportProjects|Select the projects you want to import') }}
+ </p>
<loading-button
container-class="btn btn-success js-import-all"
:loading="isImportingAnyRepo"
@@ -90,19 +70,6 @@ export default {
type="button"
@click="importAll"
/>
- <form novalidate @submit.prevent>
- <input
- :value="filter"
- data-qa-selector="githubish_import_filter_field"
- class="form-control"
- name="filter"
- :placeholder="__('Filter your projects by name')"
- autofocus
- size="40"
- @input="handleFilterInput($event)"
- @keyup.enter="throttledFetchRepos"
- />
- </form>
</div>
<gl-loading-icon
v-if="isLoadingRepos"
diff --git a/app/assets/javascripts/import_projects/index.js b/app/assets/javascripts/import_projects/index.js
index b069dcb7766..2d99d716609 100644
--- a/app/assets/javascripts/import_projects/index.js
+++ b/app/assets/javascripts/import_projects/index.js
@@ -38,7 +38,7 @@ export default function mountImportProjectsTable(mountElement) {
},
methods: {
- ...mapActions(['setInitialData', 'setFilter']),
+ ...mapActions(['setInitialData']),
},
render(createElement) {
diff --git a/app/assets/javascripts/import_projects/store/actions.js b/app/assets/javascripts/import_projects/store/actions.js
index 0fb9a4cdfd4..c44500937cc 100644
--- a/app/assets/javascripts/import_projects/store/actions.js
+++ b/app/assets/javascripts/import_projects/store/actions.js
@@ -5,7 +5,6 @@ import Poll from '~/lib/utils/poll';
import createFlash from '~/flash';
import { s__, sprintf } from '~/locale';
import axios from '~/lib/utils/axios_utils';
-import { jobsPathWithFilter, reposPathWithFilter } from './getters';
let eTagPoll;
@@ -20,20 +19,16 @@ export const restartJobsPolling = () => {
};
export const setInitialData = ({ commit }, data) => commit(types.SET_INITIAL_DATA, data);
-export const setFilter = ({ commit }, filter) => commit(types.SET_FILTER, filter);
export const requestRepos = ({ commit }, repos) => commit(types.REQUEST_REPOS, repos);
export const receiveReposSuccess = ({ commit }, repos) =>
commit(types.RECEIVE_REPOS_SUCCESS, repos);
export const receiveReposError = ({ commit }) => commit(types.RECEIVE_REPOS_ERROR);
export const fetchRepos = ({ state, dispatch }) => {
- dispatch('stopJobsPolling');
dispatch('requestRepos');
- const { provider } = state;
-
return axios
- .get(reposPathWithFilter(state))
+ .get(state.reposPath)
.then(({ data }) =>
dispatch('receiveReposSuccess', convertObjectPropsToCamelCase(data, { deep: true })),
)
@@ -41,7 +36,7 @@ export const fetchRepos = ({ state, dispatch }) => {
.catch(() => {
createFlash(
sprintf(s__('ImportProjects|Requesting your %{provider} repositories failed'), {
- provider,
+ provider: state.provider,
}),
);
@@ -82,23 +77,16 @@ export const fetchImport = ({ state, dispatch }, { newName, targetNamespace, rep
export const receiveJobsSuccess = ({ commit }, updatedProjects) =>
commit(types.RECEIVE_JOBS_SUCCESS, updatedProjects);
export const fetchJobs = ({ state, dispatch }) => {
- const { filter } = state;
-
- if (eTagPoll) {
- stopJobsPolling();
- clearJobsEtagPoll();
- }
+ if (eTagPoll) return;
eTagPoll = new Poll({
resource: {
- fetchJobs: () => axios.get(jobsPathWithFilter(state)),
+ fetchJobs: () => axios.get(state.jobsPath),
},
method: 'fetchJobs',
successCallback: ({ data }) =>
dispatch('receiveJobsSuccess', convertObjectPropsToCamelCase(data, { deep: true })),
- errorCallback: () =>
- createFlash(s__('ImportProjects|Update of imported projects with realtime changes failed')),
- data: { filter },
+ errorCallback: () => createFlash(s__('ImportProjects|Updating the imported projects failed')),
});
if (!Visibility.hidden()) {
diff --git a/app/assets/javascripts/import_projects/store/getters.js b/app/assets/javascripts/import_projects/store/getters.js
index b107c293181..727b80765bd 100644
--- a/app/assets/javascripts/import_projects/store/getters.js
+++ b/app/assets/javascripts/import_projects/store/getters.js
@@ -20,8 +20,3 @@ export const isImportingAnyRepo = state => state.reposBeingImported.length > 0;
export const hasProviderRepos = state => state.providerRepos.length > 0;
export const hasImportedProjects = state => state.importedProjects.length > 0;
-
-export const reposPathWithFilter = ({ reposPath, filter = '' }) =>
- filter ? `${reposPath}?filter=${filter}` : reposPath;
-export const jobsPathWithFilter = ({ jobsPath, filter = '' }) =>
- filter ? `${jobsPath}?filter=${filter}` : jobsPath;
diff --git a/app/assets/javascripts/import_projects/store/mutation_types.js b/app/assets/javascripts/import_projects/store/mutation_types.js
index 16574f4450f..6ba3fd6f29e 100644
--- a/app/assets/javascripts/import_projects/store/mutation_types.js
+++ b/app/assets/javascripts/import_projects/store/mutation_types.js
@@ -9,5 +9,3 @@ export const RECEIVE_IMPORT_SUCCESS = 'RECEIVE_IMPORT_SUCCESS';
export const RECEIVE_IMPORT_ERROR = 'RECEIVE_IMPORT_ERROR';
export const RECEIVE_JOBS_SUCCESS = 'RECEIVE_JOBS_SUCCESS';
-
-export const SET_FILTER = 'SET_FILTER';
diff --git a/app/assets/javascripts/import_projects/store/mutations.js b/app/assets/javascripts/import_projects/store/mutations.js
index 6c56cfa8298..b88de0268e7 100644
--- a/app/assets/javascripts/import_projects/store/mutations.js
+++ b/app/assets/javascripts/import_projects/store/mutations.js
@@ -6,10 +6,6 @@ export default {
Object.assign(state, data);
},
- [types.SET_FILTER](state, filter) {
- state.filter = filter;
- },
-
[types.REQUEST_REPOS](state) {
state.isLoadingRepos = true;
},
diff --git a/app/assets/javascripts/import_projects/store/state.js b/app/assets/javascripts/import_projects/store/state.js
index 829f3aa4fbb..637fef6e53c 100644
--- a/app/assets/javascripts/import_projects/store/state.js
+++ b/app/assets/javascripts/import_projects/store/state.js
@@ -12,5 +12,4 @@ export default () => ({
isLoadingRepos: false,
canSelectNamespace: false,
ciCdOnly: false,
- filter: '',
});
diff --git a/app/assets/javascripts/integrations/integration_settings_form.js b/app/assets/javascripts/integrations/integration_settings_form.js
index 1c9b94ade8a..a7746bb3a0b 100644
--- a/app/assets/javascripts/integrations/integration_settings_form.js
+++ b/app/assets/javascripts/integrations/integration_settings_form.js
@@ -42,7 +42,6 @@ export default class IntegrationSettingsForm {
// and test the service using provided configuration.
if (this.$form.get(0).checkValidity() && this.canTestService) {
e.preventDefault();
- // eslint-disable-next-line no-jquery/no-serialize
this.testSettings(this.$form.serialize());
}
}
diff --git a/app/assets/javascripts/issue_show/components/app.vue b/app/assets/javascripts/issue_show/components/app.vue
index b8b3a4f44fd..88975c2cc73 100644
--- a/app/assets/javascripts/issue_show/components/app.vue
+++ b/app/assets/javascripts/issue_show/components/app.vue
@@ -102,10 +102,10 @@ export default {
required: false,
default: '',
},
- issuableTemplateNamesPath: {
- type: String,
+ issuableTemplates: {
+ type: Array,
required: false,
- default: '',
+ default: () => [],
},
markdownPreviewPath: {
type: String,
@@ -156,13 +156,9 @@ export default {
store,
state: store.state,
showForm: false,
- templatesRequested: false,
};
},
computed: {
- issuableTemplates() {
- return this.store.formState.issuableTemplates;
- },
formState() {
return this.store.formState;
},
@@ -237,7 +233,6 @@ export default {
}
return undefined;
},
-
updateStoreState() {
return this.service
.getData()
@@ -250,7 +245,7 @@ export default {
});
},
- updateAndShowForm(templates = []) {
+ openForm() {
if (!this.showForm) {
this.showForm = true;
this.store.setFormState({
@@ -259,32 +254,9 @@ export default {
lock_version: this.state.lock_version,
lockedWarningVisible: false,
updateLoading: false,
- issuableTemplates: templates,
- });
- }
- },
-
- requestTemplatesAndShowForm() {
- return this.service
- .loadTemplates(this.issuableTemplateNamesPath)
- .then(res => {
- this.updateAndShowForm(res.data);
- })
- .catch(() => {
- createFlash(this.defaultErrorMessage);
- this.updateAndShowForm();
});
- },
-
- openForm() {
- if (!this.templatesRequested) {
- this.templatesRequested = true;
- this.requestTemplatesAndShowForm();
- } else {
- this.updateAndShowForm(this.issuableTemplates);
}
},
-
closeForm() {
this.showForm = false;
},
diff --git a/app/assets/javascripts/issue_show/index.js b/app/assets/javascripts/issue_show/index.js
index e170d338408..5a9dd91817e 100644
--- a/app/assets/javascripts/issue_show/index.js
+++ b/app/assets/javascripts/issue_show/index.js
@@ -1,6 +1,8 @@
import Vue from 'vue';
+import { initSidebarTracking } from 'ee_else_ce/event_tracking/issue_sidebar';
import issuableApp from './components/app.vue';
import { parseIssuableData } from './utils/parse_data';
+import '../vue_shared/vue_resource_interceptor';
export default function initIssueableApp() {
return new Vue({
@@ -8,6 +10,9 @@ export default function initIssueableApp() {
components: {
issuableApp,
},
+ mounted() {
+ initSidebarTracking();
+ },
render(createElement) {
return createElement('issuable-app', {
props: parseIssuableData(),
diff --git a/app/assets/javascripts/issue_show/services/index.js b/app/assets/javascripts/issue_show/services/index.js
index b1deeaae0fc..3c8334bee50 100644
--- a/app/assets/javascripts/issue_show/services/index.js
+++ b/app/assets/javascripts/issue_show/services/index.js
@@ -17,13 +17,4 @@ export default class Service {
updateIssuable(data) {
return axios.put(this.endpoint, data);
}
-
- // eslint-disable-next-line class-methods-use-this
- loadTemplates(templateNamesEndpoint) {
- if (!templateNamesEndpoint) {
- return Promise.resolve([]);
- }
-
- return axios.get(templateNamesEndpoint);
- }
}
diff --git a/app/assets/javascripts/issue_show/stores/index.js b/app/assets/javascripts/issue_show/stores/index.js
index d32747b5053..3c17e73ccec 100644
--- a/app/assets/javascripts/issue_show/stores/index.js
+++ b/app/assets/javascripts/issue_show/stores/index.js
@@ -9,7 +9,6 @@ export default class Store {
lockedWarningVisible: false,
updateLoading: false,
lock_version: 0,
- issuableTemplates: [],
};
}
diff --git a/app/assets/javascripts/jobs/components/log/collapsible_section.vue b/app/assets/javascripts/jobs/components/log/collapsible_section.vue
deleted file mode 100644
index 7c0deb08488..00000000000
--- a/app/assets/javascripts/jobs/components/log/collapsible_section.vue
+++ /dev/null
@@ -1,55 +0,0 @@
-<script>
-import LogLine from './line.vue';
-import LogLineHeader from './line_header.vue';
-
-export default {
- name: 'CollpasibleLogSection',
- components: {
- LogLine,
- LogLineHeader,
- },
- props: {
- section: {
- type: Object,
- required: true,
- },
- traceEndpoint: {
- type: String,
- required: true,
- },
- },
- computed: {
- badgeDuration() {
- return this.section.line && this.section.line.section_duration;
- },
- },
- methods: {
- handleOnClickCollapsibleLine(section) {
- this.$emit('onClickCollapsibleLine', section);
- },
- },
-};
-</script>
-<template>
- <div>
- <log-line-header
- :line="section.line"
- :duration="badgeDuration"
- :path="traceEndpoint"
- :is-closed="section.isClosed"
- @toggleLine="handleOnClickCollapsibleLine(section)"
- />
- <template v-if="!section.isClosed">
- <template v-for="line in section.lines">
- <collpasible-log-section
- v-if="line.isHeader"
- :key="`collapsible-nested-${line.offset}`"
- :section="line"
- :trace-endpoint="traceEndpoint"
- @toggleLine="handleOnClickCollapsibleLine"
- />
- <log-line v-else :key="line.offset" :line="line" :path="traceEndpoint" />
- </template>
- </template>
- </div>
-</template>
diff --git a/app/assets/javascripts/jobs/components/log/log.vue b/app/assets/javascripts/jobs/components/log/log.vue
index ef126166e8b..429796aeb4e 100644
--- a/app/assets/javascripts/jobs/components/log/log.vue
+++ b/app/assets/javascripts/jobs/components/log/log.vue
@@ -1,12 +1,12 @@
<script>
import { mapState, mapActions } from 'vuex';
-import CollpasibleLogSection from './collapsible_section.vue';
import LogLine from './line.vue';
+import LogLineHeader from './line_header.vue';
export default {
components: {
- CollpasibleLogSection,
LogLine,
+ LogLineHeader,
},
computed: {
...mapState(['traceEndpoint', 'trace', 'isTraceComplete']),
@@ -22,13 +22,24 @@ export default {
<template>
<code class="job-log d-block">
<template v-for="(section, index) in trace">
- <collpasible-log-section
- v-if="section.isHeader"
- :key="`collapsible-${index}`"
- :section="section"
- :trace-endpoint="traceEndpoint"
- @onClickCollapsibleLine="handleOnClickCollapsibleLine"
- />
+ <template v-if="section.isHeader">
+ <log-line-header
+ :key="`collapsible-${index}`"
+ :line="section.line"
+ :duration="section.section_duration"
+ :path="traceEndpoint"
+ :is-closed="section.isClosed"
+ @toggleLine="handleOnClickCollapsibleLine(section)"
+ />
+ <template v-if="!section.isClosed">
+ <log-line
+ v-for="line in section.lines"
+ :key="line.offset"
+ :line="line"
+ :path="traceEndpoint"
+ />
+ </template>
+ </template>
<log-line v-else :key="section.offset" :line="section" :path="traceEndpoint" />
</template>
diff --git a/app/assets/javascripts/lib/utils/axios_utils.js b/app/assets/javascripts/lib/utils/axios_utils.js
index c17f62c671c..37721cd030c 100644
--- a/app/assets/javascripts/lib/utils/axios_utils.js
+++ b/app/assets/javascripts/lib/utils/axios_utils.js
@@ -8,19 +8,19 @@ axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
// Maintain a global counter for active requests
// see: spec/support/wait_for_requests.rb
axios.interceptors.request.use(config => {
- window.pendingRequests = window.pendingRequests || 0;
- window.pendingRequests += 1;
+ window.activeVueResources = window.activeVueResources || 0;
+ window.activeVueResources += 1;
return config;
});
// Remove the global counter
axios.interceptors.response.use(
response => {
- window.pendingRequests -= 1;
+ window.activeVueResources -= 1;
return response;
},
err => {
- window.pendingRequests -= 1;
+ window.activeVueResources -= 1;
return Promise.reject(err);
},
);
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
index c19a845eb69..0ddf40b0405 100644
--- a/app/assets/javascripts/main.js
+++ b/app/assets/javascripts/main.js
@@ -37,7 +37,6 @@ import GlFieldErrors from './gl_field_errors';
import initUserPopovers from './user_popovers';
import { initUserTracking } from './tracking';
import { __ } from './locale';
-import initPrivacyPolicyUpdateCallout from './privacy_policy_update_callout';
import 'ee_else_ce/main_ee';
@@ -97,7 +96,6 @@ function deferredInitialisation() {
initUsagePingConsent();
initUserPopovers();
initUserTracking();
- initPrivacyPolicyUpdateCallout();
if (document.querySelector('.search')) initSearchAutocomplete();
@@ -314,7 +312,6 @@ document.addEventListener('DOMContentLoaded', () => {
const action = `${this.action}${link.search === '' ? '?' : '&'}`;
event.preventDefault();
- // eslint-disable-next-line no-jquery/no-serialize
visitUrl(`${action}${$(this).serialize()}`);
});
diff --git a/app/assets/javascripts/namespace_select.js b/app/assets/javascripts/namespace_select.js
index 4660e4397a2..4ddbec71ba6 100644
--- a/app/assets/javascripts/namespace_select.js
+++ b/app/assets/javascripts/namespace_select.js
@@ -1,7 +1,6 @@
/* eslint-disable func-names, no-else-return, prefer-template, prefer-arrow-callback */
import $ from 'jquery';
-import '~/gl_dropdown';
import Api from './api';
import { mergeUrlParams } from './lib/utils/url_utility';
import { parseBoolean } from '~/lib/utils/common_utils';
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index ed52eec8b18..9cc56b34c75 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -1461,7 +1461,6 @@ export default class Notes {
getFormData($form) {
const content = $form.find('.js-note-text').val();
return {
- // eslint-disable-next-line no-jquery/no-serialize
formData: $form.serialize(),
formContent: _.escape(content),
formAction: $form.attr('action'),
diff --git a/app/assets/javascripts/notes/components/note_actions/reply_button.vue b/app/assets/javascripts/notes/components/note_actions/reply_button.vue
index 8bdee759a23..1aeb07d6608 100644
--- a/app/assets/javascripts/notes/components/note_actions/reply_button.vue
+++ b/app/assets/javascripts/notes/components/note_actions/reply_button.vue
@@ -19,9 +19,7 @@ export default {
<gl-button
ref="button"
v-gl-tooltip
- class="note-action-button"
- data-track-event="click_button"
- data-track-label="reply_comment_button"
+ class="note-action-button js-note-action-reply"
variant="transparent"
:title="__('Reply to comment')"
@click="$emit('startReplying')"
diff --git a/app/assets/javascripts/notes/index.js b/app/assets/javascripts/notes/index.js
index 30372103590..c70c0e4095c 100644
--- a/app/assets/javascripts/notes/index.js
+++ b/app/assets/javascripts/notes/index.js
@@ -1,4 +1,5 @@
import Vue from 'vue';
+import initNoteStats from 'ee_else_ce/event_tracking/notes';
import notesApp from './components/notes_app.vue';
import initDiscussionFilters from './discussion_filters';
import createStore from './stores';
@@ -38,6 +39,9 @@ document.addEventListener('DOMContentLoaded', () => {
notesData: JSON.parse(notesDataset.notesData),
};
},
+ mounted() {
+ initNoteStats();
+ },
render(createElement) {
return createElement('notes-app', {
props: {
diff --git a/app/assets/javascripts/pages/admin/jobs/index/components/stop_jobs_modal.vue b/app/assets/javascripts/pages/admin/jobs/index/components/stop_jobs_modal.vue
index eb03baf4894..e2fec3c7172 100644
--- a/app/assets/javascripts/pages/admin/jobs/index/components/stop_jobs_modal.vue
+++ b/app/assets/javascripts/pages/admin/jobs/index/components/stop_jobs_modal.vue
@@ -1,13 +1,13 @@
<script>
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
import { redirectTo } from '~/lib/utils/url_utility';
import { s__ } from '~/locale';
export default {
components: {
- GlModal: DeprecatedModal2,
+ GlModal,
},
props: {
url: {
diff --git a/app/assets/javascripts/pages/dashboard/todos/index/todos.js b/app/assets/javascripts/pages/dashboard/todos/index/todos.js
index 5230bdf9cdd..d51d411f3c6 100644
--- a/app/assets/javascripts/pages/dashboard/todos/index/todos.js
+++ b/app/assets/javascripts/pages/dashboard/todos/index/todos.js
@@ -1,11 +1,9 @@
/* eslint-disable class-methods-use-this, no-unneeded-ternary */
import $ from 'jquery';
-import '~/gl_dropdown';
import { visitUrl } from '~/lib/utils/url_utility';
import UsersSelect from '~/users_select';
import { isMetaClick } from '~/lib/utils/common_utils';
-import { addDelimiter } from '~/lib/utils/text_utility';
import { __ } from '~/locale';
import flash from '~/flash';
import axios from '~/lib/utils/axios_utils';
@@ -147,8 +145,8 @@ export default class Todos {
updateBadges(data) {
$(document).trigger('todo:toggle', data.count);
- document.querySelector('.todos-pending .badge').innerHTML = addDelimiter(data.count);
- document.querySelector('.todos-done .badge').innerHTML = addDelimiter(data.done_count);
+ document.querySelector('.todos-pending .badge').innerHTML = data.count;
+ document.querySelector('.todos-done .badge').innerHTML = data.done_count;
}
goToTodoUrl(e) {
diff --git a/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue b/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue
index 26adf4cbbe0..c563514d36b 100644
--- a/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue
+++ b/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue
@@ -1,14 +1,14 @@
<script>
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
import { s__, sprintf } from '~/locale';
import { visitUrl } from '~/lib/utils/url_utility';
import eventHub from '../event_hub';
export default {
components: {
- GlModal: DeprecatedModal2,
+ GlModal,
},
props: {
milestoneTitle: {
diff --git a/app/assets/javascripts/pages/projects/commit/pipelines/index.js b/app/assets/javascripts/pages/projects/commit/pipelines/index.js
index 9f08260c3d6..8cc3cb0a57c 100644
--- a/app/assets/javascripts/pages/projects/commit/pipelines/index.js
+++ b/app/assets/javascripts/pages/projects/commit/pipelines/index.js
@@ -6,7 +6,6 @@ document.addEventListener('DOMContentLoaded', () => {
new MiniPipelineGraph({
container: '.js-commit-pipeline-graph',
}).bindEvents();
- // eslint-disable-next-line no-jquery/no-load
$('.commit-info.branches').load(document.querySelector('.js-commit-box').dataset.commitPath);
initPipelines();
});
diff --git a/app/assets/javascripts/pages/projects/commit/show/index.js b/app/assets/javascripts/pages/projects/commit/show/index.js
index 5aa4734244e..6fc982967eb 100644
--- a/app/assets/javascripts/pages/projects/commit/show/index.js
+++ b/app/assets/javascripts/pages/projects/commit/show/index.js
@@ -21,7 +21,6 @@ document.addEventListener('DOMContentLoaded', () => {
}).bindEvents();
initNotes();
initChangesDropdown(document.querySelector('.navbar-gitlab').offsetHeight + performanceHeight);
- // eslint-disable-next-line no-jquery/no-load
$('.commit-info.branches').load(document.querySelector('.js-commit-box').dataset.commitPath);
fetchCommitMergeRequests();
initDiffNotes();
diff --git a/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue b/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue
index bb95f33c838..e723cd3fea9 100644
--- a/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue
+++ b/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue
@@ -2,14 +2,14 @@
import _ from 'underscore';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
import { s__, sprintf } from '~/locale';
import { visitUrl } from '~/lib/utils/url_utility';
import eventHub from '../event_hub';
export default {
components: {
- GlModal: DeprecatedModal2,
+ GlModal,
},
props: {
url: {
diff --git a/app/assets/javascripts/pages/search/show/search.js b/app/assets/javascripts/pages/search/show/search.js
index dff9d855b67..8f6c48ab065 100644
--- a/app/assets/javascripts/pages/search/show/search.js
+++ b/app/assets/javascripts/pages/search/show/search.js
@@ -1,5 +1,4 @@
import $ from 'jquery';
-import '~/gl_dropdown';
import Flash from '~/flash';
import Api from '~/api';
import { __ } from '~/locale';
diff --git a/app/assets/javascripts/performance_bar/components/detailed_metric.vue b/app/assets/javascripts/performance_bar/components/detailed_metric.vue
index f2d98cf07e1..a271284dd89 100644
--- a/app/assets/javascripts/performance_bar/components/detailed_metric.vue
+++ b/app/assets/javascripts/performance_bar/components/detailed_metric.vue
@@ -1,10 +1,10 @@
<script>
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
import Icon from '~/vue_shared/components/icon.vue';
export default {
components: {
- GlModal: DeprecatedModal2,
+ GlModal,
Icon,
},
props: {
diff --git a/app/assets/javascripts/pipelines/components/pipeline_stop_modal.vue b/app/assets/javascripts/pipelines/components/pipeline_stop_modal.vue
index 2e71b3c637b..4cafd147511 100644
--- a/app/assets/javascripts/pipelines/components/pipeline_stop_modal.vue
+++ b/app/assets/javascripts/pipelines/components/pipeline_stop_modal.vue
@@ -1,6 +1,6 @@
<script>
import _ from 'underscore';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
import { GlLink } from '@gitlab/ui';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import CiIcon from '~/vue_shared/components/ci_icon.vue';
@@ -13,7 +13,7 @@ import { s__, sprintf } from '~/locale';
*/
export default {
components: {
- GlModal: DeprecatedModal2,
+ GlModal,
GlLink,
ClipboardButton,
CiIcon,
diff --git a/app/assets/javascripts/privacy_policy_update_callout.js b/app/assets/javascripts/privacy_policy_update_callout.js
index 97f41deb30f..126b1ee1132 100644
--- a/app/assets/javascripts/privacy_policy_update_callout.js
+++ b/app/assets/javascripts/privacy_policy_update_callout.js
@@ -1,7 +1,7 @@
import PersistentUserCallout from '~/persistent_user_callout';
function initPrivacyPolicyUpdateCallout() {
- const callout = document.querySelector('.js-privacy-policy-update');
+ const callout = document.querySelector('.privacy-policy-update-64341');
PersistentUserCallout.factory(callout);
}
diff --git a/app/assets/javascripts/profile/account/components/update_username.vue b/app/assets/javascripts/profile/account/components/update_username.vue
index 72867ecd709..e1085c0a44d 100644
--- a/app/assets/javascripts/profile/account/components/update_username.vue
+++ b/app/assets/javascripts/profile/account/components/update_username.vue
@@ -1,13 +1,13 @@
<script>
import _ from 'underscore';
import axios from '~/lib/utils/axios_utils';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
import { s__, sprintf } from '~/locale';
import Flash from '~/flash';
export default {
components: {
- GlModal: DeprecatedModal2,
+ GlModal,
},
props: {
actionUrl: {
diff --git a/app/assets/javascripts/project_find_file.js b/app/assets/javascripts/project_find_file.js
index c198c4eea4a..e73a828c0ae 100644
--- a/app/assets/javascripts/project_find_file.js
+++ b/app/assets/javascripts/project_find_file.js
@@ -81,7 +81,7 @@ export default class ProjectFindFile {
// find file
}
- // files paths load
+ // files pathes load
load(url) {
axios
.get(url)
diff --git a/app/assets/javascripts/ref_select_dropdown.js b/app/assets/javascripts/ref_select_dropdown.js
index 2e0113271df..75bac035aca 100644
--- a/app/assets/javascripts/ref_select_dropdown.js
+++ b/app/assets/javascripts/ref_select_dropdown.js
@@ -1,5 +1,4 @@
import $ from 'jquery';
-import '~/gl_dropdown';
class RefSelectDropdown {
constructor($dropdownButton, availableRefs) {
diff --git a/app/assets/javascripts/reports/components/modal.vue b/app/assets/javascripts/reports/components/modal.vue
index 6019af2dfe0..cb9c1642608 100644
--- a/app/assets/javascripts/reports/components/modal.vue
+++ b/app/assets/javascripts/reports/components/modal.vue
@@ -1,13 +1,13 @@
<script>
// import { sprintf, __ } from '~/locale';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import Modal from '~/vue_shared/components/gl_modal.vue';
import LoadingButton from '~/vue_shared/components/loading_button.vue';
import CodeBlock from '~/vue_shared/components/code_block.vue';
import { fieldTypes } from '../constants';
export default {
components: {
- Modal: DeprecatedModal2,
+ Modal,
LoadingButton,
CodeBlock,
},
diff --git a/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue b/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue
index f4dac38b9e1..63b93a80ead 100644
--- a/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue
+++ b/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue
@@ -1,5 +1,6 @@
<script>
import { n__ } from '~/locale';
+import { trackEvent } from 'ee_else_ce/event_tracking/issue_sidebar';
export default {
name: 'AssigneeTitle',
@@ -29,6 +30,11 @@ export default {
return n__('Assignee', `%d Assignees`, assignees);
},
},
+ methods: {
+ trackEdit() {
+ trackEvent('click_edit_button', 'assignee');
+ },
+ },
};
</script>
<template>
@@ -39,9 +45,7 @@ export default {
v-if="editable"
class="js-sidebar-dropdown-toggle edit-link float-right"
href="#"
- data-track-event="click_edit_button"
- data-track-label="right_sidebar"
- data-track-property="assignee"
+ @click.prevent="trackEdit"
>
{{ __('Edit') }}
</a>
diff --git a/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue b/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue
index e350264de96..1c75b6148e8 100644
--- a/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue
+++ b/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue
@@ -5,6 +5,7 @@ import tooltip from '~/vue_shared/directives/tooltip';
import Icon from '~/vue_shared/components/icon.vue';
import eventHub from '~/sidebar/event_hub';
import editForm from './edit_form.vue';
+import { trackEvent } from 'ee_else_ce/event_tracking/issue_sidebar';
export default {
components: {
@@ -51,6 +52,11 @@ export default {
toggleForm() {
this.edit = !this.edit;
},
+ onEditClick() {
+ this.toggleForm();
+
+ trackEvent('click_edit_button', 'confidentiality');
+ },
updateConfidentialAttribute(confidential) {
this.service
.update('issue', { confidential })
@@ -82,10 +88,7 @@ export default {
v-if="isEditable"
class="float-right confidential-edit"
href="#"
- data-track-event="click_edit_button"
- data-track-label="right_sidebar"
- data-track-property="confidentiality"
- @click.prevent="toggleForm"
+ @click.prevent="onEditClick"
>
{{ __('Edit') }}
</a>
diff --git a/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue b/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
index c7c5e0e20f1..ec2a7b93a98 100644
--- a/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
+++ b/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue
@@ -6,6 +6,7 @@ import issuableMixin from '~/vue_shared/mixins/issuable';
import Icon from '~/vue_shared/components/icon.vue';
import eventHub from '~/sidebar/event_hub';
import editForm from './edit_form.vue';
+import { trackEvent } from 'ee_else_ce/event_tracking/issue_sidebar';
export default {
components: {
@@ -65,6 +66,11 @@ export default {
toggleForm() {
this.mediator.store.isLockDialogOpen = !this.mediator.store.isLockDialogOpen;
},
+ onEditClick() {
+ this.toggleForm();
+
+ trackEvent('click_edit_button', 'lock_issue');
+ },
updateLockedAttribute(locked) {
this.mediator.service
.update(this.issuableType, {
@@ -108,10 +114,7 @@ export default {
v-if="isEditable"
class="float-right lock-edit"
type="button"
- data-track-event="click_edit_button"
- data-track-label="right_sidebar"
- data-track-property="lock_issue"
- @click.prevent="toggleForm"
+ @click.prevent="onEditClick"
>
{{ __('Edit') }}
</button>
diff --git a/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue b/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
index ea5edb3ce3f..1f5f19d1931 100644
--- a/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
+++ b/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
@@ -1,10 +1,10 @@
<script>
import { __ } from '~/locale';
-import Tracking from '~/tracking';
import icon from '~/vue_shared/components/icon.vue';
import toggleButton from '~/vue_shared/components/toggle_button.vue';
import tooltip from '~/vue_shared/directives/tooltip';
import eventHub from '../../event_hub';
+import { trackEvent } from 'ee_else_ce/event_tracking/issue_sidebar';
const ICON_ON = 'notifications';
const ICON_OFF = 'notifications-off';
@@ -19,7 +19,6 @@ export default {
icon,
toggleButton,
},
- mixins: [Tracking.mixin({ label: 'right_sidebar' })],
props: {
loading: {
type: Boolean,
@@ -66,10 +65,7 @@ export default {
// Component event emission.
this.$emit('toggleSubscription', this.id);
- this.track('toggle_button', {
- property: 'notifications',
- value: this.subscribed ? 0 : 1,
- });
+ trackEvent('toggle_button', 'notifications', this.subscribed ? 0 : 1);
},
onClickCollapsedIcon() {
this.$emit('toggleSidebar');
diff --git a/app/assets/javascripts/sidebar/lib/sidebar_move_issue.js b/app/assets/javascripts/sidebar/lib/sidebar_move_issue.js
index 66d1fed7d31..110175a6779 100644
--- a/app/assets/javascripts/sidebar/lib/sidebar_move_issue.js
+++ b/app/assets/javascripts/sidebar/lib/sidebar_move_issue.js
@@ -1,5 +1,4 @@
import $ from 'jquery';
-import '~/gl_dropdown';
import _ from 'underscore';
import { __ } from '~/locale';
diff --git a/app/assets/javascripts/tracking.js b/app/assets/javascripts/tracking.js
index 7c0097fbe37..1b4ca1d5741 100644
--- a/app/assets/javascripts/tracking.js
+++ b/app/assets/javascripts/tracking.js
@@ -1,4 +1,4 @@
-import _ from 'underscore';
+import $ from 'jquery';
const DEFAULT_SNOWPLOW_OPTIONS = {
namespace: 'gl',
@@ -14,31 +14,18 @@ const DEFAULT_SNOWPLOW_OPTIONS = {
linkClickTracking: false,
};
-const eventHandler = (e, func, opts = {}) => {
- const el = e.target.closest('[data-track-event]');
- const action = el && el.dataset.trackEvent;
- if (!action) return;
-
- let value = el.dataset.trackValue || el.value || undefined;
- if (el.type === 'checkbox' && !el.checked) value = false;
-
- const data = {
- label: el.dataset.trackLabel,
- property: el.dataset.trackProperty,
- value,
- context: el.dataset.trackContext,
- };
-
- func(opts.category, action + (opts.suffix || ''), _.omit(data, _.isUndefined));
-};
-
-const eventHandlers = (category, func) => {
- const handler = opts => e => eventHandler(e, func, { ...{ category }, ...opts });
- const handlers = [];
- handlers.push({ name: 'click', func: handler() });
- handlers.push({ name: 'show.bs.dropdown', func: handler({ suffix: '_show' }) });
- handlers.push({ name: 'hide.bs.dropdown', func: handler({ suffix: '_hide' }) });
- return handlers;
+const extractData = (el, opts = {}) => {
+ const { trackEvent, trackLabel = '', trackProperty = '' } = el.dataset;
+ let trackValue = el.dataset.trackValue || el.value || '';
+ if (el.type === 'checkbox' && !el.checked) trackValue = false;
+ return [
+ trackEvent + (opts.suffix || ''),
+ {
+ label: trackLabel,
+ property: trackProperty,
+ value: trackValue,
+ },
+ ];
};
export default class Tracking {
@@ -52,43 +39,49 @@ export default class Tracking {
return typeof window.snowplow === 'function' && this.trackable();
}
- static event(category = document.body.dataset.page, action = 'generic', data = {}) {
+ static event(category = document.body.dataset.page, event = 'generic', data = {}) {
if (!this.enabled()) return false;
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
if (!category) throw new Error('Tracking: no category provided for tracking.');
- const { label, property, value, context } = data;
- const contexts = context ? [context] : undefined;
- return window.snowplow('trackStructEvent', category, action, label, property, value, contexts);
+ return window.snowplow(
+ 'trackStructEvent',
+ category,
+ event,
+ Object.assign({}, { label: '', property: '', value: '' }, data),
+ );
}
- static bindDocument(category = document.body.dataset.page, documentOverride = null) {
- const el = documentOverride || document;
- if (!this.enabled() || el.trackingBound) return [];
+ constructor(category = document.body.dataset.page) {
+ this.category = category;
+ }
+
+ bind(container = document) {
+ if (!this.constructor.enabled()) return;
+ container.querySelectorAll(`[data-track-event]`).forEach(el => {
+ if (this.customHandlingFor(el)) return;
+ // jquery is required for select2, so we use it always
+ // see: https://github.com/select2/select2/issues/4686
+ $(el).on('click', this.eventHandler(this.category));
+ });
+ }
- el.trackingBound = true;
+ customHandlingFor(el) {
+ const classes = el.classList;
- const handlers = eventHandlers(category, (...args) => this.event(...args));
- handlers.forEach(event => el.addEventListener(event.name, event.func));
- return handlers;
+ // bootstrap dropdowns
+ if (classes.contains('dropdown')) {
+ $(el).on('show.bs.dropdown', this.eventHandler(this.category, { suffix: '_show' }));
+ $(el).on('hide.bs.dropdown', this.eventHandler(this.category, { suffix: '_hide' }));
+ return true;
+ }
+
+ return false;
}
- static mixin(opts) {
- return {
- data() {
- return {
- tracking: {
- // eslint-disable-next-line no-underscore-dangle
- category: this.$options.name || this.$options._componentTag,
- },
- };
- },
- methods: {
- track(action, data) {
- const category = opts.category || data.category || this.tracking.category;
- Tracking.event(category || 'unspecified', action, { ...opts, ...this.tracking, ...data });
- },
- },
+ eventHandler(category = null, opts = {}) {
+ return e => {
+ this.constructor.event(category || this.category, ...extractData(e.currentTarget, opts));
};
}
}
@@ -96,7 +89,7 @@ export default class Tracking {
export function initUserTracking() {
if (!Tracking.enabled()) return;
- const opts = { ...DEFAULT_SNOWPLOW_OPTIONS, ...window.snowplowOptions };
+ const opts = Object.assign({}, DEFAULT_SNOWPLOW_OPTIONS, window.snowplowOptions);
window.snowplow('newTracker', opts.namespace, opts.hostname, opts);
window.snowplow('enableActivityTracking', 30, 30);
@@ -104,6 +97,4 @@ export function initUserTracking() {
if (opts.formTracking) window.snowplow('enableFormTracking');
if (opts.linkClickTracking) window.snowplow('enableLinkClickTracking');
-
- Tracking.bindDocument();
}
diff --git a/app/assets/javascripts/vue_shared/components/deprecated_modal_2.vue b/app/assets/javascripts/vue_shared/components/deprecated_modal_2.vue
deleted file mode 100644
index 543547b37fe..00000000000
--- a/app/assets/javascripts/vue_shared/components/deprecated_modal_2.vue
+++ /dev/null
@@ -1,118 +0,0 @@
-<script>
-import $ from 'jquery';
-
-const buttonVariants = ['danger', 'primary', 'success', 'warning'];
-const sizeVariants = ['sm', 'md', 'lg', 'xl'];
-
-export default {
- name: 'DeprecatedModal2', // use GlModal instead
-
- props: {
- id: {
- type: String,
- required: false,
- default: null,
- },
- modalSize: {
- type: String,
- required: false,
- default: 'md',
- validator: value => sizeVariants.includes(value),
- },
- headerTitleText: {
- type: String,
- required: false,
- default: '',
- },
- footerPrimaryButtonVariant: {
- type: String,
- required: false,
- default: 'primary',
- validator: value => buttonVariants.includes(value),
- },
- footerPrimaryButtonText: {
- type: String,
- required: false,
- default: '',
- },
- },
- computed: {
- modalSizeClass() {
- return this.modalSize === 'md' ? '' : `modal-${this.modalSize}`;
- },
- },
- mounted() {
- $(this.$el)
- .on('shown.bs.modal', this.opened)
- .on('hidden.bs.modal', this.closed);
- },
- beforeDestroy() {
- $(this.$el)
- .off('shown.bs.modal', this.opened)
- .off('hidden.bs.modal', this.closed);
- },
- methods: {
- emitCancel(event) {
- this.$emit('cancel', event);
- },
- emitSubmit(event) {
- this.$emit('submit', event);
- },
- opened() {
- this.$emit('open');
- },
- closed() {
- this.$emit('closed');
- },
- },
-};
-</script>
-
-<template>
- <div :id="id" class="modal fade" tabindex="-1" role="dialog">
- <div :class="modalSizeClass" class="modal-dialog" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <slot name="header">
- <h4 class="modal-title">
- <slot name="title"> {{ headerTitleText }} </slot>
- </h4>
- <button
- :aria-label="s__('Modal|Close')"
- type="button"
- class="close js-modal-close-action"
- data-dismiss="modal"
- @click="emitCancel($event)"
- >
- <span aria-hidden="true">&times;</span>
- </button>
- </slot>
- </div>
-
- <div class="modal-body"><slot></slot></div>
-
- <div class="modal-footer">
- <slot name="footer">
- <button
- type="button"
- class="btn js-modal-cancel-action qa-modal-cancel-button"
- data-dismiss="modal"
- @click="emitCancel($event)"
- >
- {{ s__('Modal|Cancel') }}
- </button>
- <button
- :class="`btn-${footerPrimaryButtonVariant}`"
- type="button"
- class="btn js-modal-primary-action qa-modal-primary-button"
- data-dismiss="modal"
- @click="emitSubmit($event)"
- >
- {{ footerPrimaryButtonText }}
- </button>
- </slot>
- </div>
- </div>
- </div>
- </div>
-</template>
diff --git a/app/assets/javascripts/vue_shared/components/gl_modal.vue b/app/assets/javascripts/vue_shared/components/gl_modal.vue
index 4b91d4c00e3..438851e5ac7 100644
--- a/app/assets/javascripts/vue_shared/components/gl_modal.vue
+++ b/app/assets/javascripts/vue_shared/components/gl_modal.vue
@@ -1,6 +1,117 @@
<script>
-// This file was only introduced to not break master and shall be delete soon.
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import $ from 'jquery';
-export default DeprecatedModal2;
+const buttonVariants = ['danger', 'primary', 'success', 'warning'];
+const sizeVariants = ['sm', 'md', 'lg', 'xl'];
+
+export default {
+ name: 'GlModal',
+ props: {
+ id: {
+ type: String,
+ required: false,
+ default: null,
+ },
+ modalSize: {
+ type: String,
+ required: false,
+ default: 'md',
+ validator: value => sizeVariants.includes(value),
+ },
+ headerTitleText: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ footerPrimaryButtonVariant: {
+ type: String,
+ required: false,
+ default: 'primary',
+ validator: value => buttonVariants.includes(value),
+ },
+ footerPrimaryButtonText: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ },
+ computed: {
+ modalSizeClass() {
+ return this.modalSize === 'md' ? '' : `modal-${this.modalSize}`;
+ },
+ },
+ mounted() {
+ $(this.$el)
+ .on('shown.bs.modal', this.opened)
+ .on('hidden.bs.modal', this.closed);
+ },
+ beforeDestroy() {
+ $(this.$el)
+ .off('shown.bs.modal', this.opened)
+ .off('hidden.bs.modal', this.closed);
+ },
+ methods: {
+ emitCancel(event) {
+ this.$emit('cancel', event);
+ },
+ emitSubmit(event) {
+ this.$emit('submit', event);
+ },
+ opened() {
+ this.$emit('open');
+ },
+ closed() {
+ this.$emit('closed');
+ },
+ },
+};
</script>
+
+<template>
+ <div :id="id" class="modal fade" tabindex="-1" role="dialog">
+ <div :class="modalSizeClass" class="modal-dialog" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <slot name="header">
+ <h4 class="modal-title">
+ <slot name="title"> {{ headerTitleText }} </slot>
+ </h4>
+ <button
+ :aria-label="s__('Modal|Close')"
+ type="button"
+ class="close js-modal-close-action"
+ data-dismiss="modal"
+ @click="emitCancel($event)"
+ >
+ <span aria-hidden="true">&times;</span>
+ </button>
+ </slot>
+ </div>
+
+ <div class="modal-body"><slot></slot></div>
+
+ <div class="modal-footer">
+ <slot name="footer">
+ <button
+ type="button"
+ class="btn js-modal-cancel-action qa-modal-cancel-button"
+ data-dismiss="modal"
+ @click="emitCancel($event)"
+ >
+ {{ s__('Modal|Cancel') }}
+ </button>
+ <button
+ :class="`btn-${footerPrimaryButtonVariant}`"
+ type="button"
+ class="btn js-modal-primary-action qa-modal-primary-button"
+ data-dismiss="modal"
+ @click="emitSubmit($event)"
+ >
+ {{ footerPrimaryButtonText }}
+ </button>
+ </slot>
+ </div>
+ </div>
+ </div>
+ </div>
+</template>
diff --git a/app/assets/javascripts/vue_shared/components/pagination/table_pagination.vue b/app/assets/javascripts/vue_shared/components/pagination/table_pagination.vue
index e89638130f5..1e2d4ffa7e3 100644
--- a/app/assets/javascripts/vue_shared/components/pagination/table_pagination.vue
+++ b/app/assets/javascripts/vue_shared/components/pagination/table_pagination.vue
@@ -27,7 +27,8 @@ export default {
/**
pageInfo will come from the headers of the API call
- there should be a function that constructs the pageInfo for this component
+ in the `.then` clause of the VueResource API call
+ there should be a function that contructs the pageInfo for this component
This is an example:
diff --git a/app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue b/app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue
index 478e44d104c..7f0345c7ec0 100644
--- a/app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue
+++ b/app/assets/javascripts/vue_shared/components/project_selector/project_selector.vue
@@ -52,7 +52,7 @@ export default {
this.$emit('projectClicked', project);
},
isSelected(project) {
- return Boolean(_.find(this.selectedProjects, { id: project.id }));
+ return Boolean(_.findWhere(this.selectedProjects, { id: project.id }));
},
onInput: _.debounce(function debouncedOnInput() {
this.$emit('searched', this.searchQuery);
diff --git a/app/assets/javascripts/vue_shared/vue_resource_interceptor.js b/app/assets/javascripts/vue_shared/vue_resource_interceptor.js
new file mode 100644
index 00000000000..754025207c8
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/vue_resource_interceptor.js
@@ -0,0 +1,34 @@
+import Vue from 'vue';
+import VueResource from 'vue-resource';
+import csrf from '../lib/utils/csrf';
+
+Vue.use(VueResource);
+
+// Maintain a global counter for active requests
+// see: spec/support/wait_for_requests.rb
+Vue.http.interceptors.push((request, next) => {
+ window.activeVueResources = window.activeVueResources || 0;
+ window.activeVueResources += 1;
+
+ next(() => {
+ window.activeVueResources -= 1;
+ });
+});
+
+// Inject CSRF token and parse headers.
+// New Vue Resource version uses Headers, we are expecting a plain object to render pagination
+// and polling.
+Vue.http.interceptors.push((request, next) => {
+ request.headers.set(csrf.headerKey, csrf.token);
+
+ next(response => {
+ // Headers object has a `forEach` property that iterates through all values.
+ const headers = {};
+
+ response.headers.forEach((value, key) => {
+ headers[key] = value;
+ });
+ // eslint-disable-next-line no-param-reassign
+ response.headers = headers;
+ });
+});
diff --git a/app/assets/stylesheets/framework.scss b/app/assets/stylesheets/framework.scss
index c4a0ed63080..82b4ec750ff 100644
--- a/app/assets/stylesheets/framework.scss
+++ b/app/assets/stylesheets/framework.scss
@@ -28,7 +28,6 @@
@import 'framework/issue_box';
@import 'framework/lists';
@import 'framework/logo';
-@import 'framework/job_log';
@import 'framework/markdown_area';
@import 'framework/media_object';
@import 'framework/modal';
diff --git a/app/assets/stylesheets/framework/contextual_sidebar.scss b/app/assets/stylesheets/framework/contextual_sidebar.scss
index 05ae9b1d1ed..3238b01c6c0 100644
--- a/app/assets/stylesheets/framework/contextual_sidebar.scss
+++ b/app/assets/stylesheets/framework/contextual_sidebar.scss
@@ -141,7 +141,7 @@
}
.sidebar-top-level-items > li > a {
- min-height: 45px;
+ min-height: 44px;
}
.fly-out-top-item {
diff --git a/app/assets/stylesheets/framework/flash.scss b/app/assets/stylesheets/framework/flash.scss
index 13a2a74fdab..7e7b08797b2 100644
--- a/app/assets/stylesheets/framework/flash.scss
+++ b/app/assets/stylesheets/framework/flash.scss
@@ -12,7 +12,7 @@ $notification-box-shadow-color: rgba(0, 0, 0, 0.25);
position: sticky;
position: -webkit-sticky;
top: $flash-container-top;
- z-index: 251;
+ z-index: 200;
.flash-content {
box-shadow: 0 2px 4px 0 $notification-box-shadow-color;
diff --git a/app/assets/stylesheets/framework/selects.scss b/app/assets/stylesheets/framework/selects.scss
index 2289f0a7011..81ccea1e01f 100644
--- a/app/assets/stylesheets/framework/selects.scss
+++ b/app/assets/stylesheets/framework/selects.scss
@@ -245,7 +245,7 @@
.select2-highlighted {
.group-result {
.group-path {
- color: $gray-800;
+ color: $white-light;
}
}
}
diff --git a/app/assets/stylesheets/framework/sidebar.scss b/app/assets/stylesheets/framework/sidebar.scss
index b9cfcf6ce5c..43d0e51e4c9 100644
--- a/app/assets/stylesheets/framework/sidebar.scss
+++ b/app/assets/stylesheets/framework/sidebar.scss
@@ -171,7 +171,7 @@
position: absolute;
top: $gl-padding;
bottom: $gl-padding;
- left: map-get($spacers, 2) - px-to-rem(1px);
+ left: map-get($spacers, 2) - 1px;
}
&-row {
@@ -187,7 +187,7 @@
* 2px extra is to give a little more height than needed
* to hide timeline line before/after the element starts/ends
*/
- height: map-get($spacers, 4) + px-to-rem(2px);
+ height: map-get($spacers, 4) + 2px;
z-index: 1;
position: relative;
top: -3px;
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss
index 7577112cb0e..801e9e7204c 100644
--- a/app/assets/stylesheets/pages/projects.scss
+++ b/app/assets/stylesheets/pages/projects.scss
@@ -877,16 +877,11 @@ pre.light-well {
flex-direction: column;
// Disable Flexbox for admin page
- &.admin-projects,
- &.group-settings-projects {
+ &.admin-projects {
display: block;
.project-row {
display: block;
-
- .description > p {
- margin-bottom: 0;
- }
}
}
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb
index 80c0a0d88a8..7012bfcefe3 100644
--- a/app/controllers/dashboard/todos_controller.rb
+++ b/app/controllers/dashboard/todos_controller.rb
@@ -78,8 +78,8 @@ class Dashboard::TodosController < Dashboard::ApplicationController
def todos_counts
{
- count: current_user.todos_pending_count,
- done_count: current_user.todos_done_count
+ count: number_with_delimiter(current_user.todos_pending_count),
+ done_count: number_with_delimiter(current_user.todos_done_count)
}
end
diff --git a/app/controllers/import/github_controller.rb b/app/controllers/import/github_controller.rb
index c418b11ab13..72f830fc9a1 100644
--- a/app/controllers/import/github_controller.rb
+++ b/app/controllers/import/github_controller.rb
@@ -2,7 +2,6 @@
class Import::GithubController < Import::BaseController
include ImportHelper
- include ActionView::Helpers::SanitizeHelper
before_action :verify_import_enabled
before_action :provider_auth, only: [:status, :realtime_changes, :create]
@@ -56,7 +55,7 @@ class Import::GithubController < Import::BaseController
def realtime_changes
Gitlab::PollingInterval.set_header(response, interval: 3_000)
- render json: already_added_projects.to_json(only: [:id], methods: [:import_status])
+ render json: find_jobs(provider)
end
private
@@ -83,7 +82,7 @@ class Import::GithubController < Import::BaseController
end
def already_added_projects
- @already_added_projects ||= filtered(find_already_added_projects(provider))
+ @already_added_projects ||= find_already_added_projects(provider)
end
def already_added_project_names
@@ -105,7 +104,7 @@ class Import::GithubController < Import::BaseController
end
def client_repos
- @client_repos ||= filtered(client.repos)
+ @client_repos ||= client.repos
end
def verify_import_enabled
@@ -186,20 +185,6 @@ class Import::GithubController < Import::BaseController
def extra_import_params
{}
end
-
- def sanitized_filter_param
- @filter ||= sanitize(params[:filter])
- end
-
- def filter_attribute
- :name
- end
-
- def filtered(collection)
- return collection unless sanitized_filter_param
-
- collection.select { |item| item[filter_attribute].include?(sanitized_filter_param) }
- end
end
Import::GithubController.prepend_if_ee('EE::Import::GithubController')
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb
index 50399a8cfbb..da8a371acaa 100644
--- a/app/controllers/projects/artifacts_controller.rb
+++ b/app/controllers/projects/artifacts_controller.rb
@@ -8,37 +8,10 @@ class Projects::ArtifactsController < Projects::ApplicationController
layout 'project'
before_action :authorize_read_build!
before_action :authorize_update_build!, only: [:keep]
- before_action :authorize_destroy_artifacts!, only: [:destroy]
before_action :extract_ref_name_and_path
- before_action :validate_artifacts!, except: [:index, :download, :destroy]
+ before_action :validate_artifacts!, except: [:download]
before_action :entry, only: [:file]
- MAX_PER_PAGE = 20
-
- def index
- # Loading artifacts is very expensive in projects with a lot of artifacts.
- # This feature flag prevents a DOS attack vector.
- # It should be removed only after resolving the underlying performance
- # issues: https://gitlab.com/gitlab-org/gitlab/issues/32281
- return head :no_content unless Feature.enabled?(:artifacts_management_page, @project)
-
- finder = ArtifactsFinder.new(@project, artifacts_params)
- all_artifacts = finder.execute
-
- @artifacts = all_artifacts.page(params[:page]).per(MAX_PER_PAGE)
- @total_size = all_artifacts.total_size
- end
-
- def destroy
- notice = if artifact.destroy
- _('Artifact was successfully deleted.')
- else
- _('Artifact could not be deleted.')
- end
-
- redirect_to project_artifacts_path(@project), status: :see_other, notice: notice
- end
-
def download
return render_404 unless artifacts_file
@@ -101,10 +74,6 @@ class Projects::ArtifactsController < Projects::ApplicationController
@ref_name, @path = extract_ref(params[:ref_name_and_path])
end
- def artifacts_params
- params.permit(:sort)
- end
-
def validate_artifacts!
render_404 unless build&.artifacts?
end
@@ -116,11 +85,6 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
end
- def artifact
- @artifact ||=
- project.job_artifacts.find(params[:id])
- end
-
def build_from_id
project.builds.find_by_id(params[:job_id]) if params[:job_id]
end
diff --git a/app/controllers/projects/registry/tags_controller.rb b/app/controllers/projects/registry/tags_controller.rb
index b5ee0ba9beb..54e2faa2dd7 100644
--- a/app/controllers/projects/registry/tags_controller.rb
+++ b/app/controllers/projects/registry/tags_controller.rb
@@ -19,12 +19,14 @@ module Projects
end
def destroy
- result = Projects::ContainerRepository::DeleteTagsService
- .new(image.project, current_user, tags: [params[:id]])
- .execute(image)
-
- respond_to do |format|
- format.json { head(result[:status] == :success ? :ok : bad_request) }
+ if tag.delete
+ respond_to do |format|
+ format.json { head :no_content }
+ end
+ else
+ respond_to do |format|
+ format.json { head :bad_request }
+ end
end
end
@@ -40,12 +42,21 @@ module Projects
return
end
- result = Projects::ContainerRepository::DeleteTagsService
- .new(image.project, current_user, tags: tag_names)
- .execute(image)
+ @tags = tag_names.map { |tag_name| image.tag(tag_name) }
+ unless @tags.all? { |tag| tag.valid_name? }
+ head :bad_request
+ return
+ end
+
+ success_count = 0
+ @tags.each do |tag|
+ if tag.delete
+ success_count += 1
+ end
+ end
respond_to do |format|
- format.json { head(result[:status] == :success ? :no_content : :bad_request) }
+ format.json { head(success_count == @tags.size ? :no_content : :bad_request) }
end
end
@@ -59,6 +70,10 @@ module Projects
@image ||= project.container_repositories
.find(params[:repository_id])
end
+
+ def tag
+ @tag ||= image.tag(params[:id])
+ end
end
end
end
diff --git a/app/controllers/projects/templates_controller.rb b/app/controllers/projects/templates_controller.rb
index 95739f96d39..f987033a26c 100644
--- a/app/controllers/projects/templates_controller.rb
+++ b/app/controllers/projects/templates_controller.rb
@@ -13,14 +13,6 @@ class Projects::TemplatesController < Projects::ApplicationController
end
end
- def names
- templates = @template_type.dropdown_names(project)
-
- respond_to do |format|
- format.json { render json: templates }
- end
- end
-
private
# User must have:
diff --git a/app/finders/artifacts_finder.rb b/app/finders/artifacts_finder.rb
deleted file mode 100644
index 81c5168d782..00000000000
--- a/app/finders/artifacts_finder.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class ArtifactsFinder
- def initialize(project, params = {})
- @project = project
- @params = params
- end
-
- def execute
- artifacts = @project.job_artifacts
-
- sort(artifacts)
- end
-
- private
-
- def sort_key
- @params[:sort] || 'created_desc'
- end
-
- def sort(artifacts)
- artifacts.order_by(sort_key)
- end
-end
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index 24614b5030c..014523b54cb 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -272,7 +272,7 @@ module IssuablesHelper
markdownPreviewPath: preview_markdown_path(parent),
markdownDocsPath: help_page_path('user/markdown'),
lockVersion: issuable.lock_version,
- issuableTemplateNamesPath: template_names_path(parent, issuable),
+ issuableTemplates: issuable_templates(issuable),
initialTitleHtml: markdown_field(issuable, :title),
initialTitleText: issuable.title,
initialDescriptionHtml: markdown_field(issuable, :description),
@@ -429,12 +429,6 @@ module IssuablesHelper
end
end
- def template_names_path(parent, issuable)
- return '' unless parent.is_a?(Project)
-
- project_template_names_path(parent, template_type: issuable.class.name.underscore)
- end
-
def issuable_sidebar_options(issuable)
{
endpoint: "#{issuable[:issuable_json_path]}?serializer=sidebar_extras",
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index c65611b7efc..0f4e5adca6c 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -34,15 +34,15 @@ module SearchHelper
from: from,
to: to,
count: count,
- scope: search_entries_scope_label(scope, count),
+ scope: search_entries_info_label(scope, count),
term: term
}
end
- def search_entries_scope_label(scope, count)
+ def search_entries_info_label(scope, count)
case scope
- when 'blobs'
- ns_('SearchResults|code result', 'SearchResults|code results', count)
+ when 'blobs', 'snippet_blobs', 'wiki_blobs'
+ ns_('SearchResults|result', 'SearchResults|results', count)
when 'commits'
ns_('SearchResults|commit', 'SearchResults|commits', count)
when 'issues'
@@ -55,14 +55,10 @@ module SearchHelper
ns_('SearchResults|comment', 'SearchResults|comments', count)
when 'projects'
ns_('SearchResults|project', 'SearchResults|projects', count)
- when 'snippet_blobs'
- ns_('SearchResults|snippet result', 'SearchResults|snippet results', count)
when 'snippet_titles'
ns_('SearchResults|snippet', 'SearchResults|snippets', count)
when 'users'
ns_('SearchResults|user', 'SearchResults|users', count)
- when 'wiki_blobs'
- ns_('SearchResults|wiki result', 'SearchResults|wiki results', count)
else
raise "Unrecognized search scope '#{scope}'"
end
@@ -76,13 +72,6 @@ module SearchHelper
end
end
- def search_entries_empty_message(scope, term)
- (s_("SearchResults|We couldn't find any %{scope} matching %{term}") % {
- scope: search_entries_scope_label(scope, 0),
- term: "<code>#{term}</code>"
- }).html_safe
- end
-
def find_project_for_result_blob(projects, result)
@project
end
diff --git a/app/helpers/sorting_helper.rb b/app/helpers/sorting_helper.rb
index 33f3bb0b749..d680e10525d 100644
--- a/app/helpers/sorting_helper.rb
+++ b/app/helpers/sorting_helper.rb
@@ -28,9 +28,7 @@ module SortingHelper
sort_value_priority => sort_title_priority,
sort_value_upvotes => sort_title_upvotes,
sort_value_contacted_date => sort_title_contacted_date,
- sort_value_relative_position => sort_title_relative_position,
- sort_value_size => sort_title_size,
- sort_value_expire_date => sort_title_expire_date
+ sort_value_relative_position => sort_title_relative_position
}
end
@@ -408,14 +406,6 @@ module SortingHelper
s_('SortOptions|Manual')
end
- def sort_title_size
- s_('SortOptions|Size')
- end
-
- def sort_title_expire_date
- s_('SortOptions|Expired date')
- end
-
# Values.
def sort_value_access_level_asc
'access_level_asc'
@@ -568,12 +558,4 @@ module SortingHelper
def sort_value_relative_position
'relative_position'
end
-
- def sort_value_size
- 'size_desc'
- end
-
- def sort_value_expire_date
- 'expired_asc'
- end
end
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 3ef0ed0ef49..1f8a0373450 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -118,6 +118,8 @@ module Ci
scope :eager_load_job_artifacts, -> { includes(:job_artifacts) }
+ scope :with_artifacts_stored_locally, -> { with_existing_job_artifacts(Ci::JobArtifact.archive.with_files_stored_locally) }
+ scope :with_archived_trace_stored_locally, -> { with_existing_job_artifacts(Ci::JobArtifact.trace.with_files_stored_locally) }
scope :with_artifacts_not_expired, ->() { with_artifacts_archive.where('artifacts_expire_at IS NULL OR artifacts_expire_at > ?', Time.now) }
scope :with_expired_artifacts, ->() { with_artifacts_archive.where('artifacts_expire_at < ?', Time.now) }
scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) }
diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb
index 62bf2c3ac9c..da2758507ce 100644
--- a/app/models/ci/job_artifact.rb
+++ b/app/models/ci/job_artifact.rb
@@ -5,7 +5,6 @@ module Ci
include AfterCommitQueue
include ObjectStorage::BackgroundMove
include UpdateProjectStatistics
- include Sortable
extend Gitlab::Ci::Model
NotSupportedAdapterError = Class.new(StandardError)
@@ -65,7 +64,6 @@ module Ci
after_save :update_file_store, if: :saved_change_to_file?
scope :with_files_stored_locally, -> { where(file_store: [nil, ::JobArtifactUploader::Store::LOCAL]) }
- scope :with_files_stored_remotely, -> { where(file_store: ::JobArtifactUploader::Store::REMOTE) }
scope :with_file_types, -> (file_types) do
types = self.file_types.select { |file_type| file_types.include?(file_type) }.values
@@ -145,10 +143,6 @@ module Ci
self.update_column(:file_store, file.object_store)
end
- def self.total_size
- self.sum(:size)
- end
-
def self.artifacts_size_for(project)
self.where(project: project).sum(:size)
end
diff --git a/app/models/clusters/cluster.rb b/app/models/clusters/cluster.rb
index 231cadfae05..6a5b98a4676 100644
--- a/app/models/clusters/cluster.rb
+++ b/app/models/clusters/cluster.rb
@@ -39,7 +39,7 @@ module Clusters
def self.has_one_cluster_application(name) # rubocop:disable Naming/PredicateName
application = APPLICATIONS[name.to_s]
- has_one application.association_name, class_name: application.to_s, inverse_of: :cluster # rubocop:disable Rails/ReflectionClassName
+ has_one application.association_name, class_name: application.to_s # rubocop:disable Rails/ReflectionClassName
end
has_one_cluster_application :helm
diff --git a/app/models/lfs_object.rb b/app/models/lfs_object.rb
index f73aa2705b7..60b11ad9356 100644
--- a/app/models/lfs_object.rb
+++ b/app/models/lfs_object.rb
@@ -9,7 +9,6 @@ class LfsObject < ApplicationRecord
has_many :projects, -> { distinct }, through: :lfs_objects_projects
scope :with_files_stored_locally, -> { where(file_store: LfsObjectUploader::Store::LOCAL) }
- scope :with_files_stored_remotely, -> { where(file_store: LfsObjectUploader::Store::REMOTE) }
validates :oid, presence: true, uniqueness: true
diff --git a/app/models/project.rb b/app/models/project.rb
index 18afccf7ddc..7c065db9829 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -273,7 +273,6 @@ class Project < ApplicationRecord
has_many :builds, class_name: 'Ci::Build', inverse_of: :project, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
has_many :build_trace_section_names, class_name: 'Ci::BuildTraceSectionName'
has_many :build_trace_chunks, class_name: 'Ci::BuildTraceChunk', through: :builds, source: :trace_chunks
- has_many :job_artifacts, class_name: 'Ci::JobArtifact'
has_many :runner_projects, class_name: 'Ci::RunnerProject', inverse_of: :project
has_many :runners, through: :runner_projects, source: :runner, class_name: 'Ci::Runner'
has_many :variables, class_name: 'Ci::Variable'
diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb
index 86139c62f68..a76970bfa2a 100644
--- a/app/models/project_services/jira_service.rb
+++ b/app/models/project_services/jira_service.rb
@@ -298,7 +298,7 @@ class JiraService < IssueTrackerService
title: title,
status: status,
icon: {
- title: 'GitLab', url16x16: asset_url(Gitlab::Favicon.main, host: gitlab_config.base_url)
+ title: 'GitLab', url16x16: asset_url(Gitlab::Favicon.main, host: gitlab_config.url)
}
}
}
diff --git a/app/models/release.rb b/app/models/release.rb
index 9117a475ee9..cd63b4d5fef 100644
--- a/app/models/release.rb
+++ b/app/models/release.rb
@@ -22,6 +22,7 @@ class Release < ApplicationRecord
accepts_nested_attributes_for :links, allow_destroy: true
validates :description, :project, :tag, presence: true
+ validates :name, presence: true, on: :create
validates_associated :milestone_releases, message: -> (_, obj) { obj[:value].map(&:errors).map(&:full_messages).join(",") }
scope :sorted, -> { order(released_at: :desc) }
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 96b1b55e2b1..f084a314392 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -133,28 +133,18 @@ class Repository
end
end
- # the opts are:
- # - :path
- # - :limit
- # - :offset
- # - :skip_merges
- # - :after
- # - :before
- # - :all
- # - :first_parent
- def commits(ref = nil, opts = {})
+ def commits(ref = nil, path: nil, limit: nil, offset: nil, skip_merges: false, after: nil, before: nil, all: nil)
options = {
repo: raw_repository,
ref: ref,
- path: opts[:path],
- follow: Array(opts[:path]).length == 1,
- limit: opts[:limit],
- offset: opts[:offset],
- skip_merges: !!opts[:skip_merges],
- after: opts[:after],
- before: opts[:before],
- all: !!opts[:all],
- first_parent: !!opts[:first_parent]
+ path: path,
+ limit: limit,
+ offset: offset,
+ after: after,
+ before: before,
+ follow: Array(path).length == 1,
+ skip_merges: skip_merges,
+ all: all
}
commits = Gitlab::Git::Commit.where(options)
diff --git a/app/presenters/project_presenter.rb b/app/presenters/project_presenter.rb
index 6d370f6241c..6c300cd8be1 100644
--- a/app/presenters/project_presenter.rb
+++ b/app/presenters/project_presenter.rb
@@ -51,8 +51,7 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
new_file_anchor_data,
readme_anchor_data,
changelog_anchor_data,
- contribution_guide_anchor_data,
- gitlab_ci_anchor_data
+ contribution_guide_anchor_data
].compact.reject { |item| item.is_link }
end
diff --git a/app/services/import_export_clean_up_service.rb b/app/services/import_export_clean_up_service.rb
index 66ac7dac4ca..3ecb51b60d0 100644
--- a/app/services/import_export_clean_up_service.rb
+++ b/app/services/import_export_clean_up_service.rb
@@ -12,20 +12,16 @@ class ImportExportCleanUpService
def execute
Gitlab::Metrics.measure(:import_export_clean_up) do
- execute_cleanup
+ clean_up_export_object_files
+
+ break unless File.directory?(path)
+
+ clean_up_export_files
end
end
private
- def execute_cleanup
- clean_up_export_object_files
- ensure
- # We don't want a failure in cleaning up object storage from
- # blocking us from cleaning up temporary storage.
- clean_up_export_files if File.directory?(path)
- end
-
def clean_up_export_files
Gitlab::Popen.popen(%W(find #{path} -not -path #{path} -mmin +#{mmin} -delete))
end
diff --git a/app/services/projects/container_repository/cleanup_tags_service.rb b/app/services/projects/container_repository/cleanup_tags_service.rb
index 1b880a7aab1..d1d9b9f22e8 100644
--- a/app/services/projects/container_repository/cleanup_tags_service.rb
+++ b/app/services/projects/container_repository/cleanup_tags_service.rb
@@ -40,7 +40,7 @@ module Projects
return unless tags.count == other_tags.count
# delete all tags
- tags.map(&:unsafe_delete)
+ tags.map(&:delete)
end
def group_by_digest(tags)
diff --git a/app/services/projects/container_repository/delete_tags_service.rb b/app/services/projects/container_repository/delete_tags_service.rb
deleted file mode 100644
index 21dc1621e5c..00000000000
--- a/app/services/projects/container_repository/delete_tags_service.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-# frozen_string_literal: true
-
-module Projects
- module ContainerRepository
- class DeleteTagsService < BaseService
- def execute(container_repository)
- return error('access denied') unless can?(current_user, :destroy_container_image, project)
-
- tag_names = params[:tags]
- return error('not tags specified') if tag_names.blank?
-
- if can_use?
- smart_delete(container_repository, tag_names)
- else
- unsafe_delete(container_repository, tag_names)
- end
- end
-
- private
-
- def unsafe_delete(container_repository, tag_names)
- deleted_tags = tag_names.select do |tag_name|
- container_repository.tag(tag_name).unsafe_delete
- end
-
- return error('could not delete tags') if deleted_tags.empty?
-
- success(deleted: deleted_tags)
- end
-
- # Replace a tag on the registry with a dummy tag.
- # This is a hack as the registry doesn't support deleting individual
- # tags. This code effectively pushes a dummy image and assigns the tag to it.
- # This way when the tag is deleted only the dummy image is affected.
- # See https://gitlab.com/gitlab-org/gitlab-ce/issues/21405 for a discussion
- def smart_delete(container_repository, tag_names)
- # generates the blobs for the dummy image
- dummy_manifest = container_repository.client.generate_empty_manifest(container_repository.path)
-
- # update the manifests of the tags with the new dummy image
- tag_digests = tag_names.map do |name|
- container_repository.client.put_tag(container_repository.path, name, dummy_manifest)
- end
-
- # make sure the digests are the same (it should always be)
- tag_digests.uniq!
-
- # rubocop: disable CodeReuse/ActiveRecord
- Gitlab::Sentry.track_exception(ArgumentError.new('multiple tag digests')) if tag_digests.many?
-
- # deletes the dummy image
- # all created tag digests are the same since they all have the same dummy image.
- # a single delete is sufficient to remove all tags with it
- if container_repository.client.delete_repository_tag(container_repository.path, tag_digests.first)
- success(deleted: tag_names)
- else
- error('could not delete tags')
- end
- end
-
- def can_use?
- Feature.enabled?(:container_registry_smart_delete, project, default_enabled: true)
- end
- end
- end
-end
diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml
index 08e668e8623..bb0d62a70c0 100644
--- a/app/views/admin/projects/index.html.haml
+++ b/app/views/admin/projects/index.html.haml
@@ -1,20 +1,8 @@
-- page_title _('Projects')
+- page_title "Projects"
- params[:visibility_level] ||= []
.top-area.scrolling-tabs-container.inner-page-scroll-tabs
- %ul.nav-links.nav.nav-tabs
- - opts = params[:visibility_level].present? ? {} : { page: admin_projects_path }
- = nav_link(opts) do
- = link_to _('All'), admin_projects_path
-
- = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::PRIVATE.to_s) }) do
- = link_to _('Private'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
- = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::INTERNAL.to_s) }) do
- = link_to _('Internal'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::INTERNAL)
- = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::PUBLIC.to_s) }) do
- = link_to _('Public'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
-
- .nav-controls
+ .prepend-top-default
.search-holder
= render 'shared/projects/search_form', autofocus: true, admin_view: true
.dropdown
@@ -34,4 +22,20 @@
New Project
= button_tag "Search", class: "btn btn-primary btn-search hide"
+ %ul.nav-links.nav.nav-tabs
+ - opts = params[:visibility_level].present? ? {} : { page: admin_projects_path }
+ = nav_link(opts) do
+ = link_to admin_projects_path do
+ All
+
+ = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::PRIVATE.to_s) }) do
+ = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PRIVATE) do
+ Private
+ = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::INTERNAL.to_s) }) do
+ = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::INTERNAL) do
+ Internal
+ = nav_link(html_options: { class: active_when(params[:visibility_level] == Gitlab::VisibilityLevel::PUBLIC.to_s) }) do
+ = link_to admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PUBLIC) do
+ Public
+
= render 'projects'
diff --git a/app/views/ci/runner/_how_to_setup_runner_automatically.html.haml b/app/views/ci/runner/_how_to_setup_runner_automatically.html.haml
deleted file mode 100644
index 58d2ef5d5e6..00000000000
--- a/app/views/ci/runner/_how_to_setup_runner_automatically.html.haml
+++ /dev/null
@@ -1,22 +0,0 @@
-.append-bottom-10
- %h4= _('Set up a %{type} Runner automatically') % { type: type }
-
-%p
- - link_to_help_page = link_to(_('Learn more about Kubernetes'),
- help_page_path('user/project/clusters/index'),
- target: '_blank',
- rel: 'noopener noreferrer')
-
- = _('You can easily install a Runner on a Kubernetes cluster. %{link_to_help_page}').html_safe % { link_to_help_page: link_to_help_page }
-
-%ol
- %li
- = _('Click the button below to begin the install process by navigating to the Kubernetes page')
- %li
- = _('Select an existing Kubernetes cluster or create a new one')
- %li
- = _('From the Kubernetes cluster details view, install Runner from the applications list')
-
-= link_to _('Install Runner on Kubernetes'),
- clusters_path,
- class: 'btn btn-info'
diff --git a/app/views/clusters/clusters/show.html.haml b/app/views/clusters/clusters/show.html.haml
index cccba48624b..00fdd5e9562 100644
--- a/app/views/clusters/clusters/show.html.haml
+++ b/app/views/clusters/clusters/show.html.haml
@@ -3,7 +3,6 @@
- breadcrumb_title @cluster.name
- page_title _('Kubernetes Cluster')
- manage_prometheus_path = edit_project_service_path(@cluster.project, 'prometheus') if @project
-- cluster_environments_path = clusterable.environments_cluster_path(@cluster)
- expanded = expanded_by_default?
@@ -17,7 +16,7 @@
install_jupyter_path: clusterable.install_applications_cluster_path(@cluster, :jupyter),
install_knative_path: clusterable.install_applications_cluster_path(@cluster, :knative),
update_knative_path: clusterable.update_applications_cluster_path(@cluster, :knative),
- cluster_environments_path: cluster_environments_path,
+ cluster_environments_path: clusterable.environments_cluster_path(@cluster),
toggle_status: @cluster.enabled? ? 'true': 'false',
has_rbac: has_rbac_enabled?(@cluster) ? 'true': 'false',
cluster_type: @cluster.cluster_type,
@@ -38,7 +37,7 @@
%h4= @cluster.name
= render 'banner'
- - if cluster_environments_path.present?
- = render_if_exists 'clusters/clusters/group_cluster_environments', expanded: expanded
- - else
+ = render_if_exists 'clusters/clusters/group_cluster_environments', expanded: expanded
+
+ - unless Gitlab.ee?
= render 'configure', expanded: expanded
diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml
index 8b01e54474a..ba186875a86 100644
--- a/app/views/groups/projects.html.haml
+++ b/app/views/groups/projects.html.haml
@@ -8,38 +8,21 @@
.controls
= link_to new_project_path(namespace_id: @group.id), class: "btn btn-sm btn-success" do
New project
- %ul.projects-list.content-list.group-settings-projects
+ %ul.content-list
- @projects.each do |project|
- %li.project-row{ class: ('no-description' if project.description.blank?) }
- .controls
- = link_to _('Members'), project_project_members_path(project), id: "edit_#{dom_id(project)}", class: "btn"
- = link_to _('Edit'), edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn"
- = link_to _('Remove'), project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-remove"
-
- .stats
- %span.badge.badge-pill
- = storage_counter(project.statistics&.storage_size)
+ %li
+ .list-item-name
+ %span{ class: visibility_level_color(project.visibility_level) }
+ = visibility_level_icon(project.visibility_level)
+ %strong= link_to project.full_name, project
+ .float-right
- if project.archived
%span.badge.badge-warning archived
-
- .title
- = link_to(project_path(project)) do
- .dash-project-avatar
- .avatar-container.rect-avatar.s40
- = project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40)
- %span.project-full-name
- %span.namespace-name
- - if project.namespace
- = project.namespace.human_name
- \/
- %span.project-name
- = project.name
- %span{ class: visibility_level_color(project.visibility_level) }
- = visibility_level_icon(project.visibility_level)
-
- - if project.description.present?
- .description
- = markdown_field(project, :description)
+ %span.badge.badge-pill
+ = storage_counter(project.statistics.storage_size)
+ = link_to 'Members', project_project_members_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-sm"
+ = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-sm"
+ = link_to 'Remove', project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-sm btn-remove"
- if @projects.blank?
.nothing-here-block This group has no projects yet
diff --git a/app/views/groups/runners/_group_runners.html.haml b/app/views/groups/runners/_group_runners.html.haml
index f752bc0a702..fd40ec5a984 100644
--- a/app/views/groups/runners/_group_runners.html.haml
+++ b/app/views/groups/runners/_group_runners.html.haml
@@ -10,10 +10,6 @@
-# Proper policies should be implemented per
-# https://gitlab.com/gitlab-org/gitlab-foss/issues/45894
- if can?(current_user, :admin_pipeline, @group)
- = render partial: 'ci/runner/how_to_setup_runner_automatically',
- locals: { type: 'group',
- clusters_path: group_clusters_path(@group) }
- %hr
= render partial: 'ci/runner/how_to_setup_runner',
locals: { registration_token: @group.runners_token,
type: 'group',
diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml
index 6cdb85456c3..443a73f5cce 100644
--- a/app/views/layouts/_page.html.haml
+++ b/app/views/layouts/_page.html.haml
@@ -17,6 +17,4 @@
%div{ class: "#{(container_class unless @no_container)} #{@content_class}" }
.content{ id: "content-body" }
= render "layouts/flash", extra_flash_class: 'limit-container-width'
- - if Gitlab.com?
- = render_if_exists "layouts/privacy_policy_update_callout"
= yield
diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml
index 367b8c1138e..de0c21e7cf6 100644
--- a/app/views/projects/issues/_issue.html.haml
+++ b/app/views/projects/issues/_issue.html.haml
@@ -43,10 +43,7 @@
.issuable-meta
%ul.controls
- - if issue.moved?
- %li.issuable-status
- = _('CLOSED (MOVED)')
- - elsif issue.closed?
+ - if issue.closed?
%li.issuable-status
= _('CLOSED')
- if issue.assignees.any?
diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml
index 80d2d2afada..104c68919f0 100644
--- a/app/views/projects/mirrors/_mirror_repos.html.haml
+++ b/app/views/projects/mirrors/_mirror_repos.html.haml
@@ -1,7 +1,7 @@
- expanded = expanded_by_default?
- protocols = Gitlab::UrlSanitizer::ALLOWED_SCHEMES.join('|')
-%section.settings.project-mirror-settings.js-mirror-settings.no-animate#js-push-remote-settings{ class: ('expanded' if expanded), data: { qa_selector: 'mirroring_repositories_settings_section' } }
+%section.settings.project-mirror-settings.js-mirror-settings.no-animate.qa-mirroring-repositories-settings#js-push-remote-settings{ class: ('expanded' if expanded) }
.settings-header
%h4= _('Mirroring repositories')
%button.btn.js-settings-toggle
@@ -59,10 +59,10 @@
- if mirror.disabled?
= render 'projects/mirrors/disabled_mirror_badge'
- if mirror.last_error.present?
- .badge.mirror-error-badge{ data: { toggle: 'tooltip', html: 'true', qa_selector: 'mirror_error_badge' }, title: html_escape(mirror.last_error.try(:strip)) }= _('Error')
+ .badge.mirror-error-badge{ data: { toggle: 'tooltip', html: 'true' }, title: html_escape(mirror.last_error.try(:strip)) }= _('Error')
%td
.btn-group.mirror-actions-group.pull-right{ role: 'group' }
- if mirror.ssh_key_auth?
- = clipboard_button(text: mirror.ssh_public_key, class: 'btn btn-default', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button')
+ = clipboard_button(text: mirror.ssh_public_key, class: 'btn btn-default', title: _('Copy SSH public key'))
= render 'shared/remote_mirror_update_button', remote_mirror: mirror
%button.js-delete-mirror.qa-delete-mirror.rspec-delete-mirror.btn.btn-danger{ type: 'button', data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' }, title: _('Remove') }= icon('trash-o')
diff --git a/app/views/projects/mirrors/_ssh_host_keys.html.haml b/app/views/projects/mirrors/_ssh_host_keys.html.haml
index 3279d3eb251..7762fb4b844 100644
--- a/app/views/projects/mirrors/_ssh_host_keys.html.haml
+++ b/app/views/projects/mirrors/_ssh_host_keys.html.haml
@@ -3,13 +3,13 @@
- verified_at = mirror.ssh_known_hosts_verified_at
.form-group.js-ssh-host-keys-section{ class: ('collapse' unless mirror.ssh_mirror_url?) }
- %button.btn.btn-inverted.btn-secondary.inline.js-detect-host-keys.append-right-10{ type: 'button', data: { qa_selector: 'detect_host_keys' } }
+ %button.btn.btn-inverted.btn-secondary.inline.js-detect-host-keys.append-right-10{ type: 'button' }
= icon('spinner spin', class: 'js-spinner d-none')
= _('Detect host keys')
.fingerprint-ssh-info.js-fingerprint-ssh-info.prepend-top-10.append-bottom-10{ class: ('collapse' unless mirror.ssh_mirror_url?) }
%label.label-bold
= _('Fingerprints')
- .fingerprints-list.js-fingerprints-list{ data: { qa_selector: 'fingerprints_list' } }
+ .fingerprints-list.js-fingerprints-list
- mirror.ssh_known_hosts_fingerprints.each do |fp|
%code= fp.fingerprint
- if verified_at
diff --git a/app/views/projects/runners/_specific_runners.html.haml b/app/views/projects/runners/_specific_runners.html.haml
index 4cc67a8f5d8..dc56a515d4c 100644
--- a/app/views/projects/runners/_specific_runners.html.haml
+++ b/app/views/projects/runners/_specific_runners.html.haml
@@ -2,9 +2,28 @@
= _('Specific Runners')
.bs-callout.help-callout
- = render partial: 'ci/runner/how_to_setup_runner_automatically',
- locals: { type: 'specific',
- clusters_path: project_clusters_path(@project) }
+ .append-bottom-10
+ %h4= _('Set up a specific Runner automatically')
+
+ %p
+ - link_to_help_page = link_to(_('Learn more about Kubernetes'),
+ help_page_path('user/project/clusters/index'),
+ target: '_blank',
+ rel: 'noopener noreferrer')
+
+ = _('You can easily install a Runner on a Kubernetes cluster. %{link_to_help_page}').html_safe % { link_to_help_page: link_to_help_page }
+
+ %ol
+ %li
+ = _('Click the button below to begin the install process by navigating to the Kubernetes page')
+ %li
+ = _('Select an existing Kubernetes cluster or create a new one')
+ %li
+ = _('From the Kubernetes cluster details view, install Runner from the applications list')
+
+ = link_to _('Install Runner on Kubernetes'),
+ project_clusters_path(@project),
+ class: 'btn btn-info'
%hr
= render partial: 'ci/runner/how_to_setup_runner',
locals: { registration_token: @project.runners_token,
diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml
index 6702786fdb3..1d5d90593ae 100644
--- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml
+++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml
@@ -46,12 +46,12 @@
= form.radio_button :deploy_strategy, 'timed_incremental', class: 'form-check-input'
= form.label :deploy_strategy_timed_incremental, class: 'form-check-label' do
= s_('CICD|Continuous deployment to production using timed incremental rollout')
- = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md', anchor: 'timed-incremental-rollout-to-production-premium'), target: '_blank'
+ = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md', anchor: 'timed-incremental-rollout-to-production'), target: '_blank'
.form-check
= form.radio_button :deploy_strategy, 'manual', class: 'form-check-input'
= form.label :deploy_strategy_manual, class: 'form-check-label' do
= s_('CICD|Automatic deployment to staging, manual deployment to production')
- = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md', anchor: 'incremental-rollout-to-production-premium'), target: '_blank'
+ = link_to icon('question-circle'), help_page_path('topics/autodevops/index.md', anchor: 'incremental-rollout-to-production'), target: '_blank'
= f.submit _('Save changes'), class: "btn btn-success prepend-top-15", data: { qa_selector: 'save_changes_button' }
diff --git a/app/views/search/results/_empty.html.haml b/app/views/search/results/_empty.html.haml
index 6c7c6de1178..9d15995bb51 100644
--- a/app/views/search/results/_empty.html.haml
+++ b/app/views/search/results/_empty.html.haml
@@ -2,4 +2,5 @@
.search_glyph
%h4
= icon('search')
- = search_entries_empty_message(@scope, @search_term)
+ = _("We couldn't find any results matching")
+ %code= @search_term
diff --git a/app/views/shared/_remote_mirror_update_button.html.haml b/app/views/shared/_remote_mirror_update_button.html.haml
index 54bd4ba04a0..4b39c8b06e9 100644
--- a/app/views/shared/_remote_mirror_update_button.html.haml
+++ b/app/views/shared/_remote_mirror_update_button.html.haml
@@ -1,5 +1,5 @@
- if remote_mirror.update_in_progress?
- %button.btn.disabled{ type: 'button', data: { toggle: 'tooltip', container: 'body', qa_selector: 'updating_button' }, title: _('Updating') }
+ %button.btn.disabled{ type: 'button', data: { toggle: 'tooltip', container: 'body' }, title: _('Updating') }
= icon("refresh spin")
- elsif remote_mirror.enabled?
= link_to update_now_project_mirror_path(@project, sync_remote: true), method: :post, class: "btn qa-update-now-button rspec-update-now-button", data: { toggle: 'tooltip', container: 'body' }, title: _('Update now') do
diff --git a/changelogs/unreleased/21405-fix-registry-tag-delete.yml b/changelogs/unreleased/21405-fix-registry-tag-delete.yml
deleted file mode 100644
index 48890ec62fc..00000000000
--- a/changelogs/unreleased/21405-fix-registry-tag-delete.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: 'Adds the ability to delete single tags from the docker registry. Fix the issue that caused all related tags and image to be deleted at the same time.'
-merge_request: 16886
-author:
-type: fixed
diff --git a/changelogs/unreleased/24818-fix-jira-favicon-link.yml b/changelogs/unreleased/24818-fix-jira-favicon-link.yml
deleted file mode 100644
index c6857d1f83c..00000000000
--- a/changelogs/unreleased/24818-fix-jira-favicon-link.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Fix Jira integration favicon image with relative URL
-merge_request: 16802
-author:
-type: fixed
diff --git a/changelogs/unreleased/28311-extremely-low-contrast-in-dropdown-for-group-file-templates.yml b/changelogs/unreleased/28311-extremely-low-contrast-in-dropdown-for-group-file-templates.yml
deleted file mode 100644
index 9f690e02a47..00000000000
--- a/changelogs/unreleased/28311-extremely-low-contrast-in-dropdown-for-group-file-templates.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Increase color contrast of select option path
-merge_request:
-author:
-type: other
diff --git a/changelogs/unreleased/31837-sidebar-icons-jump.yml b/changelogs/unreleased/31837-sidebar-icons-jump.yml
deleted file mode 100644
index 2cf359d5398..00000000000
--- a/changelogs/unreleased/31837-sidebar-icons-jump.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Stop sidebar icons from jumping when expanded & collapsed
-merge_request: 16971
-author:
-type: fixed
diff --git a/changelogs/unreleased/59036-object-to-local-storage.yml b/changelogs/unreleased/59036-object-to-local-storage.yml
deleted file mode 100644
index 213361b7b7e..00000000000
--- a/changelogs/unreleased/59036-object-to-local-storage.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: "[ObjectStorage] Allow migrating back to local storage"
-merge_request: 16868
-author:
-type: added
diff --git a/changelogs/unreleased/63768-group-settings-kubernetes-runner-section.yml b/changelogs/unreleased/63768-group-settings-kubernetes-runner-section.yml
deleted file mode 100644
index ed374922632..00000000000
--- a/changelogs/unreleased/63768-group-settings-kubernetes-runner-section.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Add kubernetes section to group runner settings
-merge_request: 16338
-author:
-type: added
diff --git a/changelogs/unreleased/66123-over-a-thousand-todos-displays-count-of-one.yml b/changelogs/unreleased/66123-over-a-thousand-todos-displays-count-of-one.yml
deleted file mode 100644
index 3feb8539378..00000000000
--- a/changelogs/unreleased/66123-over-a-thousand-todos-displays-count-of-one.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: Fix for count in todo badge when user has over 1,000 todos. Will now correctly
- display todo count after user marks some todos as done.
-merge_request: 16844
-author: Jesse Hall @jessehall3
-type: fixed
diff --git a/changelogs/unreleased/66330-confidential-quick-action-is-available-for-confidential-issues.yml b/changelogs/unreleased/66330-confidential-quick-action-is-available-for-confidential-issues.yml
deleted file mode 100644
index 4ed18adb7e2..00000000000
--- a/changelogs/unreleased/66330-confidential-quick-action-is-available-for-confidential-issues.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Changed confidential quick action to only be available on non confidential issues
-merge_request: 16902
-author: Marc Schwede
-type: fixed
diff --git a/changelogs/unreleased/add-first-parent-to-find-commits.yml b/changelogs/unreleased/add-first-parent-to-find-commits.yml
deleted file mode 100644
index 076eed90f68..00000000000
--- a/changelogs/unreleased/add-first-parent-to-find-commits.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Add first_parent option to list commits api
-merge_request: 32410
-author: jhenkens
-type: added
diff --git a/changelogs/unreleased/dz-fix-group-settings-projects-page.yml b/changelogs/unreleased/dz-fix-group-settings-projects-page.yml
deleted file mode 100644
index 9d5b93f9a50..00000000000
--- a/changelogs/unreleased/dz-fix-group-settings-projects-page.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Improve UI for admin/projects and group/settings/projects pages
-merge_request: 17247
-author:
-type: changed
diff --git a/changelogs/unreleased/expose-name-property-in-import-api.yml b/changelogs/unreleased/expose-name-property-in-import-api.yml
deleted file mode 100644
index 9a0fb581321..00000000000
--- a/changelogs/unreleased/expose-name-property-in-import-api.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Expose name property in imports API
-merge_request: 16848
-author:
-type: added
diff --git a/changelogs/unreleased/georgekoltsov-add-github-importer-filtering.yml b/changelogs/unreleased/georgekoltsov-add-github-importer-filtering.yml
deleted file mode 100644
index 9c7a8caea66..00000000000
--- a/changelogs/unreleased/georgekoltsov-add-github-importer-filtering.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Add GitHub & Gitea importers project filtering
-merge_request: 16823
-author:
-type: added
diff --git a/changelogs/unreleased/gitaly-1-64.yml b/changelogs/unreleased/gitaly-1-64.yml
deleted file mode 100644
index 53ae64c9830..00000000000
--- a/changelogs/unreleased/gitaly-1-64.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Upgrade Gitaly to v1.64
-merge_request: 16788
-author:
-type: added
diff --git a/changelogs/unreleased/github-release-importer-fixup.yml b/changelogs/unreleased/github-release-importer-fixup.yml
deleted file mode 100644
index 3c688426ad2..00000000000
--- a/changelogs/unreleased/github-release-importer-fixup.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Set name and updated_at properly in GitHub ReleaseImporter
-merge_request: 17020
-author:
-type: fixed
diff --git a/changelogs/unreleased/improve-search-empty-message.yml b/changelogs/unreleased/improve-search-empty-message.yml
deleted file mode 100644
index cc9692c4fd6..00000000000
--- a/changelogs/unreleased/improve-search-empty-message.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Use search scope label in empty results message
-merge_request: 16324
-author:
-type: changed
diff --git a/changelogs/unreleased/issue_26823_sync_state_id.yml b/changelogs/unreleased/issue_26823_sync_state_id.yml
deleted file mode 100644
index fd3993d3b65..00000000000
--- a/changelogs/unreleased/issue_26823_sync_state_id.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Sync issuables state_id with null values
-merge_request: 16480
-author:
-type: other
diff --git a/changelogs/unreleased/mc-feature-show-setup-cicd-empty-repo.yml b/changelogs/unreleased/mc-feature-show-setup-cicd-empty-repo.yml
deleted file mode 100644
index 3165159fdab..00000000000
--- a/changelogs/unreleased/mc-feature-show-setup-cicd-empty-repo.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Show the "Set up CI/CD" prompt in empty repositories when applicable.
-merge_request: 17274
-author: Ben McCormick
-type: changed
diff --git a/changelogs/unreleased/sh-bump-rouge-3-11-0.yml b/changelogs/unreleased/sh-bump-rouge-3-11-0.yml
deleted file mode 100644
index 6ef44fcbafc..00000000000
--- a/changelogs/unreleased/sh-bump-rouge-3-11-0.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Upgrade Rouge to v3.11.0
-merge_request: 17011
-author:
-type: other
diff --git a/changelogs/unreleased/winh-issue-list-moved.yml b/changelogs/unreleased/winh-issue-list-moved.yml
deleted file mode 100644
index c8113e39b97..00000000000
--- a/changelogs/unreleased/winh-issue-list-moved.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Display if an issue was moved in issue list
-merge_request: 17102
-author:
-type: changed
diff --git a/changelogs/unreleased/zj-timeouts-gitaly-rpcs.yml b/changelogs/unreleased/zj-timeouts-gitaly-rpcs.yml
deleted file mode 100644
index f028df84b6e..00000000000
--- a/changelogs/unreleased/zj-timeouts-gitaly-rpcs.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Add timeouts for each RPC call
-merge_request: 31766
-author:
-type: changed
diff --git a/config/application.rb b/config/application.rb
index 5d7c52c5d81..c1e3b6f7a20 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -13,7 +13,6 @@ Bundler.require(*Rails.groups)
module Gitlab
class Application < Rails::Application
require_dependency Rails.root.join('lib/gitlab')
- require_dependency Rails.root.join('lib/gitlab/utils')
require_dependency Rails.root.join('lib/gitlab/redis/wrapper')
require_dependency Rails.root.join('lib/gitlab/redis/cache')
require_dependency Rails.root.join('lib/gitlab/redis/queues')
@@ -47,20 +46,18 @@ module Gitlab
config.generators.templates.push("#{config.root}/generator_templates")
- if Gitlab.ee?
- ee_paths = config.eager_load_paths.each_with_object([]) do |path, memo|
- ee_path = config.root.join('ee', Pathname.new(path).relative_path_from(config.root))
- memo << ee_path.to_s
- end
+ ee_paths = config.eager_load_paths.each_with_object([]) do |path, memo|
+ ee_path = config.root.join('ee', Pathname.new(path).relative_path_from(config.root))
+ memo << ee_path.to_s if ee_path.exist?
+ end
- # Eager load should load CE first
- config.eager_load_paths.push(*ee_paths)
- config.helpers_paths.push "#{config.root}/ee/app/helpers"
+ # Eager load should load CE first
+ config.eager_load_paths.push(*ee_paths)
+ config.helpers_paths.push "#{config.root}/ee/app/helpers"
- # Other than Ruby modules we load EE first
- config.paths['lib/tasks'].unshift "#{config.root}/ee/lib/tasks"
- config.paths['app/views'].unshift "#{config.root}/ee/app/views"
- end
+ # Other than Ruby modules we load EE first
+ config.paths['lib/tasks'].unshift "#{config.root}/ee/lib/tasks"
+ config.paths['app/views'].unshift "#{config.root}/ee/app/views"
# Rake tasks ignore the eager loading settings, so we need to set the
# autoload paths explicitly
@@ -181,18 +178,16 @@ module Gitlab
config.assets.paths << "#{config.root}/node_modules/xterm/src/"
config.assets.precompile << "xterm.css"
- if Gitlab.ee?
- %w[images javascripts stylesheets].each do |path|
- config.assets.paths << "#{config.root}/ee/app/assets/#{path}"
- config.assets.precompile << "jira_connect.js"
- config.assets.precompile << "pages/jira_connect.css"
- end
+ %w[images javascripts stylesheets].each do |path|
+ config.assets.paths << "#{config.root}/ee/app/assets/#{path}"
+ config.assets.precompile << "jira_connect.js"
+ config.assets.precompile << "pages/jira_connect.css"
end
# Import path for EE specific SCSS entry point
# In CE it will import a noop file, in EE a functioning file
# Order is important, so that the ee file takes precedence:
- config.assets.paths << "#{config.root}/ee/app/assets/stylesheets/_ee" if Gitlab.ee?
+ config.assets.paths << "#{config.root}/ee/app/assets/stylesheets/_ee"
config.assets.paths << "#{config.root}/app/assets/stylesheets/_ee"
config.assets.paths << "#{config.root}/vendor/assets/javascripts/"
@@ -202,15 +197,13 @@ module Gitlab
# See https://gitlab.com/gitlab-org/gitlab-foss/issues/64091#note_194512508
config.assets.paths << "#{config.root}/node_modules"
- if Gitlab.ee?
- # Compile non-JS/CSS assets in the ee/app/assets folder by default
- # Mimic sprockets-rails default: https://github.com/rails/sprockets-rails/blob/v3.2.1/lib/sprockets/railtie.rb#L84-L87
- LOOSE_EE_APP_ASSETS = lambda do |logical_path, filename|
- filename.start_with?(config.root.join("ee/app/assets").to_s) &&
- !['.js', '.css', ''].include?(File.extname(logical_path))
- end
- config.assets.precompile << LOOSE_EE_APP_ASSETS
+ # Compile non-JS/CSS assets in the ee/app/assets folder by default
+ # Mimic sprockets-rails default: https://github.com/rails/sprockets-rails/blob/v3.2.1/lib/sprockets/railtie.rb#L84-L87
+ LOOSE_EE_APP_ASSETS = lambda do |logical_path, filename|
+ filename.start_with?(config.root.join("ee/app/assets").to_s) &&
+ !['.js', '.css', ''].include?(File.extname(logical_path))
end
+ config.assets.precompile << LOOSE_EE_APP_ASSETS
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb
index e3505579204..20f31ff6810 100644
--- a/config/initializers/sidekiq.rb
+++ b/config/initializers/sidekiq.rb
@@ -28,18 +28,16 @@ if Rails.env.development?
end
enable_json_logs = Gitlab.config.sidekiq.log_format == 'json'
-enable_sidekiq_memory_killer = ENV['SIDEKIQ_MEMORY_KILLER_MAX_RSS'].to_i.nonzero?
-use_sidekiq_daemon_memory_killer = ENV["SIDEKIQ_DAEMON_MEMORY_KILLER"].to_i.nonzero?
-use_sidekiq_legacy_memory_killer = !use_sidekiq_daemon_memory_killer
+enable_sidekiq_monitor = ENV.fetch("SIDEKIQ_MONITOR_WORKER", 0).to_i.nonzero?
Sidekiq.configure_server do |config|
config.redis = queues_config_hash
config.server_middleware do |chain|
- chain.add Gitlab::SidekiqMiddleware::Monitor
+ chain.add Gitlab::SidekiqMiddleware::Monitor if enable_sidekiq_monitor
chain.add Gitlab::SidekiqMiddleware::Metrics if Settings.monitoring.sidekiq_exporter
chain.add Gitlab::SidekiqMiddleware::ArgumentsLogger if ENV['SIDEKIQ_LOG_ARGUMENTS'] && !enable_json_logs
- chain.add Gitlab::SidekiqMiddleware::MemoryKiller if enable_sidekiq_memory_killer && use_sidekiq_legacy_memory_killer
+ chain.add Gitlab::SidekiqMiddleware::MemoryKiller if ENV['SIDEKIQ_MEMORY_KILLER_MAX_RSS']
chain.add Gitlab::SidekiqMiddleware::RequestStoreMiddleware unless ENV['SIDEKIQ_REQUEST_STORE'] == '0'
chain.add Gitlab::SidekiqMiddleware::BatchLoader
chain.add Gitlab::SidekiqMiddleware::CorrelationLogger
@@ -62,11 +60,7 @@ Sidekiq.configure_server do |config|
# Sidekiq (e.g. in an initializer).
ActiveRecord::Base.clear_all_connections!
- # Start monitor to track running jobs. By default, cancel job is not enabled
- # To cancel job, it requires `SIDEKIQ_MONITOR_WORKER=1` to enable notification channel
- Gitlab::SidekiqDaemon::Monitor.instance.start
-
- Gitlab::SidekiqDaemon::MemoryKiller.instance.start if enable_sidekiq_memory_killer && use_sidekiq_daemon_memory_killer
+ Gitlab::SidekiqDaemon::Monitor.instance.start if enable_sidekiq_monitor
end
if enable_reliable_fetch?
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 5225cd5b054..c1273db8ee5 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -37,8 +37,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
scope '-' do
get 'archive/*id', constraints: { format: Gitlab::PathRegex.archive_formats_regex, id: /.+?/ }, to: 'repositories#archive', as: 'archive'
- resources :artifacts, only: [:index, :destroy]
-
resources :jobs, only: [:index, :show], constraints: { id: /\d+/ } do
collection do
resources :artifacts, only: [] do
@@ -197,12 +195,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
defaults: { format: 'json' },
constraints: { key: %r{[^/]+}, template_type: %r{issue|merge_request}, format: 'json' }
- get '/description_templates/names/:template_type',
- to: 'templates#names',
- as: :template_names,
- defaults: { format: 'json' },
- constraints: { template_type: %r{issue|merge_request}, format: 'json' }
-
resources :commit, only: [:show], constraints: { id: /\h{7,40}/ } do
member do
get :branches
diff --git a/db/migrate/20190903150358_create_analytics_repository_files_table.rb b/db/migrate/20190903150358_create_analytics_repository_files_table.rb
deleted file mode 100644
index e7c30a149f9..00000000000
--- a/db/migrate/20190903150358_create_analytics_repository_files_table.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-class CreateAnalyticsRepositoryFilesTable < ActiveRecord::Migration[5.2]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- def change
- create_table :analytics_repository_files do |t|
- t.references :project,
- index: false,
- foreign_key: { on_delete: :cascade },
- null: false
- t.string :file_path,
- limit: 4096,
- null: false
- end
-
- add_index :analytics_repository_files, [:project_id, :file_path], unique: true
- end
-end
diff --git a/db/migrate/20190903150435_create_analytics_repository_file_edits_table.rb b/db/migrate/20190903150435_create_analytics_repository_file_edits_table.rb
deleted file mode 100644
index dca3fa1b37d..00000000000
--- a/db/migrate/20190903150435_create_analytics_repository_file_edits_table.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-class CreateAnalyticsRepositoryFileEditsTable < ActiveRecord::Migration[5.2]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- def change
- create_table :analytics_repository_file_edits do |t|
- t.references :project,
- index: true,
- foreign_key: { on_delete: :cascade }, null: false
- t.references :analytics_repository_file,
- index: false,
- foreign_key: { on_delete: :cascade },
- null: false
- t.date :committed_date,
- null: false
- t.integer :num_edits,
- null: false,
- default: 0
- end
-
- add_index :analytics_repository_file_edits,
- [:analytics_repository_file_id, :committed_date, :project_id],
- name: 'index_file_edits_on_committed_date_file_id_and_project_id',
- unique: true
- end
-end
diff --git a/db/post_migrate/20190911251732_sync_issuables_state_id.rb b/db/post_migrate/20190911251732_sync_issuables_state_id.rb
deleted file mode 100644
index 56e764a1ae2..00000000000
--- a/db/post_migrate/20190911251732_sync_issuables_state_id.rb
+++ /dev/null
@@ -1,79 +0,0 @@
-# frozen_string_literal: true
-
-# Sync remaining records for issues/merge_requests tables where state_id
-# is still null.
-# For more information check: https://gitlab.com/gitlab-org/gitlab-ee/issues/26823
-# It creates a temporary index before performing the UPDATES to sync values.
-#
-# In 09-11-2019 we have the following numbers for records with state_id == nil:
-#
-# 1348 issues - default batch size for each update 67
-# 10247 merge requests - default batch size for each update 511
-
-class SyncIssuablesStateId < ActiveRecord::Migration[5.2]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- def up
- %i(issues merge_requests).each do |table|
- temp_index_name = index_name_for(table)
-
- add_concurrent_index(
- table,
- 'id',
- name: temp_index_name,
- where: 'state_id IS NULL'
- )
-
- update_value = update_condition_for(table)
-
- update_column_in_batches(table, :state_id, update_value) do |table, query|
- query.where(table[:state_id].eq(nil))
- end
- ensure
- remove_concurrent_index_by_name(table, temp_index_name)
- end
- end
-
- def down
- # NO OP
- end
-
- def update_condition_for(table)
- value_expresson =
- if table == :issues
- issues_state_id_condition
- else
- merge_requests_state_id_condition
- end
-
- Arel.sql(value_expresson)
- end
-
- def index_name_for(table)
- "idx_tmp_on_#{table}_where_state_id_is_null"
- end
-
- def issues_state_id_condition
- <<~SQL
- CASE state
- WHEN 'opened' THEN 1
- WHEN 'closed' THEN 2
- END
- SQL
- end
-
- def merge_requests_state_id_condition
- <<~SQL
- CASE state
- WHEN 'opened' THEN 1
- WHEN 'closed' THEN 2
- WHEN 'merged' THEN 3
- WHEN 'locked' THEN 4
- END
- SQL
- end
-end
diff --git a/db/schema.rb b/db/schema.rb
index b60593132f5..09f27d2f9cb 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -93,21 +93,6 @@ ActiveRecord::Schema.define(version: 2019_09_18_104222) do
t.index ["project_id"], name: "analytics_repository_languages_on_project_id"
end
- create_table "analytics_repository_file_edits", force: :cascade do |t|
- t.bigint "project_id", null: false
- t.bigint "analytics_repository_file_id", null: false
- t.date "committed_date", null: false
- t.integer "num_edits", default: 0, null: false
- t.index ["analytics_repository_file_id", "committed_date", "project_id"], name: "index_file_edits_on_committed_date_file_id_and_project_id", unique: true
- t.index ["project_id"], name: "index_analytics_repository_file_edits_on_project_id"
- end
-
- create_table "analytics_repository_files", force: :cascade do |t|
- t.bigint "project_id", null: false
- t.string "file_path", limit: 4096, null: false
- t.index ["project_id", "file_path"], name: "index_analytics_repository_files_on_project_id_and_file_path", unique: true
- end
-
create_table "appearances", id: :serial, force: :cascade do |t|
t.string "title", null: false
t.text "description", null: false
@@ -3804,9 +3789,6 @@ ActiveRecord::Schema.define(version: 2019_09_18_104222) do
add_foreign_key "analytics_cycle_analytics_project_stages", "projects", on_delete: :cascade
add_foreign_key "analytics_language_trend_repository_languages", "programming_languages", on_delete: :cascade
add_foreign_key "analytics_language_trend_repository_languages", "projects", on_delete: :cascade
- add_foreign_key "analytics_repository_file_edits", "analytics_repository_files", on_delete: :cascade
- add_foreign_key "analytics_repository_file_edits", "projects", on_delete: :cascade
- add_foreign_key "analytics_repository_files", "projects", on_delete: :cascade
add_foreign_key "application_settings", "namespaces", column: "custom_project_templates_group_id", on_delete: :nullify
add_foreign_key "application_settings", "projects", column: "file_template_project_id", name: "fk_ec757bd087", on_delete: :nullify
add_foreign_key "application_settings", "projects", column: "instance_administration_project_id", on_delete: :nullify
diff --git a/doc/administration/auth/ldap.md b/doc/administration/auth/ldap.md
index 728add05bd8..186bf4c4825 100644
--- a/doc/administration/auth/ldap.md
+++ b/doc/administration/auth/ldap.md
@@ -563,15 +563,3 @@ If you are getting 'Connection Refused' errors when trying to connect to the
LDAP server please double-check the LDAP `port` and `encryption` settings used by
GitLab. Common combinations are `encryption: 'plain'` and `port: 389`, OR
`encryption: 'simple_tls'` and `port: 636`.
-
-### Connection times out
-
-If GitLab cannot reach your LDAP endpoint, you will see a message like this:
-
-```
-Could not authenticate you from Ldapmain because "Connection timed out - user specified timeout".
-```
-
-If your configured LDAP provider and/or endpoint is offline or otherwise unreachable by GitLab, no LDAP user will be able to authenticate and log in. GitLab does not cache or store credentials for LDAP users to provide authentication during an LDAP outage.
-
-Contact your LDAP provider or administrator if you are seeing this error.
diff --git a/doc/administration/geo/replication/configuration.md b/doc/administration/geo/replication/configuration.md
index b8df365e56c..ddb5f22fd05 100644
--- a/doc/administration/geo/replication/configuration.md
+++ b/doc/administration/geo/replication/configuration.md
@@ -25,7 +25,7 @@ Any change that requires access to the **Admin Area** needs to be done in the
GitLab stores a number of secret values in the `/etc/gitlab/gitlab-secrets.json`
file which *must* be the same on all nodes. Until there is
-a means of automatically replicating these between nodes (see issue [gitlab-org/gitlab#3789]),
+a means of automatically replicating these between nodes (see issue [gitlab-org/gitlab-ee#3789]),
they must be manually replicated to the **secondary** node.
1. SSH into the **primary** node, and execute the command below:
@@ -299,7 +299,7 @@ See the [troubleshooting document](troubleshooting.md).
[setup-geo-omnibus]: index.md#using-omnibus-gitlab
[Hashed Storage]: ../../repository_storage_types.md
[Disaster Recovery]: ../disaster_recovery/index.md
-[gitlab-org/gitlab#3789]: https://gitlab.com/gitlab-org/gitlab/issues/3789
+[gitlab-org/gitlab-ee#3789]: https://gitlab.com/gitlab-org/gitlab/issues/3789
[gitlab-com/infrastructure#2821]: https://gitlab.com/gitlab-com/infrastructure/issues/2821
[omnibus-ssl]: https://docs.gitlab.com/omnibus/settings/ssl.html
[using-geo]: using_a_geo_server.md
diff --git a/doc/administration/high_availability/README.md b/doc/administration/high_availability/README.md
index e2998e4438a..0aaf956f169 100644
--- a/doc/administration/high_availability/README.md
+++ b/doc/administration/high_availability/README.md
@@ -165,7 +165,7 @@ contention due to certain workloads.
#### Reference Architecture
- **Supported Users (approximate):** 10,000
-- **Known Issues:** While validating the reference architecture, slow endpoints were discovered and are being investigated. [gitlab-org/gitlab-foss/issues/64335](https://gitlab.com/gitlab-org/gitlab-foss/issues/64335)
+- **Known Issues:** While validating the reference architecture, slow endpoints were discovered and are being investigated. [gitlab-org/gitlab-ce/issues/64335](https://gitlab.com/gitlab-org/gitlab-foss/issues/64335)
The Support and Quality teams built, performance tested, and validated an
environment that supports about 10,000 users. The specifications below are a
diff --git a/doc/administration/high_availability/database.md b/doc/administration/high_availability/database.md
index c9f6e768772..99582dae57a 100644
--- a/doc/administration/high_availability/database.md
+++ b/doc/administration/high_availability/database.md
@@ -1049,7 +1049,7 @@ If you're running into an issue with a component not outlined here, be sure to c
## Configure using Omnibus
**Note**: We recommend that you follow the instructions here for a full [PostgreSQL cluster](#high-availability-with-gitlab-omnibus-premium-only).
-If you are reading this section due to an old bookmark, you can find that old documentation [in the repository](https://gitlab.com/gitlab-org/gitlab/blob/v10.1.4/doc/administration/high_availability/database.md#configure-using-omnibus).
+If you are reading this section due to an old bookmark, you can find that old documentation [in the repository](https://gitlab.com/gitlab-org/gitlab-foss/blob/v10.1.4/doc/administration/high_availability/database.md#configure-using-omnibus).
Read more on high-availability configuration:
diff --git a/doc/administration/high_availability/redis_source.md b/doc/administration/high_availability/redis_source.md
index 379c64dcf90..0758b240a25 100644
--- a/doc/administration/high_availability/redis_source.md
+++ b/doc/administration/high_availability/redis_source.md
@@ -374,4 +374,4 @@ When in doubt, please read [Redis Sentinel documentation](https://redis.io/topic
[downloads]: https://about.gitlab.com/downloads
[restart]: ../restart_gitlab.md#installations-from-source
[it]: https://gitlab.com/gitlab-org/gitlab-foss/uploads/c4cc8cd353604bd80315f9384035ff9e/The_Internet_IT_Crowd.png
-[resque]: https://gitlab.com/gitlab-org/gitlab/blob/master/config/resque.yml.example
+[resque]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/resque.yml.example
diff --git a/doc/administration/issue_closing_pattern.md b/doc/administration/issue_closing_pattern.md
index afe8c7c7e9f..0e34505c2b0 100644
--- a/doc/administration/issue_closing_pattern.md
+++ b/doc/administration/issue_closing_pattern.md
@@ -13,7 +13,7 @@ in the project's default branch.
In order to change the pattern you need to have access to the server that GitLab
is installed on.
-The default pattern can be located in [`gitlab.yml.example`](https://gitlab.com/gitlab-org/gitlab/blob/master/config/gitlab.yml.example)
+The default pattern can be located in [`gitlab.yml.example`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/gitlab.yml.example)
under the "Automatic issue closing" section.
> **Tip:**
diff --git a/doc/administration/job_artifacts.md b/doc/administration/job_artifacts.md
index 1ab37824694..913321012e4 100644
--- a/doc/administration/job_artifacts.md
+++ b/doc/administration/job_artifacts.md
@@ -92,7 +92,7 @@ Use an object storage option like AWS S3 to store job artifacts.
DANGER: **Danger:**
If you're enabling S3 in [GitLab HA](high_availability/README.md), you will need to have an [NFS mount set up for CI traces and artifacts](high_availability/nfs.md#a-single-nfs-mount) or enable [live tracing](job_traces.md#new-live-trace-architecture). If these settings are not set, you will risk job traces disappearing or not being saved.
-#### Object Storage Settings
+### Object Storage Settings
For source installations the following settings are nested under `artifacts:` and then `object_store:`. On Omnibus GitLab installs they are prefixed by `artifacts_object_store_`.
@@ -105,7 +105,7 @@ For source installations the following settings are nested under `artifacts:` an
| `proxy_download` | Set to true to enable proxying all files served. Option allows to reduce egress traffic as this allows clients to download directly from remote storage instead of proxying all data | `false` |
| `connection` | Various connection options described below | |
-##### S3 compatible connection settings
+#### S3 compatible connection settings
The connection settings match those provided by [Fog](https://github.com/fog), and are as follows:
@@ -188,14 +188,6 @@ _The artifacts are stored by default in
sudo -u git -H bundle exec rake gitlab:artifacts:migrate RAILS_ENV=production
```
-### Migrating from object storage to local storage
-
-In order to migrate back to local storage:
-
-1. Set both `direct_upload` and `background_upload` to false under the artifacts object storage settings. Don't forget to restart GitLab.
-1. Run `rake gitlab:artifacts:migrate_to_local` on your console.
-1. Disable `object_storage` for artifacts in `gitlab.rb`. Remember to restart GitLab afterwards.
-
## Expiring artifacts
If an expiry date is used for the artifacts, they are marked for deletion
diff --git a/doc/administration/job_traces.md b/doc/administration/job_traces.md
index af60d777932..8a68f82d2fc 100644
--- a/doc/administration/job_traces.md
+++ b/doc/administration/job_traces.md
@@ -59,6 +59,46 @@ job traces are automatically migrated to it along with the other job artifacts.
See "Phase 4: uploading" in [Data flow](#data-flow) to learn about the process.
+## How to archive legacy job trace files
+
+Legacy job traces, which were created before GitLab 10.5, were not archived regularly.
+It's the same state with the "2: overwriting" in the above [Data flow](#data-flow).
+To archive those legacy job traces, please follow the instruction below.
+
+1. Execute the following command
+
+ ```bash
+ gitlab-rake gitlab:traces:archive
+ ```
+
+ After you executed this task, GitLab instance queues up Sidekiq jobs (asynchronous processes)
+ for migrating job trace files from local storage to object storage.
+ It could take time to complete the all migration jobs. You can check the progress by the following command
+
+ ```bash
+ sudo gitlab-rails console
+ ```
+
+ ```bash
+ [1] pry(main)> Sidekiq::Stats.new.queues['pipeline_background:archive_trace']
+ => 100
+ ```
+
+ If the count becomes zero, the archiving processes are done
+
+## How to migrate archived job traces to object storage
+
+> [Introduced][ce-21193] in GitLab 11.3.
+
+If job traces have already been archived into local storage, and you want to migrate those traces to object storage, please follow the instruction below.
+
+1. Ensure [Object storage integration for Job Artifacts](job_artifacts.md#object-storage-settings) is enabled
+1. Execute the following command
+
+ ```bash
+ gitlab-rake gitlab:traces:migrate
+ ```
+
## How to remove job traces
There isn't a way to automatically expire old job logs, but it's safe to remove
diff --git a/doc/administration/logs.md b/doc/administration/logs.md
index 9ccfde58605..7857dcc1f08 100644
--- a/doc/administration/logs.md
+++ b/doc/administration/logs.md
@@ -23,7 +23,7 @@ requests from the API are logged to a separate file in `api_json.log`.
Each line contains a JSON line that can be ingested by Elasticsearch, Splunk, etc. For example:
```json
-{"method":"GET","path":"/gitlab/gitlab-foss/issues/1234","format":"html","controller":"Projects::IssuesController","action":"show","status":200,"duration":229.03,"view":174.07,"db":13.24,"time":"2017-08-08T20:15:54.821Z","params":[{"key":"param_key","value":"param_value"}],"remote_ip":"18.245.0.1","user_id":1,"username":"admin","gitaly_calls":76,"gitaly_duration":7.41,"queue_duration": 112.47}
+{"method":"GET","path":"/gitlab/gitlab-ce/issues/1234","format":"html","controller":"Projects::IssuesController","action":"show","status":200,"duration":229.03,"view":174.07,"db":13.24,"time":"2017-08-08T20:15:54.821Z","params":[{"key":"param_key","value":"param_value"}],"remote_ip":"18.245.0.1","user_id":1,"username":"admin","gitaly_calls":76,"gitaly_duration":7.41,"queue_duration": 112.47}
```
In this example, you can see this was a GET request for a specific
diff --git a/doc/administration/merge_request_diffs.md b/doc/administration/merge_request_diffs.md
index db256728f4d..f24a3f94ceb 100644
--- a/doc/administration/merge_request_diffs.md
+++ b/doc/administration/merge_request_diffs.md
@@ -61,9 +61,6 @@ To enable external storage of merge request diffs, follow the instructions below
## Using object storage
-CAUTION: **WARNING:**
- Currently migrating to object storage is **non-reversible**
-
Instead of storing the external diffs on disk, we recommended the use of an object
store like AWS S3 instead. This configuration relies on valid AWS credentials to
be configured already.
diff --git a/doc/administration/monitoring/github_imports.md b/doc/administration/monitoring/github_imports.md
index 4d60cf0d491..2b1b7a230f7 100644
--- a/doc/administration/monitoring/github_imports.md
+++ b/doc/administration/monitoring/github_imports.md
@@ -16,7 +16,7 @@ This metric tracks the total time spent (in seconds) importing a project (from
project creation until the import process finishes), for every imported project.
The name of the project is stored in the `project` label in the format
-`namespace/name` (e.g. `gitlab-org/gitlab`).
+`namespace/name` (e.g. `gitlab-org/gitlab-ce`).
## Number of imported projects
@@ -54,7 +54,7 @@ projects. This metric does not expose any labels.
This metric tracks the number of imported issues across all projects.
The name of the project is stored in the `project` label in the format
-`namespace/name` (e.g. `gitlab-org/gitlab`).
+`namespace/name` (e.g. `gitlab-org/gitlab-ce`).
## Number of imported pull requests
@@ -65,7 +65,7 @@ The name of the project is stored in the `project` label in the format
This metric tracks the number of imported pull requests across all projects.
The name of the project is stored in the `project` label in the format
-`namespace/name` (e.g. `gitlab-org/gitlab`).
+`namespace/name` (e.g. `gitlab-org/gitlab-ce`).
## Number of imported comments
@@ -76,7 +76,7 @@ The name of the project is stored in the `project` label in the format
This metric tracks the number of imported comments across all projects.
The name of the project is stored in the `project` label in the format
-`namespace/name` (e.g. `gitlab-org/gitlab`).
+`namespace/name` (e.g. `gitlab-org/gitlab-ce`).
## Number of imported pull request review comments
@@ -87,7 +87,7 @@ The name of the project is stored in the `project` label in the format
This metric tracks the number of imported comments across all projects.
The name of the project is stored in the `project` label in the format
-`namespace/name` (e.g. `gitlab-org/gitlab`).
+`namespace/name` (e.g. `gitlab-org/gitlab-ce`).
## Number of imported repositories
diff --git a/doc/administration/operations/sidekiq_memory_killer.md b/doc/administration/operations/sidekiq_memory_killer.md
index 509bc77a8c3..8eac42f2fe2 100644
--- a/doc/administration/operations/sidekiq_memory_killer.md
+++ b/doc/administration/operations/sidekiq_memory_killer.md
@@ -26,50 +26,18 @@ run as a process group leader (e.g., using `chpst -P`). If using Omnibus or the
The MemoryKiller is controlled using environment variables.
-- `SIDEKIQ_DAEMON_MEMORY_KILLER`: defaults to 0. When set to 1, the MemoryKiller
- works in _daemon_ mode. Otherwise, the MemoryKiller works in _legacy_ mode.
-
- In _legacy_ mode, the MemoryKiller checks the Sidekiq process RSS after each job.
-
- In _daemon_ mode, the MemoryKiller checks the Sidekiq process RSS every 3 seconds
- (defined by `SIDEKIQ_MEMORY_KILLER_CHECK_INTERVAL`).
-
-- `SIDEKIQ_MEMORY_KILLER_MAX_RSS`: if this variable is set, and its value is greater
- than 0, the MemoryKiller is enabled. Otherwise the MemoryKiller is disabled.
-
- `SIDEKIQ_MEMORY_KILLER_MAX_RSS` defines the Sidekiq process allowed RSS.
-
- In _legacy_ mode, if the Sidekiq process exceeds the allowed RSS then an irreversible
- delayed graceful restart will be triggered. The restart of Sidekiq will happen
- after `SIDEKIQ_MEMORY_KILLER_GRACE_TIME` seconds.
-
- In _daemon_ mode, if the Sidekiq process exceeds the allowed RSS for longer than
- `SIDEKIQ_MEMORY_KILLER_GRACE_TIME` the graceful restart will be triggered. If the
- Sidekiq process go below the allowed RSS within `SIDEKIQ_MEMORY_KILLER_GRACE_TIME`,
- the restart will be aborted.
-
- The default value for Omnibus packages is set
+- `SIDEKIQ_MEMORY_KILLER_MAX_RSS`: if this variable is set, and its value is
+ greater than 0, then after each Sidekiq job, the MemoryKiller will check the
+ RSS of the Sidekiq process that executed the job. If the RSS of the Sidekiq
+ process (expressed in kilobytes) exceeds SIDEKIQ_MEMORY_KILLER_MAX_RSS, a
+ delayed shutdown is triggered. The default value for Omnibus packages is set
[in the omnibus-gitlab
repository](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/attributes/default.rb).
-
-- `SIDEKIQ_MEMORY_KILLER_HARD_LIMIT_RSS`: is used by _daemon_ mode. If the Sidekiq
- process RSS (expressed in kilobytes) exceeds `SIDEKIQ_MEMORY_KILLER_HARD_LIMIT_RSS`,
- an immediate graceful restart of Sidekiq is triggered.
-
-- `SIDEKIQ_MEMORY_KILLER_CHECK_INTERVAL`: used in _daemon_ mode to define how
- often to check process RSS, default to 3 seconds.
-
-- `SIDEKIQ_MEMORY_KILLER_GRACE_TIME`: defaults to 900 seconds (15 minutes).
- The usage of this variable is described as part of `SIDEKIQ_MEMORY_KILLER_MAX_RSS`.
-
-- `SIDEKIQ_MEMORY_KILLER_SHUTDOWN_WAIT`: defaults to 30 seconds. This defines the
- maximum time allowed for all Sidekiq jobs to finish. No new jobs will be accepted
- during that time, and the process will exit as soon as all jobs finish.
-
- If jobs do not finish during that time, the MemoryKiller will interrupt all currently
- running jobs by sending `SIGTERM` to the Sidekiq process.
-
- If the process hard shutdown/restart is not performed by Sidekiq,
- the Sidekiq process will be forcefully terminated after
- `Sidekiq.options[:timeout] * 2` seconds. An external supervision mechanism
- (e.g. Runit) must restart Sidekiq afterwards.
+- `SIDEKIQ_MEMORY_KILLER_GRACE_TIME`: defaults to 900 seconds (15 minutes). When
+ a shutdown is triggered, the Sidekiq process will keep working normally for
+ another 15 minutes.
+- `SIDEKIQ_MEMORY_KILLER_SHUTDOWN_WAIT`: defaults to 30 seconds. When the grace
+ time has expired, the MemoryKiller tells Sidekiq to stop accepting new jobs.
+ Existing jobs get 30 seconds to finish. After that, the MemoryKiller tells
+ Sidekiq to shut down, and an external supervision mechanism (e.g. Runit) must
+ restart Sidekiq.
diff --git a/doc/administration/packages/container_registry.md b/doc/administration/packages/container_registry.md
index 58a34607e2d..b5320d39d92 100644
--- a/doc/administration/packages/container_registry.md
+++ b/doc/administration/packages/container_registry.md
@@ -5,8 +5,8 @@
> Docker versions earlier than 1.10.
NOTE: **Note:**
-This document is the administrator's guide. To learn how to use GitLab Container
-Registry, see the [user documentation](../../user/packages/container_registry/index.md).
+This document is about the admin guide. To learn how to use GitLab Container
+Registry [user documentation](../../user/packages/container_registry/index.md).
With the Container Registry integrated into GitLab, every project can have its
own space to store its Docker images.
@@ -37,7 +37,7 @@ If you have installed GitLab from source:
1. After the installation is complete, you will have to configure the Registry's
settings in `gitlab.yml` in order to enable it.
1. Use the sample NGINX configuration file that is found under
- [`lib/support/nginx/registry-ssl`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/support/nginx/registry-ssl) and edit it to match the
+ [`lib/support/nginx/registry-ssl`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/support/nginx/registry-ssl) and edit it to match the
`host`, `port` and TLS certs paths.
The contents of `gitlab.yml` are:
diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md
index 8cce6dbcb97..41a372c4aeb 100644
--- a/doc/administration/pages/index.md
+++ b/doc/administration/pages/index.md
@@ -13,6 +13,10 @@ description: 'Learn how to administer GitLab Pages.'
GitLab Pages allows for hosting of static sites. It must be configured by an
administrator. Separate [user documentation][pages-userguide] is available.
+Read the [changelog](#changelog) if you are upgrading to a new GitLab
+version as it may include new features and changes needed to be made in your
+configuration.
+
NOTE: **Note:**
This guide is for Omnibus GitLab installations. If you have installed
GitLab from source, see
@@ -429,6 +433,34 @@ Pages are part of the [regular backup][backup] so there is nothing to configure.
You should strongly consider running GitLab pages under a different hostname
than GitLab to prevent XSS attacks.
+## Changelog
+
+GitLab Pages were first introduced in GitLab EE 8.3. Since then, many features
+where added, like custom CNAME and TLS support, and many more are likely to
+come. Below is a brief changelog. If no changes were introduced or a version is
+missing from the changelog, assume that the documentation is the same as the
+latest previous version.
+
+---
+
+**GitLab 8.17 ([documentation](https://gitlab.com/gitlab-org/gitlab-foss/blob/8-17-stable/doc/administration/pages/index.md))**
+
+- GitLab Pages were ported to Community Edition in GitLab 8.17.
+- Documentation was refactored to be more modular and easy to follow.
+
+**GitLab 8.5 ([documentation](https://gitlab.com/gitlab-org/gitlab/blob/8-5-stable-ee/doc/pages/administration.md))**
+
+- In GitLab 8.5 we introduced the [gitlab-pages][] daemon which is now the
+ recommended way to set up GitLab Pages.
+- The [NGINX configs][] have changed to reflect this change. So make sure to
+ update them.
+- Custom CNAME and TLS certificates support.
+- Documentation was moved to one place.
+
+**GitLab 8.3 ([documentation](https://gitlab.com/gitlab-org/gitlab/blob/8-3-stable-ee/doc/pages/administration.md))**
+
+- GitLab Pages feature was introduced.
+
[backup]: ../../raketasks/backup_restore.md
[ce-14605]: https://gitlab.com/gitlab-org/gitlab-foss/issues/14605
[ee-80]: https://gitlab.com/gitlab-org/gitlab/merge_requests/80
diff --git a/doc/administration/pages/source.md b/doc/administration/pages/source.md
index ad2a57e3241..bacfa0117bb 100644
--- a/doc/administration/pages/source.md
+++ b/doc/administration/pages/source.md
@@ -455,5 +455,5 @@ than GitLab to prevent XSS attacks.
[pages-userguide]: ../../user/project/pages/index.md
[restart]: ../restart_gitlab.md#installations-from-source
[gitlab-pages]: https://gitlab.com/gitlab-org/gitlab-pages/tree/v0.4.0
-[gl-example]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/support/init.d/gitlab.default.example
+[gl-example]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/support/init.d/gitlab.default.example
[shared runners]: ../../ci/runners/README.md
diff --git a/doc/administration/raketasks/uploads/migrate.md b/doc/administration/raketasks/uploads/migrate.md
index 3bd8f2c27d4..d9b4c9b3369 100644
--- a/doc/administration/raketasks/uploads/migrate.md
+++ b/doc/administration/raketasks/uploads/migrate.md
@@ -113,39 +113,3 @@ To migrate all uploads created by legacy uploaders, run:
```shell
bundle exec rake gitlab:uploads:legacy:migrate
```
-
-## Migrate from object storage to local storage
-
-If you need to disable Object Storage for any reason, first you need to migrate
-your data out of Object Storage and back into your local storage.
-
-**Before proceeding, it is important to disable both `direct_upload` and `background_upload` under `uploads` settings in `gitlab.rb`**
-
-CAUTION: **Warning:**
- **Extended downtime is required** so no new files are created in object storage during
- the migration. A configuration setting will be added soon to allow migrating
- from object storage to local files with only a brief moment of downtime for configuration changes.
- See issue [gitlab-org/gitlab-ce#66144](https://gitlab.com/gitlab-org/gitlab-ce/issues/66144)
-
-### All-in-one rake task
-
-GitLab provides a wrapper rake task that migrates all uploaded files - avatars,
-logos, attachments, favicon, etc. - to local storage in one go. Under the hood,
-it invokes individual rake tasks to migrate files falling under each of this
-category one by one. For details on these rake tasks please [refer to the section above](#individual-rake-tasks),
-keeping in mind the task name in this case is `gitlab:uploads:migrate_to_local`.
-
-**Omnibus Installation**
-
-```bash
-gitlab-rake "gitlab:uploads:migrate_to_local:all"
-```
-
-**Source Installation**
-
-```bash
-sudo RAILS_ENV=production -u git -H bundle exec rake gitlab:uploads:migrate_to_local:all
-```
-
-After this is done, you may disable Object Storage by undoing the changes described
-in the instructions to [configure object storage](../../uploads.md#using-object-storage-core-only)
diff --git a/doc/administration/repository_storage_paths.md b/doc/administration/repository_storage_paths.md
index 7d3e36e9796..376eb90deea 100644
--- a/doc/administration/repository_storage_paths.md
+++ b/doc/administration/repository_storage_paths.md
@@ -118,6 +118,6 @@ randomly placed on one of the selected paths.
[restart-gitlab]: restart_gitlab.md#installations-from-source
[reconfigure-gitlab]: restart_gitlab.md#omnibus-gitlab-reconfigure
[backups]: ../raketasks/backup_restore.md
-[raketask]: https://gitlab.com/gitlab-org/gitlab/blob/033e5423a2594e08a7ebcd2379bd2331f4c39032/lib/backup/repository.rb#L54-56
-[repospath]: https://gitlab.com/gitlab-org/gitlab/blob/8-9-stable/config/gitlab.yml.example#L457
+[raketask]: https://gitlab.com/gitlab-org/gitlab-foss/blob/033e5423a2594e08a7ebcd2379bd2331f4c39032/lib/backup/repository.rb#L54-56
+[repospath]: https://gitlab.com/gitlab-org/gitlab-foss/blob/8-9-stable/config/gitlab.yml.example#L457
[ce-11449]: https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/11449
diff --git a/doc/administration/restart_gitlab.md b/doc/administration/restart_gitlab.md
index 9f95080654f..169a220b9a9 100644
--- a/doc/administration/restart_gitlab.md
+++ b/doc/administration/restart_gitlab.md
@@ -141,5 +141,5 @@ If you are using other init systems, like systemd, you can check the
[install]: ../install/installation.md "Documentation to install GitLab from source"
[mailroom]: reply_by_email.md "Used for replying by email in GitLab issues and merge requests"
[chef]: https://www.chef.io/products/chef-infra/ "Chef official website"
-[src-service]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/support/init.d/gitlab "GitLab init service file"
+[src-service]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/support/init.d/gitlab "GitLab init service file"
[gl-recipes]: https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/init "GitLab Recipes repository"
diff --git a/doc/api/commits.md b/doc/api/commits.md
index 3927a4bbc62..cf1bca7b193 100644
--- a/doc/api/commits.md
+++ b/doc/api/commits.md
@@ -11,13 +11,12 @@ GET /projects/:id/repository/commits
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
-| `ref_name` | string | no | The name of a repository branch, tag or revision range, or if not given the default branch |
+| `ref_name` | string | no | The name of a repository branch or tag or if not given the default branch |
| `since` | string | no | Only commits after or on this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ |
| `until` | string | no | Only commits before or on this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ |
| `path` | string | no | The file path |
| `all` | boolean | no | Retrieve every commit from the repository |
| `with_stats` | boolean | no | Stats about each commit will be added to the response |
-| `first_parent` | boolean | no | Follow only the first parent commit upon seeing a merge commit |
```bash
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/commits"
@@ -534,7 +533,7 @@ Example response:
},
"description" : null,
"sha" : "18f3e63d05582537db6d183d9d557be09e1f90c8",
- "target_url" : "https://gitlab.example.com/thedude/gitlab-foss/builds/91",
+ "target_url" : "https://gitlab.example.com/thedude/gitlab-ce/builds/91",
"finished_at" : null,
"id" : 91,
"ref" : "master"
@@ -545,7 +544,7 @@ Example response:
"allow_failure" : false,
"status" : "pending",
"created_at" : "2016-01-19T08:40:25.832Z",
- "target_url" : "https://gitlab.example.com/thedude/gitlab-foss/builds/90",
+ "target_url" : "https://gitlab.example.com/thedude/gitlab-ce/builds/90",
"id" : 90,
"finished_at" : null,
"ref" : "master",
diff --git a/doc/api/container_registry.md b/doc/api/container_registry.md
index 7e5e265351e..cb1a81b97b6 100644
--- a/doc/api/container_registry.md
+++ b/doc/api/container_registry.md
@@ -252,8 +252,8 @@ This action does not delete blobs. In order to delete them and recycle disk spac
[run the garbage collection](https://docs.gitlab.com/omnibus/maintenance/README.html#removing-unused-layers-not-referenced-by-manifests).
NOTE: **Note:**
-Since GitLab 12.4, individual tags are deleted.
-For more details, see the [discussion](https://gitlab.com/gitlab-org/gitlab/issues/15737).
+Due to a [Docker Distribution deficiency](https://gitlab.com/gitlab-org/gitlab-foss/issues/21405),
+it doesn't remove tags whose manifest is shared by multiple tags.
Examples:
diff --git a/doc/api/features.md b/doc/api/features.md
index 8b5ea27007d..e8d0c7c942b 100644
--- a/doc/api/features.md
+++ b/doc/api/features.md
@@ -61,7 +61,7 @@ POST /features/:name
| `feature_group` | string | no | A Feature group name |
| `user` | string | no | A GitLab username |
| `group` | string | no | A GitLab group's path, for example `gitlab-org` |
-| `project` | string | no | A projects path, for example `gitlab-org/gitlab-foss` |
+| `project` | string | no | A projects path, for example `gitlab-org/gitlab-ce` |
Note that you can enable or disable a feature for a `feature_group`, a `user`,
a `group`, and a `project` in a single API call.
diff --git a/doc/api/project_aliases.md b/doc/api/project_aliases.md
index da8d7600c7c..9d59ca1e3b5 100644
--- a/doc/api/project_aliases.md
+++ b/doc/api/project_aliases.md
@@ -23,12 +23,12 @@ Example response:
{
"id": 1,
"project_id": 1,
- "name": "gitlab-foss"
+ "name": "gitlab-ce"
},
{
"id": 2,
"project_id": 2,
- "name": "gitlab"
+ "name": "gitlab-ee"
}
]
```
@@ -46,7 +46,7 @@ GET /project_aliases/:name
| `name` | string | yes | The name of the alias |
```
-curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases/gitlab"
+curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases/gitlab-ee"
```
Example response:
@@ -55,7 +55,7 @@ Example response:
{
"id": 1,
"project_id": 1,
- "name": "gitlab"
+ "name": "gitlab-ee"
}
```
@@ -74,13 +74,13 @@ POST /project_aliases
| `name` | string | yes | The name of the alias. Must be unique. |
```
-curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" --form "project_id=1" --form "name=gitlab"
+curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" --form "project_id=1" --form "name=gitlab-ee"
```
or
```
-curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" --form "project_id=gitlab-org/gitlab" --form "name=gitlab"
+curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases" --form "project_id=gitlab-org/gitlab-ee" --form "name=gitlab-ee"
```
Example response:
@@ -89,7 +89,7 @@ Example response:
{
"id": 1,
"project_id": 1,
- "name": "gitlab"
+ "name": "gitlab-ee"
}
```
@@ -107,5 +107,5 @@ DELETE /project_aliases/:name
| `name` | string | yes | The name of the alias |
```
-curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases/gitlab"
+curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/project_aliases/gitlab-ee"
```
diff --git a/doc/api/project_import_export.md b/doc/api/project_import_export.md
index cd02d423a9f..e285c721d11 100644
--- a/doc/api/project_import_export.md
+++ b/doc/api/project_import_export.md
@@ -111,7 +111,6 @@ POST /projects/import
| Attribute | Type | Required | Description |
| --------- | -------------- | -------- | ---------------------------------------- |
| `namespace` | integer/string | no | The ID or path of the namespace that the project will be imported to. Defaults to the current user's namespace |
-| `name` | string | no | The name of the project to be imported. Defaults to the path of the project if not provided |
| `file` | string | yes | The file to be uploaded |
| `path` | string | yes | Name and path for new project |
| `overwrite` | boolean | no | If there is a project with the same path the import will overwrite it. Default to false |
@@ -132,12 +131,14 @@ cURL doesn't support posting a file from a remote server. Importing a project fr
```python
import requests
-from io import BytesIO
+import urllib
+import json
+import sys
-s3_file = requests.get(presigned_url)
+s3_file = urllib.urlopen(presigned_url)
url = 'https://gitlab.example.com/api/v4/projects/import'
-files = {'file': ('file.tar.gz', BytesIO(s3_file.content))}
+files = {'file': s3_file}
data = {
"path": "example-project",
"namespace": "example-group"
diff --git a/doc/api/projects.md b/doc/api/projects.md
index 38c3708c7e5..af0c8ed7c5b 100644
--- a/doc/api/projects.md
+++ b/doc/api/projects.md
@@ -809,16 +809,16 @@ If the project is a fork, and you provide a valid token to authenticate, the
"description":"GitLab Community Edition",
"name":"GitLab Community Edition",
"name_with_namespace":"GitLab.org / GitLab Community Edition",
- "path":"gitlab-foss",
- "path_with_namespace":"gitlab-org/gitlab-foss",
+ "path":"gitlab-ce",
+ "path_with_namespace":"gitlab-org/gitlab-ce",
"created_at":"2013-09-26T06:02:36.000Z",
"default_branch":"master",
"tag_list":[],
- "ssh_url_to_repo":"git@gitlab.com:gitlab-org/gitlab-foss.git",
+ "ssh_url_to_repo":"git@gitlab.com:gitlab-org/gitlab-ce.git",
"http_url_to_repo":"https://gitlab.com/gitlab-org/gitlab-foss.git",
"web_url":"https://gitlab.com/gitlab-org/gitlab-foss",
"avatar_url":"https://assets.gitlab-static.net/uploads/-/system/project/avatar/13083/logo-extra-whitespace.png",
- "license_url": "https://gitlab.com/gitlab-org/gitlab/blob/master/LICENSE",
+ "license_url": "https://gitlab.com/gitlab-org/gitlab-foss/blob/master/LICENSE",
"license": {
"key": "mit",
"name": "MIT License",
@@ -931,13 +931,9 @@ POST /projects
| `auto_devops_deploy_strategy` | string | no | Auto Deploy strategy (`continuous`, `manual` or `timed_incremental`) |
| `repository_storage` | string | no | **(STARTER ONLY)** Which storage shard the repository is on. Available only to admins |
| `approvals_before_merge` | integer | no | **(STARTER)** How many approvers should approve merge requests by default |
-| `external_authorization_classification_label` | string | no | **(PREMIUM)** The classification label for the project |
| `mirror` | boolean | no | **(STARTER)** Enables pull mirroring in a project |
| `mirror_trigger_builds` | boolean | no | **(STARTER)** Pull mirroring triggers builds |
| `initialize_with_readme` | boolean | no | `false` by default |
-| `template_name` | string | no | When used without `use_custom_template`, name of a [built-in project template](../gitlab-basics/create-project.md#built-in-templates). When used with `use_custom_template`, name of a custom project template |
-| `use_custom_template` | boolean | no | **(PREMIUM)** Use either custom [instance](../user/admin_area/custom_project_templates.md) or [group](../user/group/custom_project_templates.md) (with `group_with_project_templates_id`) project template |
-| `group_with_project_templates_id` | integer | no | **(PREMIUM)** For group-level custom templates, specifies ID of group from which all the custom project templates are sourced. Leave empty for instance-level templates. Requires `use_custom_template` to be true |
NOTE: **Note:** If your HTTP repository is not publicly accessible,
add authentication information to the URL: `https://username:password@gitlab.company.com/group/project.git`
@@ -995,7 +991,6 @@ POST /projects/user/:user_id
| `external_authorization_classification_label` | string | no | **(PREMIUM)** The classification label for the project |
| `mirror` | boolean | no | **(STARTER)** Enables pull mirroring in a project |
| `mirror_trigger_builds` | boolean | no | **(STARTER)** Pull mirroring triggers builds |
-| `initialize_with_readme` | boolean | no | `false` by default |
| `template_name` | string | no | When used without `use_custom_template`, name of a [built-in project template](../gitlab-basics/create-project.md#built-in-templates). When used with `use_custom_template`, name of a custom project template |
| `use_custom_template` | boolean | no | **(PREMIUM)** Use either custom [instance](../user/admin_area/custom_project_templates.md) or [group](../user/group/custom_project_templates.md) (with `group_with_project_templates_id`) project template |
| `group_with_project_templates_id` | integer | no | **(PREMIUM)** For group-level custom templates, specifies ID of group from which all the custom project templates are sourced. Leave empty for instance-level templates. Requires `use_custom_template` to be true |
diff --git a/doc/api/protected_branches.md b/doc/api/protected_branches.md
index debf1b264f9..a14c9046ca7 100644
--- a/doc/api/protected_branches.md
+++ b/doc/api/protected_branches.md
@@ -46,8 +46,7 @@ Example response:
"access_level": 40,
"access_level_description": "Maintainers"
}
- ],
- "code_owner_approval_required": "false"
+ ]
},
...
]
@@ -77,8 +76,7 @@ Example response:
"group_id": 1234,
"access_level_description": "Example Merge Group"
}
- ],
- "code_owner_approval_required": "false"
+ ]
},
...
]
@@ -117,8 +115,7 @@ Example response:
"access_level": 40,
"access_level_description": "Maintainers"
}
- ],
- "code_owner_approval_required": "false"
+ ]
}
```
@@ -145,8 +142,7 @@ Example response:
"group_id": 1234,
"access_level_description": "Example Merge Group"
}
- ],
- "code_owner_approval_required": "false"
+ ]
}
```
@@ -165,15 +161,14 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" 'https://gitla
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
-| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
-| `name` | string | yes | The name of the branch or wildcard |
-| `push_access_level` | string | no | Access levels allowed to push (defaults: `40`, maintainer access level) |
-| `merge_access_level` | string | no | Access levels allowed to merge (defaults: `40`, maintainer access level) |
-| `unprotect_access_level` | string | no | Access levels allowed to unprotect (defaults: `40`, maintainer access level) |
-| `allowed_to_push` | array | no | **(STARTER)** Array of access levels allowed to push, with each described by a hash |
-| `allowed_to_merge` | array | no | **(STARTER)** Array of access levels allowed to merge, with each described by a hash |
-| `allowed_to_unprotect` | array | no | **(STARTER)** Array of access levels allowed to unprotect, with each described by a hash |
-| `code_owner_approval_required` | boolean | no | **(PREMIUM)** Prevent pushes to this branch if it matches an item in the [`CODEOWNERS` file](../user/project/code_owners.md). (defaults: false) |
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
+| `name` | string | yes | The name of the branch or wildcard |
+| `push_access_level` | string | no | Access levels allowed to push (defaults: `40`, maintainer access level) |
+| `merge_access_level` | string | no | Access levels allowed to merge (defaults: `40`, maintainer access level) |
+| `unprotect_access_level` | string | no | Access levels allowed to unprotect (defaults: `40`, maintainer access level) |
+| `allowed_to_push` | array | no | **(STARTER)** Array of access levels allowed to push, with each described by a hash |
+| `allowed_to_merge` | array | no | **(STARTER)** Array of access levels allowed to merge, with each described by a hash |
+| `allowed_to_unprotect` | array | no | **(STARTER)**Array of access levels allowed to unprotect, with each described by a hash |
Example response:
@@ -197,8 +192,7 @@ Example response:
"access_level": 40,
"access_level_description": "Maintainers"
}
- ],
- "code_owner_approval_required": "false"
+ ]
}
```
@@ -233,8 +227,7 @@ Example response:
"group_id": null,
"access_level_description": "Maintainers"
}
- ],
- "code_owner_approval_required": "false"
+ ]
}
```
@@ -275,8 +268,7 @@ Example response:
"group_id": null,
"access_level_description": "Maintainers"
}
- ],
- "code_owner_approval_required": "false"
+ ]
}
```
diff --git a/doc/api/runners.md b/doc/api/runners.md
index 45d68e40777..51a546e91dc 100644
--- a/doc/api/runners.md
+++ b/doc/api/runners.md
@@ -184,8 +184,8 @@ Example response:
"id": 1,
"name": "GitLab Community Edition",
"name_with_namespace": "GitLab.org / GitLab Community Edition",
- "path": "gitlab-foss",
- "path_with_namespace": "gitlab-org/gitlab-foss"
+ "path": "gitlab-ce",
+ "path_with_namespace": "gitlab-org/gitlab-ce"
}
],
"token": "205086a8e3b9a2b818ffac9b89d102",
@@ -243,8 +243,8 @@ Example response:
"id": 1,
"name": "GitLab Community Edition",
"name_with_namespace": "GitLab.org / GitLab Community Edition",
- "path": "gitlab-foss",
- "path_with_namespace": "gitlab-org/gitlab-foss"
+ "path": "gitlab-ce",
+ "path_with_namespace": "gitlab-org/gitlab-ce"
}
],
"token": "205086a8e3b9a2b818ffac9b89d102",
diff --git a/doc/api/services.md b/doc/api/services.md
index 5feb5b2196b..ff181f2ba61 100644
--- a/doc/api/services.md
+++ b/doc/api/services.md
@@ -1189,7 +1189,7 @@ GET /projects/:id/services/jenkins-deprecated
```
[jira-doc]: ../user/project/integrations/jira.md
-[old-jira-api]: https://gitlab.com/gitlab-org/gitlab/blob/8-13-stable/doc/api/services.md#jira
+[old-jira-api]: https://gitlab.com/gitlab-org/gitlab-foss/blob/8-13-stable/doc/api/services.md#jira
## MockCI
diff --git a/doc/api/tags.md b/doc/api/tags.md
index 56143969e3c..3807688ffe3 100644
--- a/doc/api/tags.md
+++ b/doc/api/tags.md
@@ -116,12 +116,6 @@ Parameters:
- `message` (optional) - Creates annotated tag.
- `release_description` (optional) - Add release notes to the Git tag and store it in the GitLab database.
-```bash
-curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/repository/tags?tag_name=test&ref=master"
-```
-
-Example response:
-
```json
{
"commit": {
diff --git a/doc/api/todos.md b/doc/api/todos.md
index b708b4391a2..bc2eeccacbe 100644
--- a/doc/api/todos.md
+++ b/doc/api/todos.md
@@ -36,8 +36,8 @@ Example Response:
"id": 2,
"name": "Gitlab Ce",
"name_with_namespace": "Gitlab Org / Gitlab Ce",
- "path": "gitlab-foss",
- "path_with_namespace": "gitlab-org/gitlab-foss"
+ "path": "gitlab-ce",
+ "path_with_namespace": "gitlab-org/gitlab-ce"
},
"author": {
"name": "Administrator",
@@ -109,8 +109,8 @@ Example Response:
"id": 2,
"name": "Gitlab Ce",
"name_with_namespace": "Gitlab Org / Gitlab Ce",
- "path": "gitlab-foss",
- "path_with_namespace": "gitlab-org/gitlab-foss"
+ "path": "gitlab-ce",
+ "path_with_namespace": "gitlab-org/gitlab-ce"
},
"author": {
"name": "Maxie Medhurst",
@@ -207,8 +207,8 @@ Example Response:
"id": 2,
"name": "Gitlab Ce",
"name_with_namespace": "Gitlab Org / Gitlab Ce",
- "path": "gitlab-foss",
- "path_with_namespace": "gitlab-org/gitlab-foss"
+ "path": "gitlab-ce",
+ "path_with_namespace": "gitlab-org/gitlab-ce"
},
"author": {
"name": "Administrator",
diff --git a/doc/api/users.md b/doc/api/users.md
index 251c11198e1..380396c7377 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -393,21 +393,20 @@ PUT /users/:id
Parameters:
-- `id` (required) - The ID of the user
-- `email` (optional) - Email
-- `username` (optional) - Username
-- `name` (optional) - Name
-- `password` (optional) - Password
-- `skype` (optional) - Skype ID
-- `linkedin` (optional) - LinkedIn
-- `twitter` (optional) - Twitter account
-- `website_url` (optional) - Website URL
-- `organization` (optional) - Organization name
-- `projects_limit` (optional) - Limit projects each user can create
-- `extern_uid` (optional) - External UID
-- `provider` (optional) - External provider name
+- `email` - Email
+- `username` - Username
+- `name` - Name
+- `password` - Password
+- `skype` - Skype ID
+- `linkedin` - LinkedIn
+- `twitter` - Twitter account
+- `website_url` - Website URL
+- `organization` - Organization name
+- `projects_limit` - Limit projects each user can create
+- `extern_uid` - External UID
+- `provider` - External provider name
- `group_id_for_saml` (optional) - ID of group where SAML has been configured
-- `bio` (optional) - User's biography
+- `bio` - User's biography
- `location` (optional) - User's location
- `public_email` (optional) - The public email of the user
- `admin` (optional) - User is admin - true or false (default)
@@ -420,7 +419,7 @@ Parameters:
- `private_profile` (optional) - User's profile is private - true or false (default)
- `shared_runners_minutes_limit` (optional) - Pipeline minutes quota for this user **(STARTER)**
- `extra_shared_runners_minutes_limit` (optional) - Extra pipeline minutes quota for this user **(STARTER)**
-- `note` (optional) - Admin notes for this user **(STARTER)**
+- `note` (optional) - Admin notes for this user **(STARTER)**
On password update, user will be forced to change it upon next login.
Note, at the moment this method does only return a `404` error,
diff --git a/doc/ci/ci_cd_for_external_repos/index.md b/doc/ci/ci_cd_for_external_repos/index.md
index 257520d149c..db647530fcd 100644
--- a/doc/ci/ci_cd_for_external_repos/index.md
+++ b/doc/ci/ci_cd_for_external_repos/index.md
@@ -100,6 +100,7 @@ requests and not on branches you can add `except: [branches]` to the job specs.
[Read more](https://gitlab.com/gitlab-org/gitlab/issues/24089#workaround).
[ee-4642]: https://gitlab.com/gitlab-org/gitlab/merge_requests/4642
+[ee-4642]: https://gitlab.com/gitlab-org/gitlab/merge_requests/4642
[eep]: https://about.gitlab.com/pricing/
[mirroring]: ../../workflow/repository_mirroring.md
[settings]: ../../user/project/settings/index.md#sharing-and-permissions
diff --git a/doc/ci/pipelines.md b/doc/ci/pipelines.md
index 2a077e66ec0..de9bac76281 100644
--- a/doc/ci/pipelines.md
+++ b/doc/ci/pipelines.md
@@ -204,7 +204,7 @@ the following (you can even use them interchangeably):
- A colon (`:`).
NOTE: **Note:**
-More specifically, it uses [this](https://gitlab.com/gitlab-org/gitlab/blob/2f3dc314f42dbd79813e6251792853bc231e69dd/app/models/commit_status.rb#L99) regular expression: `\d+[\s:\/\\]+\d+\s*`.
+More specifically, it uses [this](https://gitlab.com/gitlab-org/gitlab-foss/blob/2f3dc314f42dbd79813e6251792853bc231e69dd/app/models/commit_status.rb#L99) regular expression: `\d+[\s:\/\\]+\d+\s*`.
#### How grouping works
diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md
index 6527ac2b51e..5e871ec7958 100644
--- a/doc/ci/variables/README.md
+++ b/doc/ci/variables/README.md
@@ -263,12 +263,12 @@ export CI_JOB_TOKEN="abcde-1234ABCD5678ef"
export CI_PIPELINE_ID="1000"
export CI_PIPELINE_IID="10"
export CI_PAGES_DOMAIN="gitlab.io"
-export CI_PAGES_URL="https://gitlab-org.gitlab.io/gitlab-foss"
+export CI_PAGES_URL="https://gitlab-org.gitlab.io/gitlab-ce"
export CI_PROJECT_ID="34"
export CI_PROJECT_DIR="/builds/gitlab-org/gitlab-foss"
-export CI_PROJECT_NAME="gitlab-foss"
+export CI_PROJECT_NAME="gitlab-ce"
export CI_PROJECT_NAMESPACE="gitlab-org"
-export CI_PROJECT_PATH="gitlab-org/gitlab-foss"
+export CI_PROJECT_PATH="gitlab-org/gitlab-ce"
export CI_PROJECT_URL="https://example.com/gitlab-org/gitlab-foss"
export CI_REGISTRY="registry.example.com"
export CI_REGISTRY_IMAGE="registry.example.com/gitlab-org/gitlab-foss"
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index 4d0bdf40b28..5c747688bb1 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -20,7 +20,7 @@ We have complete examples of configuring pipelines:
- For a quick introduction to GitLab CI, follow our [quick start guide](../quick_start/README.md).
- For a collection of examples, see [GitLab CI/CD Examples](../examples/README.md).
-- To see a large `.gitlab-ci.yml` file used in an enterprise, see the [`.gitlab-ci.yml` file for `gitlab`](https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml).
+- To see a large `.gitlab-ci.yml` file used in an enterprise, see the [`.gitlab-ci.yml` file for `gitlab-ce`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/.gitlab-ci.yml).
NOTE: **Note:**
If you have a [mirrored repository where GitLab pulls from](../../workflow/repository_mirroring.md#pulling-from-a-remote-repository-starter),
@@ -110,7 +110,7 @@ The following table lists available parameters for jobs:
| [`dependencies`](#dependencies) | Other jobs that a job depends on so that you can pass artifacts between them. |
| [`coverage`](#coverage) | Code coverage settings for a given job. |
| [`retry`](#retry) | When and how many times a job can be auto-retried in case of a failure. |
-| [`timeout`](#timeout) | Define a custom job-level timeout that takes precedence over the project-wide setting. |
+| [`timeout`](#timeout) | Define a custom timeout that would take precedence over the project-wide one. |
| [`parallel`](#parallel) | How many instances of a job should be run in parallel. |
| [`trigger`](#trigger-premium) | Defines a downstream pipeline trigger. |
| [`include`](#include) | Allows this job to include external YAML files. Also available: `include:local`, `include:file`, `include:template`, and `include:remote`. |
@@ -436,13 +436,13 @@ repository and not forks:
```yaml
job:
only:
- - branches@gitlab-org/gitlab
+ - branches@gitlab-org/gitlab-ce
except:
- - master@gitlab-org/gitlab
- - /^release/.*$/@gitlab-org/gitlab
+ - master@gitlab-org/gitlab-ce
+ - /^release/.*$/@gitlab-org/gitlab-ce
```
-The above example will run `job` for all branches on `gitlab-org/gitlab`,
+The above example will run `job` for all branches on `gitlab-org/gitlab-ce`,
except `master` and those with names prefixed with `release/`.
If a job does not have an `only` rule, `only: ['branches', 'tags']` is set by
@@ -837,7 +837,7 @@ docker build:
Additional job configuration may be added to rules in the future. If something
useful isn't available, please
-[open an issue](https://www.gitlab.com/gitlab-org/gitlab/issues).
+[open an issue](https://www.gitlab.com/gitlab-org/gitlab-foss/issues).
### `tags`
@@ -1894,12 +1894,12 @@ This example creates three paths of execution:
- 50 if the `ci_dag_limit_needs` feature flag is disabled.
- It is impossible for now to have `needs: []` (empty needs),
the job always needs to depend on something, unless this is the job
- in the first stage (see [gitlab-foss#65504](https://gitlab.com/gitlab-org/gitlab-foss/issues/65504)).
+ in the first stage (see [gitlab-ce#65504](https://gitlab.com/gitlab-org/gitlab-foss/issues/65504)).
- If `needs:` refers to a job that is marked as `parallel:`.
the current job will depend on all parallel jobs created.
- `needs:` is similar to `dependencies:` in that it needs to use jobs from
prior stages, meaning it is impossible to create circular
- dependencies or depend on jobs in the current stage (see [gitlab-foss#65505](https://gitlab.com/gitlab-org/gitlab-foss/issues/65505)).
+ dependencies or depend on jobs in the current stage (see [gitlab-ce#65505](https://gitlab.com/gitlab-org/gitlab-foss/issues/65505)).
- Related to the above, stages must be explicitly defined for all jobs
that have the keyword `needs:` or are referred to by one.
@@ -1996,11 +1996,9 @@ Possible values for `when` are:
- `missing_dependency_failure`: Retry if a dependency was missing.
- `runner_unsupported`: Retry if the runner was unsupported.
-### `timeout`
+### timeout
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/14887) in GitLab 12.3.
-
-`timeout` allows you to configure a timeout for a specific job. For example:
+`timeout` allows you to configure a timeout for a specific job:
```yaml
build:
@@ -2131,7 +2129,7 @@ step-1:
stage: stage1
script:
- echo "Can be canceled"
-
+
step-2:
stage: stage2
script:
@@ -2245,7 +2243,7 @@ or template includes.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/53445) in GitLab 11.7.
`include:template` can be used to include `.gitlab-ci.yml` templates that are
-[shipped with GitLab](https://gitlab.com/gitlab-org/gitlab/tree/master/lib/gitlab/ci/templates).
+[shipped with GitLab](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/lib/gitlab/ci/templates).
For example:
diff --git a/doc/customization/libravatar.md b/doc/customization/libravatar.md
index 43a6b8f0d34..577528fb33b 100644
--- a/doc/customization/libravatar.md
+++ b/doc/customization/libravatar.md
@@ -14,7 +14,7 @@ server.
## Configuration
-In the [`gitlab.yml` gravatar section](https://gitlab.com/gitlab-org/gitlab/blob/672bd3902d86b78d730cea809fce312ec49d39d7/config/gitlab.yml.example#L122), set
+In the [`gitlab.yml` gravatar section](https://gitlab.com/gitlab-org/gitlab-foss/blob/672bd3902d86b78d730cea809fce312ec49d39d7/config/gitlab.yml.example#L122), set
the configuration options as follows:
### For HTTP
diff --git a/doc/development/api_graphql_styleguide.md b/doc/development/api_graphql_styleguide.md
index 793b1fbb2f5..c3165dc2e21 100644
--- a/doc/development/api_graphql_styleguide.md
+++ b/doc/development/api_graphql_styleguide.md
@@ -526,7 +526,7 @@ Using these helpers, we can build specs like this:
let(:mutation) do
graphql_mutation(
:merge_request_set_wip,
- project_path: 'gitlab-org/gitlab-foss',
+ project_path: 'gitlab-org/gitlab-ce',
iid: '1',
wip: true
)
diff --git a/doc/development/api_styleguide.md b/doc/development/api_styleguide.md
index b95d565e557..e3c8c860062 100644
--- a/doc/development/api_styleguide.md
+++ b/doc/development/api_styleguide.md
@@ -14,7 +14,7 @@ Always use an [Entity] to present the endpoint's payload.
## Methods and parameters description
Every method must be described using the [Grape DSL](https://github.com/ruby-grape/grape#describing-methods)
-(see <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/api/environments.rb>
+(see <https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/api/environments.rb>
for a good example):
- `desc` for the method summary. You should pass it a block for additional
@@ -104,6 +104,6 @@ For instance:
- endpoint = expose_path(api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: @issue.iid))
```
-[Entity]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/api/entities.rb
+[Entity]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/api/entities.rb
[validation, and coercion of the parameters]: https://github.com/ruby-grape/grape#parameter-validation-and-coercion
[installing GitLab under a relative URL]: https://docs.gitlab.com/ee/install/relative_url.html
diff --git a/doc/development/architecture.md b/doc/development/architecture.md
index 7b2c26ef478..75562f692ad 100644
--- a/doc/development/architecture.md
+++ b/doc/development/architecture.md
@@ -614,7 +614,7 @@ GitLab Shell has a configuration file at `/home/git/gitlab-shell/config.yml`.
### Maintenance Tasks
-[GitLab](https://gitlab.com/gitlab-org/gitlab/tree/master) provides rake tasks with which you see version information and run a quick check on your configuration to ensure it is configured properly within the application. See [maintenance rake tasks](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/raketasks/maintenance.md).
+[GitLab](https://gitlab.com/gitlab-org/gitlab/tree/master) provides rake tasks with which you see version information and run a quick check on your configuration to ensure it is configured properly within the application. See [maintenance rake tasks](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/doc/raketasks/maintenance.md).
In a nutshell, do the following:
```
@@ -638,7 +638,7 @@ We've also detailed [our architecture of GitLab.com](https://about.gitlab.com/ha
[unicorn-omnibus]: https://docs.gitlab.com/omnibus/settings/unicorn.html
[unicorn-charts]: https://docs.gitlab.com/charts/charts/gitlab/unicorn/
[unicorn-source]: ../install/installation.md#configure-it
-[gitlab-yml]: https://gitlab.com/gitlab-org/gitlab/blob/master/config/gitlab.yml.example
+[gitlab-yml]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/gitlab.yml.example
[sidekiq-omnibus]: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template
[sidekiq-charts]: https://docs.gitlab.com/charts/charts/gitlab/sidekiq/
[gitaly-omnibus]: ../administration/gitaly/index.md
diff --git a/doc/development/automatic_ce_ee_merge.md b/doc/development/automatic_ce_ee_merge.md
index 80a85e144a4..f7816091b49 100644
--- a/doc/development/automatic_ce_ee_merge.md
+++ b/doc/development/automatic_ce_ee_merge.md
@@ -85,14 +85,14 @@ for CE and EE. If the `ee-compat-check` job fails, this process is required.
This method only requires that you have cloned both CE and EE into your computer.
If you don't have them yet, please go ahead and clone them:
-- Clone CE repo: `git clone git@gitlab.com:gitlab-org/gitlab-foss.git`
-- Clone EE repo: `git clone git@gitlab.com:gitlab-org/gitlab.git`
+- Clone CE repo: `git clone git@gitlab.com:gitlab-org/gitlab-ce.git`
+- Clone EE repo: `git clone git@gitlab.com:gitlab-org/gitlab-ee.git`
And the only additional setup we need is to add CE as remote of EE and vice-versa:
- Open two terminal windows, one in CE, and another one in EE:
- - In EE: `git remote add ce git@gitlab.com:gitlab-org/gitlab-foss.git`
- - In CE: `git remote add ee git@gitlab.com:gitlab-org/gitlab.git`
+ - In EE: `git remote add ce git@gitlab.com:gitlab-org/gitlab-ce.git`
+ - In CE: `git remote add ee git@gitlab.com:gitlab-org/gitlab-ee.git`
That's all setup we need, so that we can cherry-pick a commit from CE to EE, and
from EE to CE.
diff --git a/doc/development/build_test_package.md b/doc/development/build_test_package.md
index f58ac79b6f4..21891f70d73 100644
--- a/doc/development/build_test_package.md
+++ b/doc/development/build_test_package.md
@@ -9,7 +9,7 @@ that will create:
- A deb package for Ubuntu 16.04, available as a build artifact, and
- A docker image, which is pushed to [Omnibus GitLab's container
registry](https://gitlab.com/gitlab-org/omnibus-gitlab/container_registry)
- (images titled `gitlab-foss` and `gitlab-ee` respectively and image tag is the
+ (images titled `gitlab-ce` and `gitlab-ee` respectively and image tag is the
commit which triggered the pipeline).
When you push a commit to either the GitLab CE or GitLab EE project, the
diff --git a/doc/development/contributing/merge_request_workflow.md b/doc/development/contributing/merge_request_workflow.md
index dbf9c0f4080..1931dda7151 100644
--- a/doc/development/contributing/merge_request_workflow.md
+++ b/doc/development/contributing/merge_request_workflow.md
@@ -140,7 +140,7 @@ When writing commit messages, please follow the guidelines below:
- The merge request must not contain more than 10 commit messages.
If the guidelines are not met, the MR will not pass the
-[Danger checks](https://gitlab.com/gitlab-org/gitlab/blob/master/danger/commit_messages/Dangerfile).
+[Danger checks](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/danger/commit_messages/Dangerfile).
For more information see [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/).
Example commit message template that can be used on your machine that embodies the above (guide for [how to apply template](https://codeinthehole.com/tips/a-useful-template-for-commit-messages/)):
@@ -244,5 +244,5 @@ request:
1. [The upgrade guide](../../update/upgrading_from_source.md).
1. The [GitLab Installation Guide](../../install/installation.md#1-packages-and-dependencies).
1. The [GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit).
-1. The [CI environment preparation](https://gitlab.com/gitlab-org/gitlab/blob/master/scripts/prepare_build.sh).
+1. The [CI environment preparation](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/scripts/prepare_build.sh).
1. The [Omnibus package creator](https://gitlab.com/gitlab-org/omnibus-gitlab).
diff --git a/doc/development/dangerbot.md b/doc/development/dangerbot.md
index 0b2e2b43512..a6650a50878 100644
--- a/doc/development/dangerbot.md
+++ b/doc/development/dangerbot.md
@@ -15,7 +15,7 @@ to the existing rules, then this is the document for you.
## Operation
-On startup, Danger reads a [`Dangerfile`](https://gitlab.com/gitlab-org/gitlab/blob/master/Dangerfile)
+On startup, Danger reads a [`Dangerfile`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/Dangerfile)
from the project root. GitLab's Danger code is decomposed into a set of helpers
and plugins, all within the [`danger/`](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/danger/)
subdirectory, so ours just tells Danger to load it all. Danger will then run
diff --git a/doc/development/database_review.md b/doc/development/database_review.md
index 89f4f09c86d..57cdc2135aa 100644
--- a/doc/development/database_review.md
+++ b/doc/development/database_review.md
@@ -78,7 +78,7 @@ and details for a database reviewer:
- Format any queries with a SQL query formatter, for example with [sqlformat.darold.net](http://sqlformat.darold.net).
- Consider providing query plans via a link to [explain.depesz.com](https://explain.depesz.com) or another tool instead of textual form.
- For query changes, it is best to provide the SQL query along with a plan *before* and *after* the change. This helps to spot differences quickly.
-- When providing query plans, make sure to use good parameter values, so that the query executed is a good example and also hits enough data. Usually, the `gitlab-org` namespace (`namespace_id = 9970`) and the `gitlab-org/gitlab-foss` project (`project_id = 13083`) provides enough data to serve as a good example.
+- When providing query plans, make sure to use good parameter values, so that the query executed is a good example and also hits enough data. Usually, the `gitlab-org` namespace (`namespace_id = 9970`) and the `gitlab-org/gitlab-ce` project (`project_id = 13083`) provides enough data to serve as a good example.
### How to review for database
diff --git a/doc/development/documentation/improvement-workflow.md b/doc/development/documentation/improvement-workflow.md
index c8e9368fb74..9f3b789712f 100644
--- a/doc/development/documentation/improvement-workflow.md
+++ b/doc/development/documentation/improvement-workflow.md
@@ -28,7 +28,7 @@ to accomplish their work with GitLab.
1. Follow GitLab's [Merge Request Guidelines](../contributing/merge_request_workflow.md#merge-request-guidelines).
If you need any help to choose the correct place for a doc, discuss a documentation
-idea or outline, or request any other help, ping the technical writer for the relevant
+idea or outline, or request any other help, ping the Technical Writer for the relevant
[DevOps stage](https://about.gitlab.com/handbook/product/categories/#devops-stages)
in your issue or MR, or write within `#docs` if you are a member of GitLab's Slack workspace.
@@ -39,7 +39,7 @@ This person must make a good-faith effort to ensure that the content is clear
(sufficiently easy for the intended audience to navigate and understand) and
that it meets the [Documentation Guidelines](index.md) and [Style Guide](styleguide.md).
-If the author or reviewer has any questions, or would like a technical writer's review
+If the author or reviewer has any questions, or would like a techncial writer's review
before merging, mention the writer who is assigned to the relevant [DevOps stage](https://about.gitlab.com/handbook/product/categories/#devops-stages).
The process can involve the following parties/phases, and is replicated in the `Documentation` MR template for GitLab CE and EE, to help with following the process.
diff --git a/doc/development/documentation/site_architecture/index.md b/doc/development/documentation/site_architecture/index.md
index f8d63a54053..bb598906967 100644
--- a/doc/development/documentation/site_architecture/index.md
+++ b/doc/development/documentation/site_architecture/index.md
@@ -18,8 +18,8 @@ from where content is sourced, the `gitlab-docs` project, and the published outp
```mermaid
graph LR
- A[gitlab-foss/doc]
- B[gitlab/doc]
+ A[gitlab-ce/doc]
+ B[gitlab-ee/doc]
C[gitlab-runner/docs]
D[omnibus-gitlab/doc]
E[charts/doc]
diff --git a/doc/development/documentation/styleguide.md b/doc/development/documentation/styleguide.md
index 32ac399925e..79797107a5b 100644
--- a/doc/development/documentation/styleguide.md
+++ b/doc/development/documentation/styleguide.md
@@ -253,13 +253,13 @@ table_display_block: true
---
```
-### Emphasis
+## Emphasis
- Use double asterisks (`**`) to mark a word or text in bold (`**bold**`).
- Use underscore (`_`) for text in italics (`_italic_`).
- Use greater than (`>`) for blockquotes.
-### Punctuation
+## Punctuation
Check the general punctuation rules for the GitLab documentation on the table below.
Check specific punctuation rules for [lists](#lists) below.
@@ -274,20 +274,6 @@ Check specific punctuation rules for [lists](#lists) below.
| Always add a space before and after dashes when using it in a sentence (for replacing a comma, for example). | _You should try this - or not._ |
| Always use lowercase after a colon. | _Related Issues: a way to create a relationship between issues._ |
-### Placeholder text
-
-Often in examples, a writer will provide a command or configuration that is complete apart from
-a value specific to the reader.
-
-In these cases, use [`<` and `>`](https://en.wikipedia.org/wiki/Usage_message#Pattern) to call out
-where a reader must replace text with their own value.
-
-For example:
-
-```sh
-cp <your_source_directory> <your_destination_directory>
-```
-
## Lists
- Always start list items with a capital letter, unless they are parameters or commands
diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md
index 22dd9be073f..d34c3ce5ba1 100644
--- a/doc/development/ee_features.md
+++ b/doc/development/ee_features.md
@@ -19,7 +19,7 @@ CE specs should remain untouched as much as possible and extra specs
should be added for EE. Licensed features can be stubbed using the
spec helper `stub_licensed_features` in `EE::LicenseHelpers`.
-You can force GitLab to act as CE by either deleting the `ee/` directory or by
+You can force Webpack to act as CE by either deleting the `ee/` directory or by
setting the [`IS_GITLAB_EE` environment variable](https://gitlab.com/gitlab-org/gitlab/blob/master/config/helpers/is_ee_env.js)
to something that evaluates as `false`. The same works for running tests
(for example `IS_GITLAB_EE=0 yarn jest`).
@@ -170,7 +170,7 @@ still having access the class's implementation with `super`.
There are a few gotchas with it:
-- you should always [`extend ::Gitlab::Utils::Override`](utilities.md#override) and use `override` to
+- you should always [`extend ::Gitlab::Utils::Override`](utilities.md#overridehttpsgitlabcomgitlab-orggitlab-fossblobmasterlibgitlabutilsoverriderb) and use `override` to
guard the "overrider" method to ensure that if the method gets renamed in
CE, the EE override won't be silently forgotten.
- when the "overrider" would add a line in the middle of the CE
diff --git a/doc/development/elasticsearch.md b/doc/development/elasticsearch.md
index eb90a540217..1475e356b5b 100644
--- a/doc/development/elasticsearch.md
+++ b/doc/development/elasticsearch.md
@@ -59,7 +59,7 @@ Additionally, if you need large repos or multiple forks for testing, please cons
## How does it work?
-The Elasticsearch integration depends on an external indexer. We ship an [indexer written in Go](https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer). The user must trigger the initial indexing via a rake task but, after this is done, GitLab itself will trigger reindexing when required via `after_` callbacks on create, update, and destroy that are inherited from [/ee/app/models/concerns/elastic/application_search.rb](https://gitlab.com/gitlab-org/gitlab/blob/cc723071ad337573e0360a879cbf99bc4fb7adb9/ee/app/models/concerns/elastic/application_versioned_search.rb).
+The Elasticsearch integration depends on an external indexer. We ship an [indexer written in Go](https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer). The user must trigger the initial indexing via a rake task but, after this is done, GitLab itself will trigger reindexing when required via `after_` callbacks on create, update, and destroy that are inherited from [/ee/app/models/concerns/elastic/application_search.rb](https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/models/concerns/elastic/application_search.rb).
All indexing after the initial one is done via `ElasticIndexerWorker` (sidekiq jobs).
diff --git a/doc/development/emails.md b/doc/development/emails.md
index 124d5c16fb8..91b9e11f7f6 100644
--- a/doc/development/emails.md
+++ b/doc/development/emails.md
@@ -88,15 +88,15 @@ for the format of the email key:
- Actions are always at the end, separated by `-`. For example `-issue` or `-merge-request`
- If your feature is related to a project, the key begins with the project identifiers (project path slug
- and project id), separated by `-`. For example, `gitlab-org-gitlab-foss-20`
+ and project id), separated by `-`. For example, `gitlab-org-gitlab-ce-20`
- Additional information, such as an author's token, can be added between the project identifiers and
- the action, separated by `-`. For example, `gitlab-org-gitlab-foss-20-Author_Token12345678-issue`
+ the action, separated by `-`. For example, `gitlab-org-gitlab-ce-20-Author_Token12345678-issue`
- You register your handlers in `lib/gitlab/email/handler.rb`
Examples of valid email keys:
-- `gitlab-org-gitlab-foss-20-Author_Token12345678-issue` (create a new issue)
-- `gitlab-org-gitlab-foss-20-Author_Token12345678-merge-request` (create a new merge request)
+- `gitlab-org-gitlab-ce-20-Author_Token12345678-issue` (create a new issue)
+- `gitlab-org-gitlab-ce-20-Author_Token12345678-merge-request` (create a new merge request)
- `1234567890abcdef1234567890abcdef-unsubscribe` (unsubscribe from a conversation)
- `1234567890abcdef1234567890abcdef` (reply to a conversation)
diff --git a/doc/development/fe_guide/components.md b/doc/development/fe_guide/components.md
index f8765f9e202..e88827f78c1 100644
--- a/doc/development/fe_guide/components.md
+++ b/doc/development/fe_guide/components.md
@@ -3,6 +3,7 @@
## Contents
- [Dropdowns](#dropdowns)
+- [Modals](#modals)
## Dropdowns
@@ -38,3 +39,25 @@ See also the [corresponding UX guide](https://design.gitlab.com/#/components/dro
```
[bootstrap-dropdowns]: https://getbootstrap.com/docs/3.3/javascript/#dropdowns
+
+## Modals
+
+See also the [corresponding UX guide](https://design.gitlab.com/#/components/modals).
+
+We have a reusable Vue component for modals: [vue_shared/components/gl_modal.vue](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/app/assets/javascripts/vue_shared/components/gl_modal.vue)
+
+Here is an example of how to use it:
+
+```html
+ <gl-modal
+ id="dogs-out-modal"
+ :header-title-text="s__('ModalExample|Let the dogs out?')"
+ footer-primary-button-variant="danger"
+ :footer-primary-button-text="s__('ModalExample|Let them out')"
+ @submit="letOut(theDogs)"
+ >
+ {{ s__('ModalExample|You’re about to let the dogs out.') }}
+ </gl-modal>
+```
+
+![example modal](img/gl-modal.png)
diff --git a/doc/development/fe_guide/design_patterns.md b/doc/development/fe_guide/design_patterns.md
index a7a0f39e2f3..0893299540f 100644
--- a/doc/development/fe_guide/design_patterns.md
+++ b/doc/development/fe_guide/design_patterns.md
@@ -77,4 +77,4 @@ new Foo({ container: '.my-element' });
You can find an example of the above in this [class][container-class-example];
-[container-class-example]: https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/javascripts/mini_pipeline_graph_dropdown.js
+[container-class-example]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/app/assets/javascripts/mini_pipeline_graph_dropdown.js
diff --git a/doc/development/fe_guide/frontend_faq.md b/doc/development/fe_guide/frontend_faq.md
index 36c8a03a241..2ec3f8017a1 100644
--- a/doc/development/fe_guide/frontend_faq.md
+++ b/doc/development/fe_guide/frontend_faq.md
@@ -26,7 +26,7 @@ question:
document.body.dataset.page
```
-Find here the [source code setting the attribute](https://gitlab.com/gitlab-org/gitlab/blob/cc5095edfce2b4d4083a4fb1cdc7c0a1898b9921/app/views/layouts/application.html.haml#L4).
+Find here the [source code setting the attribute](https://gitlab.com/gitlab-org/gitlab-foss/blob/cc5095edfce2b4d4083a4fb1cdc7c0a1898b9921/app/views/layouts/application.html.haml#L4).
#### Rails routes
diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md
index 22e773e8ea3..366c2894b81 100644
--- a/doc/development/fe_guide/graphql.md
+++ b/doc/development/fe_guide/graphql.md
@@ -119,6 +119,6 @@ Read more about the [Apollo] client in the [Apollo documentation](https://www.ap
[Apollo]: https://www.apollographql.com/
[vue-apollo]: https://github.com/Akryum/vue-apollo/
[feature-flags]: ../feature_flags.md
-[default-client]: https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/javascripts/lib/graphql.js
+[default-client]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/app/assets/javascripts/lib/graphql.js
[vue-test-utils]: https://vue-test-utils.vuejs.org/
[apollo-link-state]: https://www.apollographql.com/docs/link/links/state.html
diff --git a/doc/development/fe_guide/style_guide_js.md b/doc/development/fe_guide/style_guide_js.md
index e78a2f4f453..db076243812 100644
--- a/doc/development/fe_guide/style_guide_js.md
+++ b/doc/development/fe_guide/style_guide_js.md
@@ -7,7 +7,7 @@ See the relevant style guides for our guidelines and for information on linting:
We defer to [Airbnb][airbnb-js-style-guide] on most style-related
conventions and enforce them with eslint.
-See [our current .eslintrc](https://gitlab.com/gitlab-org/gitlab/blob/master/.eslintrc.yml) for specific rules and patterns.
+See [our current .eslintrc](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/.eslintrc.yml) for specific rules and patterns.
### Common
@@ -713,7 +713,7 @@ The goal of this accord is to make sure we are all on the same page.
- [SCSS](style_guide_scss.md)
[airbnb-js-style-guide]: https://github.com/airbnb/javascript
-[eslintrc]: https://gitlab.com/gitlab-org/gitlab/blob/master/.eslintrc
+[eslintrc]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/.eslintrc
[eslint-plugin-vue]: https://github.com/vuejs/eslint-plugin-vue
[eslint-plugin-vue-rules]: https://github.com/vuejs/eslint-plugin-vue#bulb-rules
[vue-order]: https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/order-in-components.md
diff --git a/doc/development/fe_guide/style_guide_scss.md b/doc/development/fe_guide/style_guide_scss.md
index 6ee843194cf..d5af19e0ea4 100644
--- a/doc/development/fe_guide/style_guide_scss.md
+++ b/doc/development/fe_guide/style_guide_scss.md
@@ -13,12 +13,12 @@ led by the [GitLab UI WG](https://gitlab.com/gitlab-com/www-gitlab-com/merge_req
#### Where are utility classes defined?
- [Bootstrap's Utility Classes](https://getbootstrap.com/docs/4.3/utilities/)
-- [`common.scss`](https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/stylesheets/framework/common.scss) (old)
-- [`utilities.scss`](https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/stylesheets/utilities.scss) (new)
+- [`common.scss`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/app/assets/stylesheets/framework/common.scss) (old)
+- [`utilities.scss`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/app/assets/stylesheets/utilities.scss) (new)
#### Where should I put new utility classes?
-New utility classes should be added to [`utilities.scss`](https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/stylesheets/utilities.scss). Existing classes include:
+New utility classes should be added to [`utilities.scss`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/app/assets/stylesheets/utilities.scss). Existing classes include:
| Name | Pattern | Example |
|------|---------|---------|
@@ -41,8 +41,8 @@ This encourages an organic growth of component classes and prevents the creation
Examples of component classes that were created using "utility-first" include:
-- [`.circle-icon-container`](https://gitlab.com/gitlab-org/gitlab/blob/579fa8b8ec7eb38d40c96521f517c9dab8c3b97a/app/assets/stylesheets/framework/icons.scss#L85)
-- [`.d-flex-center`](https://gitlab.com/gitlab-org/gitlab/blob/900083d89cd6af391d26ab7922b3f64fa2839bef/app/assets/stylesheets/framework/common.scss#L425)
+- [`.circle-icon-container`](https://gitlab.com/gitlab-org/gitlab-foss/blob/579fa8b8ec7eb38d40c96521f517c9dab8c3b97a/app/assets/stylesheets/framework/icons.scss#L85)
+- [`.d-flex-center`](https://gitlab.com/gitlab-org/gitlab-foss/blob/900083d89cd6af391d26ab7922b3f64fa2839bef/app/assets/stylesheets/framework/common.scss#L425)
Inspiration:
diff --git a/doc/development/feature_flags/controls.md b/doc/development/feature_flags/controls.md
index cbc98016024..739f4207e27 100644
--- a/doc/development/feature_flags/controls.md
+++ b/doc/development/feature_flags/controls.md
@@ -91,11 +91,11 @@ sure it is clearly communicated to your team, and the Production team if you
anticipate any potential problems.
Feature gates can also be actor based, for example a feature could first be
-enabled for only the `gitlab` project. The project is passed by supplying a
+enabled for only the `gitlab-ce` project. The project is passed by supplying a
`--project` flag:
```
-/chatops run feature set --project=gitlab-org/gitlab some_feature true
+/chatops run feature set --project=gitlab-org/gitlab-ce some_feature true
```
For groups the `--group` flag is available:
diff --git a/doc/development/file_storage.md b/doc/development/file_storage.md
index 47a6babe8bc..8d486df9a8a 100644
--- a/doc/development/file_storage.md
+++ b/doc/development/file_storage.md
@@ -146,4 +146,4 @@ end
[CarrierWave]: https://github.com/carrierwaveuploader/carrierwave
[Hashed Storage]: ../administration/repository_storage_types.md
[all-in-one rake task]: ../administration/raketasks/uploads/migrate.md
-[category list]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/tasks/gitlab/uploads/migrate.rake
+[category list]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/tasks/gitlab/uploads/migrate.rake
diff --git a/doc/development/go_guide/index.md b/doc/development/go_guide/index.md
index 33dd9dd9b6f..1e230a54023 100644
--- a/doc/development/go_guide/index.md
+++ b/doc/development/go_guide/index.md
@@ -62,8 +62,8 @@ file and ask your manager to review and merge.
```yaml
projects:
- gitlab: reviewer go
- gitlab-foss: reviewer go
+ gitlab-ee: reviewer go
+ gitlab-ce: reviewer go
```
## Code style and format
diff --git a/doc/development/gotchas.md b/doc/development/gotchas.md
index 1a9ec7eb3e1..e492b8ea7c9 100644
--- a/doc/development/gotchas.md
+++ b/doc/development/gotchas.md
@@ -147,7 +147,7 @@ refresh_service.execute(oldrev, newrev, ref)
See ["Why is it bad style to `rescue Exception => e` in Ruby?"][Exception].
_**Note:** This rule is [enforced automatically by
-Rubocop](https://gitlab.com/gitlab-org/gitlab/blob/8-4-stable/.rubocop.yml#L911-914)._
+Rubocop](https://gitlab.com/gitlab-org/gitlab-foss/blob/8-4-stable/.rubocop.yml#L911-914)._
[Exception]: http://stackoverflow.com/q/10048173/223897
@@ -156,7 +156,7 @@ Rubocop](https://gitlab.com/gitlab-org/gitlab/blob/8-4-stable/.rubocop.yml#L911-
Using the inline `:javascript` Haml filters comes with a
performance overhead. Using inline JavaScript is not a good way to structure your code and should be avoided.
-_**Note:** We've [removed these two filters](https://gitlab.com/gitlab-org/gitlab/blob/master/config/initializers/hamlit.rb)
+_**Note:** We've [removed these two filters](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/initializers/hamlit.rb)
in an initializer._
### Further reading
diff --git a/doc/development/i18n/externalization.md b/doc/development/i18n/externalization.md
index a97719fe901..b5e1641abcb 100644
--- a/doc/development/i18n/externalization.md
+++ b/doc/development/i18n/externalization.md
@@ -236,11 +236,11 @@ This makes use of [`Intl.DateTimeFormat`].
- In Ruby/HAML, we have two ways of adding format to dates and times:
1. **Through the `l` helper**, i.e. `l(active_session.created_at, format: :short)`. We have some predefined formats for
- [dates](https://gitlab.com/gitlab-org/gitlab/blob/4ab54c2233e91f60a80e5b6fa2181e6899fdcc3e/config/locales/en.yml#L54) and [times](https://gitlab.com/gitlab-org/gitlab/blob/4ab54c2233e91f60a80e5b6fa2181e6899fdcc3e/config/locales/en.yml#L262).
+ [dates](https://gitlab.com/gitlab-org/gitlab-foss/blob/v11.7.0/config/locales/en.yml#L54) and [times](https://gitlab.com/gitlab-org/gitlab-foss/blob/v11.7.0/config/locales/en.yml#L261).
If you need to add a new format, because other parts of the code could benefit from it,
- you'll need to add it to [en.yml](https://gitlab.com/gitlab-org/gitlab/blob/master/config/locales/en.yml) file.
+ you'll need to add it to [en.yml](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/locales/en.yml) file.
1. **Through `strftime`**, i.e. `milestone.start_date.strftime('%b %-d')`. We use `strftime` in case none of the formats
- defined on [en.yml](https://gitlab.com/gitlab-org/gitlab/blob/master/config/locales/en.yml) matches the date/time
+ defined on [en.yml](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/locales/en.yml) matches the date/time
specifications we need, and if there is no need to add it as a new format because is very particular (i.e. it's only used in a single view).
## Best practices
diff --git a/doc/development/import_export.md b/doc/development/import_export.md
index e9552e462c9..fcfb9bf4915 100644
--- a/doc/development/import_export.md
+++ b/doc/development/import_export.md
@@ -31,9 +31,7 @@ Read through the current performance problems using the Import/Export below.
Out of memory (OOM) errors are normally caused by the [Sidekiq Memory Killer](../administration/operations/sidekiq_memory_killer.md):
```bash
-SIDEKIQ_MEMORY_KILLER_MAX_RSS = 2000000
-SIDEKIQ_MEMORY_KILLER_HARD_LIMIT_RSS = 3000000
-SIDEKIQ_MEMORY_KILLER_GRACE_TIME = 900
+SIDEKIQ_MEMORY_KILLER_MAX_RSS = 2GB in GitLab.com
```
An import status `started`, and the following sidekiq logs will signal a memory issue:
diff --git a/doc/development/kubernetes.md b/doc/development/kubernetes.md
index 5443bdea043..5265e5b11cd 100644
--- a/doc/development/kubernetes.md
+++ b/doc/development/kubernetes.md
@@ -29,12 +29,12 @@ We use the [`kubeclient`](https://rubygems.org/gems/kubeclient) gem to
perform Kubernetes API calls. As the `kubeclient` gem does not support
different API Groups (e.g. `apis/rbac.authorization.k8s.io`) from a
single client, we have created a wrapper class,
-[`Gitlab::Kubernetes::KubeClient`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/kubernetes/kube_client.rb)
+[`Gitlab::Kubernetes::KubeClient`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/kubernetes/kube_client.rb)
that will enable you to achieve this.
Selected Kubernetes API groups are currently supported. Do add support
for new API groups or methods to
-[`Gitlab::Kubernetes::KubeClient`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/kubernetes/kube_client.rb)
+[`Gitlab::Kubernetes::KubeClient`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/kubernetes/kube_client.rb)
if you need to use them. New API groups or API group versions can be
added to `SUPPORTED_API_GROUPS` - internally, this will create an
internal client for that group. New methods can be added as a delegation
@@ -54,7 +54,7 @@ worker](sidekiq_style_guide.md).
There are instances where you would like to make calls to Kubernetes and
return the response and as such a background worker does not seem to be
a good fit. For such cases you should make use of [reactive
-caching](https://gitlab.com/gitlab-org/gitlab/blob/master/app/models/concerns/reactive_caching.rb).
+caching](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/app/models/concerns/reactive_caching.rb).
For example:
```ruby
@@ -72,7 +72,7 @@ For example:
### Testing
We have some Webmock stubs in
-[`KubernetesHelpers`](https://gitlab.com/gitlab-org/gitlab/blob/master/spec/support/helpers/kubernetes_helpers.rb)
+[`KubernetesHelpers`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/spec/support/helpers/kubernetes_helpers.rb)
which can help with mocking out calls to Kubernetes API in your tests.
## Security
@@ -87,7 +87,7 @@ a cluster.
Mitigation strategies include:
1. Not allowing redirects to attacker controller resources:
- [`Kubeclient::KubeClient`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/kubernetes/kube_client.rb#)
+ [`Kubeclient::KubeClient`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/kubernetes/kube_client.rb#)
can be configured to disallow any redirects by passing in
`http_max_redirects: 0` as an option.
1. Not exposing error messages: by doing so, we
@@ -111,7 +111,7 @@ Logs related to the Kubernetes integration can be found in
GDK install, this will be present in `log/kubernetes.log`.
Some services such as
-[`Clusters::Applications::InstallService`](https://gitlab.com/gitlab-org/gitlab/blob/master/app/services/clusters/applications/install_service.rb#L18)
+[`Clusters::Applications::InstallService`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/app/services/clusters/applications/install_service.rb#L18)
rescues `StandardError` which can make it harder to debug issues in an
development environment. The current workaround is to temporarily
comment out the `rescue` in your local development source.
diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md
index 8ed941893d3..5fded9e3aed 100644
--- a/doc/development/migration_style_guide.md
+++ b/doc/development/migration_style_guide.md
@@ -481,5 +481,5 @@ by an integer. For example: `users` would turn into `users0`
### Moving migrations from EE to CE
When migrations need to be moved from GitLab Enterprise Edition to GitLab Community Edition,
-a migration file should be moved from `ee/db/{post_,}migrate` directory in the `gitlab` project to `db/{post_,}migrate` directory in the `gitlab-foss` project. This way
+a migration file should be moved from `ee/db/{post_,}migrate` directory in the `gitlab-ee` project to `db/{post_,}migrate` directory in the `gitlab-ce` project. This way
the schema number remains intact, there is no need to modify old migrations, and proper columns, tables or data are added in the Community Edition.
diff --git a/doc/development/namespaces_storage_statistics.md b/doc/development/namespaces_storage_statistics.md
index 648f189a826..f8aea10097d 100644
--- a/doc/development/namespaces_storage_statistics.md
+++ b/doc/development/namespaces_storage_statistics.md
@@ -14,11 +14,11 @@ storage consumed by a group, and allow easy management.
## Problem
In GitLab, we update the project storage statistics through a
-[callback](https://gitlab.com/gitlab-org/gitlab/blob/4ab54c2233e91f60a80e5b6fa2181e6899fdcc3e/app/models/project.rb#L97)
+[callback](https://gitlab.com/gitlab-org/gitlab-foss/blob/v12.2.0.pre/app/models/project.rb#L90)
every time the project is saved.
The summary of those statistics per namespace is then retrieved
-by [`Namespaces#with_statistics`](https://gitlab.com/gitlab-org/gitlab/blob/4ab54c2233e91f60a80e5b6fa2181e6899fdcc3e/app/models/namespace.rb#L70) scope. Analyzing this query we noticed that:
+by [`Namespaces#with_statistics`](https://gitlab.com/gitlab-org/gitlab-foss/blob/v12.2.0.pre/app/models/namespace.rb#L70) scope. Analyzing this query we noticed that:
- It takes up to `1.2` seconds for namespaces with over `15k` projects.
- It can't be analyzed with [ChatOps](chatops_on_gitlabcom.md), as it times out.
diff --git a/doc/development/new_fe_guide/modules/dirty_submit.md b/doc/development/new_fe_guide/modules/dirty_submit.md
index dd7d5d61c4d..2ad6b8b60a3 100644
--- a/doc/development/new_fe_guide/modules/dirty_submit.md
+++ b/doc/development/new_fe_guide/modules/dirty_submit.md
@@ -8,7 +8,7 @@ Prevent submitting forms with no changes.
Currently handles `input`, `textarea` and `select` elements.
-Also, see [the code](https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/javascripts/dirty_submit/)
+Also, see [the code](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/app/assets/javascripts/dirty_submit/)
within the GitLab project.
## Usage
diff --git a/doc/development/prometheus_metrics.md b/doc/development/prometheus_metrics.md
index b479c053862..eecce9f4f11 100644
--- a/doc/development/prometheus_metrics.md
+++ b/doc/development/prometheus_metrics.md
@@ -2,7 +2,7 @@
## Adding to the library
-We strive to support the 2-4 most important metrics for each common system service that supports Prometheus. If you are looking for support for a particular exporter which has not yet been added to the library, additions can be made [to the `common_metrics.yml`](https://gitlab.com/gitlab-org/gitlab/blob/master/config/prometheus/common_metrics.yml) file.
+We strive to support the 2-4 most important metrics for each common system service that supports Prometheus. If you are looking for support for a particular exporter which has not yet been added to the library, additions can be made [to the `common_metrics.yml`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/prometheus/common_metrics.yml) file.
### Query identifier
diff --git a/doc/development/query_recorder.md b/doc/development/query_recorder.md
index 81970b45bbd..3ed75c87f6f 100644
--- a/doc/development/query_recorder.md
+++ b/doc/development/query_recorder.md
@@ -2,7 +2,7 @@
QueryRecorder is a tool for detecting the [N+1 queries problem](https://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations) from tests.
-> Implemented in [spec/support/query_recorder.rb](https://gitlab.com/gitlab-org/gitlab/blob/master/spec/support/helpers/query_recorder.rb) via [9c623e3e](https://gitlab.com/gitlab-org/gitlab-foss/commit/9c623e3e5d7434f2e30f7c389d13e5af4ede770a)
+> Implemented in [spec/support/query_recorder.rb](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/spec/support/helpers/query_recorder.rb) via [9c623e3e](https://gitlab.com/gitlab-org/gitlab-foss/commit/9c623e3e5d7434f2e30f7c389d13e5af4ede770a)
As a rule, merge requests [should not increase query counts](merge_request_performance_guidelines.md#query-counts). If you find yourself adding something like `.includes(:author, :assignee)` to avoid having `N+1` queries, consider using QueryRecorder to enforce this with a test. Without this, a new feature which causes an additional model to be accessed will silently reintroduce the problem.
diff --git a/doc/development/routing.md b/doc/development/routing.md
index e0741e78821..0b95477974b 100644
--- a/doc/development/routing.md
+++ b/doc/development/routing.md
@@ -57,9 +57,9 @@ client or other software requires something different.
Examples:
```
-gitlab-org/gitlab/-/activity
-gitlab-org/gitlab/-/jobs/123
-gitlab-org/gitlab/-/settings/repository
+gitlab-org/gitlab-ce/-/activity
+gitlab-org/gitlab-ce/-/jobs/123
+gitlab-org/gitlab-ce/-/settings/repository
gitlab-org/serverless/runtimes/-/settings/repository
```
diff --git a/doc/development/testing_guide/end_to_end/index.md b/doc/development/testing_guide/end_to_end/index.md
index ca853f06a24..9685a61d0c1 100644
--- a/doc/development/testing_guide/end_to_end/index.md
+++ b/doc/development/testing_guide/end_to_end/index.md
@@ -52,7 +52,7 @@ graph LR
A1 -.->|1. Triggers an omnibus-gitlab pipeline and wait for it to be done| A2
B2[`Trigger-qa` stage<br>`Trigger:qa-test` job] -.->|2. Triggers a gitlab-qa pipeline and wait for it to be done| A3
-subgraph "gitlab-foss/gitlab pipeline"
+subgraph "gitlab-ce/ee pipeline"
A1[`test` stage<br>`package-and-qa-manual` job]
end
@@ -135,7 +135,8 @@ Continued reading:
You can ask question in the `#quality` channel on Slack (GitLab internal) or
you can find an issue you would like to work on in
-[the `gitlab` issue tracker][gitlab-issues], or
+[the `gitlab-ce` issue tracker][gitlab-ce-issues],
+[the `gitlab-ee` issue tracker][gitlab-ce-issues], or
[the `gitlab-qa` issue tracker][gitlab-qa-issues].
[omnibus-gitlab]: https://gitlab.com/gitlab-org/omnibus-gitlab
@@ -146,7 +147,8 @@ you can find an issue you would like to work on in
[review-apps]: ../review_apps.md
[gitlab-qa-architecture]: https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/architecture.md
[gitlab-qa-issues]: https://gitlab.com/gitlab-org/gitlab-qa/issues?label_name%5B%5D=new+scenario
-[gitlab-issues]: https://gitlab.com/gitlab-org/gitlab/issues?label_name[]=QA&label_name[]=test
+[gitlab-ce-issues]: https://gitlab.com/gitlab-org/gitlab-foss/issues?label_name[]=QA&label_name[]=test
+[gitlab-ee-issues]: https://gitlab.com/gitlab-org/gitlab/issues?label_name[]=QA&label_name[]=test
[test environment orchestration scenarios]: https://gitlab.com/gitlab-org/gitlab-qa/tree/master/lib/gitlab/qa/scenario
[instance-level scenarios]: https://gitlab.com/gitlab-org/gitlab-foss/tree/master/qa/qa/specs/features
[Page objects documentation]: https://gitlab.com/gitlab-org/gitlab/tree/master/qa/qa/page/README.md
diff --git a/doc/development/testing_guide/end_to_end/quick_start_guide.md b/doc/development/testing_guide/end_to_end/quick_start_guide.md
index db32a9a87cf..f5a46d574b0 100644
--- a/doc/development/testing_guide/end_to_end/quick_start_guide.md
+++ b/doc/development/testing_guide/end_to_end/quick_start_guide.md
@@ -24,7 +24,7 @@ If you don't exactly understand what we mean by **not everything needs to happen
### 0. Are end-to-end tests needed?
-At GitLab we respect the [test pyramid](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/testing_guide/testing_levels.md), and so, we recommend you check the code coverage of a specific feature before writing end-to-end tests, for both [CE](https://gitlab-org.gitlab.io/gitlab-foss/coverage-ruby/#_AllFiles) and [EE](https://gitlab-org.gitlab.io/gitlab/coverage-ruby/#_AllFiles) projects.
+At GitLab we respect the [test pyramid](https://gitlab.com/gitlab-org/gitlab/blob/master/doc/development/testing_guide/testing_levels.md), and so, we recommend you check the code coverage of a specific feature before writing end-to-end tests, for both [CE](https://gitlab-org.gitlab.io/gitlab-ce/coverage-ruby/#_AllFiles) and [EE](https://gitlab-org.gitlab.io/gitlab-ee/coverage-ruby/#_AllFiles) projects.
Sometimes you may notice that there is already good coverage in other test levels, and we can stay confident that if we break a feature, we will still have quick feedback about it, even without having end-to-end tests.
diff --git a/doc/development/testing_guide/flaky_tests.md b/doc/development/testing_guide/flaky_tests.md
index f91fc3115d7..8e73b3d9ae9 100644
--- a/doc/development/testing_guide/flaky_tests.md
+++ b/doc/development/testing_guide/flaky_tests.md
@@ -51,7 +51,7 @@ is detected in any other branch (`flaky-examples-check` job). In the future, the
This was originally implemented in: <https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/13021>.
[rspec-retry]: https://github.com/NoRedInk/rspec-retry
-[`spec/spec_helper.rb`]: https://gitlab.com/gitlab-org/gitlab/blob/master/spec/spec_helper.rb
+[`spec/spec_helper.rb`]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/spec/spec_helper.rb
## Problems we had in the past at GitLab
diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md
index ddb15b646cc..da843218d8b 100644
--- a/doc/development/testing_guide/frontend_testing.md
+++ b/doc/development/testing_guide/frontend_testing.md
@@ -38,7 +38,7 @@ which could arise (especially with testing against browser specific features).
- Jest runs in a Node.js environment, not in a browser. Support for running Jest tests in a browser [is planned](https://gitlab.com/gitlab-org/gitlab-foss/issues/58205).
- Because Jest runs in a Node.js environment, it uses [jsdom](https://github.com/jsdom/jsdom) by default. See also its [limitations](#limitations-of-jsdom) below.
- Jest does not have access to Webpack loaders or aliases.
- The aliases used by Jest are defined in its [own config](https://gitlab.com/gitlab-org/gitlab/blob/master/jest.config.js).
+ The aliases used by Jest are defined in its [own config](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/jest.config.js).
- All calls to `setTimeout` and `setInterval` are mocked away. See also [Jest Timer Mocks](https://jestjs.io/docs/en/timer-mocks).
- `rewire` is not required because Jest supports mocking modules. See also [Manual Mocks](https://jestjs.io/docs/en/manual-mocks).
- No [context object](https://jasmine.github.io/tutorials/your_first_suite#section-The_%3Ccode%3Ethis%3C/code%3E_keyword) is passed to tests in Jest.
@@ -67,13 +67,13 @@ Running `yarn jest-debug` will run Jest in debug mode, allowing you to debug/ins
### Timeout error
The default timeout for Jest is set in
-[`/spec/frontend/test_setup.js`](https://gitlab.com/gitlab-org/gitlab/blob/master/spec/frontend/test_setup.js).
+[`/spec/frontend/test_setup.js`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/spec/frontend/test_setup.js).
If your test exceeds that time, it will fail.
If you cannot improve the performance of the tests, you can increase the timeout
for a specific test using
-[`setTestTimeout`](https://gitlab.com/gitlab-org/gitlab/blob/master/spec/frontend/helpers/timeout.js).
+[`setTestTimeout`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/spec/frontend/helpers/timeout.js).
```javascript
import { setTestTimeout } from 'helpers/timeout';
@@ -388,7 +388,7 @@ it('renders something', done => {
##### `setTimeout()` / `setInterval()` in application
If the application itself is waiting for some time, mock await the waiting. In Jest this is already
-[done by default](https://gitlab.com/gitlab-org/gitlab/blob/a2128edfee799e49a8732bfa235e2c5e14949c68/jest.config.js#L47)
+[done by default](https://gitlab.com/gitlab-org/gitlab-foss/blob/a2128edfee799e49a8732bfa235e2c5e14949c68/jest.config.js#L47)
(see also [Jest Timer Mocks](https://jestjs.io/docs/en/timer-mocks)). In Karma you can use the
[Jasmine mock clock](https://jasmine.github.io/api/2.9/Clock.html).
@@ -1048,7 +1048,7 @@ testAction(
);
```
-Check an example in [spec/javascripts/ide/stores/actions_spec.jsspec/javascripts/ide/stores/actions_spec.js](https://gitlab.com/gitlab-org/gitlab/blob/master/spec/javascripts/ide/stores/actions_spec.js).
+Check an example in [spec/javascripts/ide/stores/actions_spec.jsspec/javascripts/ide/stores/actions_spec.js](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/spec/javascripts/ide/stores/actions_spec.js).
### Vue Helper: `mountComponent`
diff --git a/doc/development/testing_guide/review_apps.md b/doc/development/testing_guide/review_apps.md
index 0d7c858dc67..8ce25376a05 100644
--- a/doc/development/testing_guide/review_apps.md
+++ b/doc/development/testing_guide/review_apps.md
@@ -16,23 +16,23 @@ graph TD
review-build-cng -->|once the `review-build-cng` job is done| review-deploy
review-deploy -->|once the `review-deploy` job is done| review-qa-smoke
-subgraph "1. gitlab-foss/gitlab `prepare` stage"
+subgraph "1. gitlab-ce/ee `prepare` stage"
build-qa-image
end
-subgraph "2. gitlab-foss/gitlab `test` stage"
+subgraph "2. gitlab-ce/ee `test` stage"
gitlab:assets:compile
end
-subgraph "3. gitlab-foss/gitlab `review-prepare` stage"
+subgraph "3. gitlab-ce/ee `review-prepare` stage"
review-build-cng
end
-subgraph "4. gitlab-foss/gitlab `review` stage"
+subgraph "4. gitlab-ce/ee `review` stage"
review-deploy["review-deploy<br><br>Helm deploys the Review App using the Cloud<br/>Native images built by the CNG-mirror pipeline.<br><br>Cloud Native images are deployed to the `review-apps-ce` or `review-apps-ee`<br>Kubernetes (GKE) cluster, in the GCP `gitlab-review-apps` project."]
end
-subgraph "5. gitlab-foss/gitlab `qa` stage"
+subgraph "5. gitlab-ce/ee `qa` stage"
review-qa-smoke[review-qa-smoke<br><br>gitlab-qa runs the smoke suite against the Review App.]
end
@@ -193,7 +193,7 @@ The following items may help diagnose this:
- [Instance Group size in GCP](https://console.cloud.google.com/compute/instanceGroups/details/us-central1-b/gke-review-apps-ee-preemp-n1-standard-8affc0f5-grp?project=gitlab-review-apps&tab=monitoring&graph=GCE_SIZE&duration=P30D) - aids in identifying load spikes on the cluster. Kubernetes will add nodes up to 220 based on total resource requests.
- `kubectl top nodes --sort-by=cpu` - can identify if node spikes are common or load on specific nodes which may get rebalanced by the Kubernetes scheduler.
- `kubectl top pods --sort-by=cpu` -
-- [K9s] - K9s is a powerful command line dashboard which allows you to filter by labels. This can help identify trends with apps exceeding the [review-app resource requests](https://gitlab.com/gitlab-org/gitlab/blob/master/scripts/review_apps/base-config.yaml). Kubernetes will schedule pods to nodes based on resource requests and allow for CPU usage up to the limits.
+- [K9s] - K9s is a powerful command line dashboard which allows you to filter by labels. This can help identify trends with apps exceeding the [review-app resource requests](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/scripts/review_apps/base-config.yaml). Kubernetes will schedule pods to nodes based on resource requests and allow for CPU usage up to the limits.
- In K9s you can sort or add filters by typing the `/` character
- `-lrelease=<review-app-slug>` - filters down to all pods for a release. This aids in determining what is having issues in a single deployment
- `-lapp=<app>` - filters down to all pods for a specific app. This aids in determining resource usage by app.
@@ -311,8 +311,8 @@ find a way to limit it to only us.**
[review-apps-ee]: https://console.cloud.google.com/kubernetes/clusters/details/us-central1-b/review-apps-ee?project=gitlab-review-apps
[review-apps.sh]: https://gitlab.com/gitlab-org/gitlab/blob/master/scripts/review_apps/review-apps.sh
[automated_cleanup.rb]: https://gitlab.com/gitlab-org/gitlab/blob/master/scripts/review_apps/automated_cleanup.rb
-[Auto-DevOps.gitlab-ci.yml]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
-[gitlab-ci-yml]: https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml
+[Auto-DevOps.gitlab-ci.yml]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
+[gitlab-ci-yml]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/.gitlab-ci.yml
[gitlab-k8s-integration]: ../../user/project/clusters/index.md
[K9s]: https://github.com/derailed/k9s
[password-bug]: https://gitlab.com/gitlab-org/gitlab-foss/issues/53621
diff --git a/doc/development/testing_guide/testing_levels.md b/doc/development/testing_guide/testing_levels.md
index c59ca66cfd9..b9436abf856 100644
--- a/doc/development/testing_guide/testing_levels.md
+++ b/doc/development/testing_guide/testing_levels.md
@@ -99,7 +99,7 @@ Formal definitions:
- <https://en.wikipedia.org/wiki/White-box_testing>
These kind of tests ensure the GitLab *Rails* application (i.e.
-`gitlab-foss`/`gitlab`) works as expected from a *browser* point of view.
+`gitlab-ce`/`gitlab-ee`) works as expected from a *browser* point of view.
Note that:
diff --git a/doc/development/uploads.md b/doc/development/uploads.md
index 0ceeb57266a..1af3e9db954 100644
--- a/doc/development/uploads.md
+++ b/doc/development/uploads.md
@@ -209,8 +209,8 @@ This is the more advanced acceleration technique we have in place.
Workhorse asks rails for temporary pre-signed object storage URLs and directly uploads to object storage.
In this setup an extra rails route needs to be implemented in order to handle authorization,
-you can see an example of this in [`Projects::LfsStorageController`](https://gitlab.com/gitlab-org/gitlab/blob/cc723071ad337573e0360a879cbf99bc4fb7adb9/app/controllers/projects/lfs_storage_controller.rb)
-and [its routes](https://gitlab.com/gitlab-org/gitlab/blob/cc723071ad337573e0360a879cbf99bc4fb7adb9/config/routes/git_http.rb#L31-32).
+you can see an example of this in [`Projects::LfsStorageController`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/app/controllers/projects/lfs_storage_controller.rb)
+and [its routes](https://gitlab.com/gitlab-org/gitlab-foss/blob/v12.2.0/config/routes/git_http.rb#L31-32).
**note:** this will fallback to _Workhorse disk acceleration_ when object storage is not enabled in the gitlab instance. The answer to the `/authorize` call will only contain a file system path.
diff --git a/doc/development/utilities.md b/doc/development/utilities.md
index 38e416d68e4..11de0d56ef3 100644
--- a/doc/development/utilities.md
+++ b/doc/development/utilities.md
@@ -2,9 +2,7 @@
We developed a number of utilities to ease development.
-## `MergeHash`
-
-Refer to: <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/merge_hash.rb>:
+## [`MergeHash`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/utils/merge_hash.rb)
- Deep merges an array of hashes:
@@ -47,9 +45,7 @@ Refer to: <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/mer
[:hello, "world", :this, :crushes, "an entire", "hash"]
```
-## `Override`
-
-Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/override.rb>:
+## [`Override`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/utils/override.rb)
- This utility could help us check if a particular method would override
another method or not. It has the same idea of Java's `@Override` annotation
@@ -94,9 +90,7 @@ Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/over
end
```
-## `StrongMemoize`
-
-Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/strong_memoize.rb>:
+## [`StrongMemoize`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/utils/strong_memoize.rb)
- Memoize the value even if it is `nil` or `false`.
@@ -142,9 +136,7 @@ Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/utils/stro
Find.new.clear_memoization(:result)
```
-## `RequestCache`
-
-Refer to <https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/cache/request_cache.rb>.
+## [`RequestCache`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/cache/request_cache.rb)
This module provides a simple way to cache values in RequestStore,
and the cache key would be based on the class name, method name,
diff --git a/doc/downgrade_ee_to_ce/README.md b/doc/downgrade_ee_to_ce/README.md
index db4bbe8ae39..0dc029a4cd1 100644
--- a/doc/downgrade_ee_to_ce/README.md
+++ b/doc/downgrade_ee_to_ce/README.md
@@ -90,7 +90,7 @@ your GitLab installation with the Community Edition's remote, fetch the latest
changes, and checkout the latest stable branch:
```sh
-git remote set-url origin git@gitlab.com:gitlab-org/gitlab-foss.git
+git remote set-url origin git@gitlab.com:gitlab-org/gitlab-ce.git
git fetch --all
git checkout 8-x-stable
```
diff --git a/doc/gitlab-basics/start-using-git.md b/doc/gitlab-basics/start-using-git.md
index 8d4320f7d44..385f69e62ab 100644
--- a/doc/gitlab-basics/start-using-git.md
+++ b/doc/gitlab-basics/start-using-git.md
@@ -110,8 +110,8 @@ and paste in your command line.
As an example, consider this repository path:
-- HTTPS: `https://gitlab.com/gitlab-org/gitlab.git`
-- SSH: `git@gitlab.com:gitlab-org/gitlab.git`
+- HTTPS: `https://gitlab.com/gitlab-org/gitlab-foss.git`
+- SSH: `git@gitlab.com:gitlab-org/gitlab-ce.git`
To get started, open a terminal window in the directory you wish to clone the repository
files into, and run one of the following commands.
@@ -119,13 +119,13 @@ files into, and run one of the following commands.
Clone via HTTPS:
```bash
-git clone https://gitlab.com/gitlab-org/gitlab.git
+git clone https://gitlab.com/gitlab-org/gitlab-foss.git
```
Clone via SSH:
```bash
-git clone git@gitlab.com:gitlab-org/gitlab.git
+git clone git@gitlab.com:gitlab-org/gitlab-ce.git
```
Both commands will download a copy of the files in a folder named after the project's
diff --git a/doc/integration/bitbucket.md b/doc/integration/bitbucket.md
index 63ffa69e606..1973d18ca34 100644
--- a/doc/integration/bitbucket.md
+++ b/doc/integration/bitbucket.md
@@ -137,7 +137,7 @@ you can [disable Sign-Ins in the admin panel](omniauth.md#enable-or-disable-sign
[init-oauth]: omniauth.md#initial-omniauth-configuration
[bb-import]: ../workflow/importing/import_projects_from_bitbucket.md
-[bb-old]: https://gitlab.com/gitlab-org/gitlab/blob/8-14-stable/doc/integration/bitbucket.md
+[bb-old]: https://gitlab.com/gitlab-org/gitlab-foss/blob/8-14-stable/doc/integration/bitbucket.md
[bitbucket-docs]: https://confluence.atlassian.com/bitbucket/use-the-ssh-protocol-with-bitbucket-cloud-221449711.html#UsetheSSHprotocolwithBitbucketCloud-KnownhostorBitbucket%27spublickeyfingerprints
[reconfigure GitLab]: ../administration/restart_gitlab.md#omnibus-gitlab-reconfigure
[restart]: ../administration/restart_gitlab.md#installations-from-source
diff --git a/doc/integration/kerberos.md b/doc/integration/kerberos.md
index 4a08ca9fdea..1888d7c51d5 100644
--- a/doc/integration/kerberos.md
+++ b/doc/integration/kerberos.md
@@ -46,7 +46,7 @@ sudo chmod 0600 /etc/http.keytab
For source installations, make sure the `kerberos` gem group
[has been installed](../install/installation.md#install-gems).
-1. Edit the `kerberos` section of [`gitlab.yml`](https://gitlab.com/gitlab-org/gitlab/blob/master/config/gitlab.yml.example) to enable Kerberos ticket-based
+1. Edit the `kerberos` section of [`gitlab.yml`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/gitlab.yml.example) to enable Kerberos ticket-based
authentication. In most cases, you only need to enable Kerberos and specify
the location of the keytab:
@@ -153,7 +153,7 @@ keep offering only `basic` authentication.
listen [::]:8443 ipv6only=on ssl;
```
-1. Update the `kerberos` section of [`gitlab.yml`](https://gitlab.com/gitlab-org/gitlab/blob/master/config/gitlab.yml.example):
+1. Update the `kerberos` section of [`gitlab.yml`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/gitlab.yml.example):
```yaml
kerberos:
@@ -203,7 +203,7 @@ remove the OmniAuth provider named `kerberos` from your `gitlab.yml` /
**For installations from source**
-1. Edit [`gitlab.yml`](https://gitlab.com/gitlab-org/gitlab/blob/master/config/gitlab.yml.example) and remove the `- { name: 'kerberos' }` line under omniauth
+1. Edit [`gitlab.yml`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/gitlab.yml.example) and remove the `- { name: 'kerberos' }` line under omniauth
providers:
```yaml
diff --git a/doc/integration/omniauth.md b/doc/integration/omniauth.md
index 569f6c172e3..30a4c348c22 100644
--- a/doc/integration/omniauth.md
+++ b/doc/integration/omniauth.md
@@ -192,7 +192,7 @@ from the Omniauth provider's documentation.
sudo service gitlab stop
```
-- Add the gem to your [Gemfile](https://gitlab.com/gitlab-org/gitlab/blob/master/Gemfile):
+- Add the gem to your [Gemfile](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/Gemfile):
```sh
gem "omniauth-your-auth-provider"
diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md
index 563a62de26f..cc43a120e22 100644
--- a/doc/raketasks/backup_restore.md
+++ b/doc/raketasks/backup_restore.md
@@ -277,7 +277,7 @@ Starting with GitLab 7.4 you can let the backup script upload the '.tar' file it
It uses the [Fog library](http://fog.io/) to perform the upload.
In the example below we use Amazon S3 for storage, but Fog also lets you use
[other storage providers](http://fog.io/storage/). GitLab
-[imports cloud drivers](https://gitlab.com/gitlab-org/gitlab/blob/30f5b9a5b711b46f1065baf755e413ceced5646b/Gemfile#L88)
+[imports cloud drivers](https://gitlab.com/gitlab-org/gitlab-foss/blob/30f5b9a5b711b46f1065baf755e413ceced5646b/Gemfile#L88)
for AWS, Google, OpenStack Swift, Rackspace and Aliyun as well. A local driver is
[also available](#uploading-to-locally-mounted-shares).
diff --git a/doc/raketasks/cleanup.md b/doc/raketasks/cleanup.md
index 957f583cd7d..e2ec58be367 100644
--- a/doc/raketasks/cleanup.md
+++ b/doc/raketasks/cleanup.md
@@ -19,7 +19,7 @@ bundle exec rake gitlab:cleanup:dirs RAILS_ENV=production
DANGER: **Danger:**
The following task does not currently work as expected.
The use will probably mark more existing repositories as orphaned.
-For more information, see the [issue](https://gitlab.com/gitlab-org/gitlab/issues/24633).
+For more information, see the [issue](https://gitlab.com/gitlab-org/gitlab-ee/issues/24633).
Rename repositories from all repository storage paths if they don't exist in GitLab database.
The repositories get a `+orphaned+TIMESTAMP` suffix so that they cannot block new repositories from being created.
diff --git a/doc/raketasks/import.md b/doc/raketasks/import.md
index 5f11af0213d..b6253bbecdc 100644
--- a/doc/raketasks/import.md
+++ b/doc/raketasks/import.md
@@ -100,7 +100,7 @@ the Git repository's config file. This section is formatted as follows:
```
[gitlab]
- fullpath = gitlab-org/gitlab
+ fullpath = gitlab-org/gitlab-ce
```
However, existing repositories were not migrated to include this path.
@@ -129,7 +129,7 @@ Until then, you may wish to manually migrate repositories yourself. You can use
to do so. In a Rails console session, run the following to migrate a project:
```
-project = Project.find_by_full_path('gitlab-org/gitlab')
+project = Project.find_by_full_path('gitlab-org/gitlab-ce')
project.write_repository_config
```
diff --git a/doc/security/crime_vulnerability.md b/doc/security/crime_vulnerability.md
index 1f367905ee1..6e0a62b6510 100644
--- a/doc/security/crime_vulnerability.md
+++ b/doc/security/crime_vulnerability.md
@@ -60,7 +60,7 @@ vulnerability.
- Tenable Network Security, Inc. ["Transport Layer Security (TLS) Protocol CRIME Vulnerability"][nessus]
- Wikipedia contributors, ["CRIME"][wiki-crime] Wikipedia, The Free Encyclopedia
-[source-nginx]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/support/nginx/gitlab-ssl
+[source-nginx]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/support/nginx/gitlab-ssl
[omnibus-nginx]: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb
[ngx-spdy]: http://nginx.org/en/docs/http/ngx_http_spdy_module.html
[nessus]: https://www.tenable.com/plugins/index.php?view=single&id=62565
diff --git a/doc/topics/autodevops/index.md b/doc/topics/autodevops/index.md
index f7c741b7af5..e42c89ac567 100644
--- a/doc/topics/autodevops/index.md
+++ b/doc/topics/autodevops/index.md
@@ -1265,7 +1265,7 @@ curl --data "value=true" --header "PRIVATE-TOKEN: personal_access_token" https:/
[review-app]: ../../ci/review_apps/index.md
[container-registry]: ../../user/packages/container_registry/index.md
[postgresql]: https://www.postgresql.org/
-[Auto DevOps template]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
+[Auto DevOps template]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
[ee]: https://about.gitlab.com/pricing/
[ce-21955]: https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/21955
[ce-19507]: https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/19507
diff --git a/doc/update/upgrading_from_source.md b/doc/update/upgrading_from_source.md
index b1014ab5e03..d0265781777 100644
--- a/doc/update/upgrading_from_source.md
+++ b/doc/update/upgrading_from_source.md
@@ -274,7 +274,7 @@ longer handles setting it.
If you are using Apache instead of NGINX please see the updated [Apache templates].
Also note that because Apache does not support upstreams behind Unix sockets you
will need to let GitLab Workhorse listen on a TCP port. You can do this
-via [`/etc/default/gitlab`](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/support/init.d/gitlab.default.example#L38).
+via [`/etc/default/gitlab`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/support/init.d/gitlab.default.example#L38).
#### SMTP configuration
@@ -400,7 +400,7 @@ sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
If you have more than one backup `*.tar` file(s) please add `BACKUP=timestamp_of_backup` to the command above.
-[yaml]: https://gitlab.com/gitlab-org/gitlab/blob/master/config/gitlab.yml.example
-[gl-example]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/support/init.d/gitlab.default.example
-[smtp_settings.rb.sample]: https://gitlab.com/gitlab-org/gitlab/blob/master/config/initializers/smtp_settings.rb.sample#L13
+[yaml]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/gitlab.yml.example
+[gl-example]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/support/init.d/gitlab.default.example
+[smtp_settings.rb.sample]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/config/initializers/smtp_settings.rb.sample#L13
[Apache templates]: https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apache
diff --git a/doc/user/analytics/cycle_analytics.md b/doc/user/analytics/cycle_analytics.md
index 743b0c217d7..7a966f92934 100644
--- a/doc/user/analytics/cycle_analytics.md
+++ b/doc/user/analytics/cycle_analytics.md
@@ -1,7 +1,7 @@
# Cycle Analytics
> - Introduced prior to GitLab 12.3 at the project level.
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/12077) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.3 at the group level.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/12077) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.3 at the group level.
Cycle Analytics measures the time spent to go from an [idea to production] - also known
as cycle time - for each of your projects. Cycle Analytics displays the median time for an idea to
diff --git a/doc/user/analytics/productivity_analytics.md b/doc/user/analytics/productivity_analytics.md
index bd3cbd62ba0..a53ef56bbf7 100644
--- a/doc/user/analytics/productivity_analytics.md
+++ b/doc/user/analytics/productivity_analytics.md
@@ -1,6 +1,6 @@
# Productivity Analytics **(PREMIUM)**
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/12079) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.3 (enabled by feature flags `productivity_analytics`).
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/12079) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.3 (enabled by feature flags `productivity_analytics`).
Track development velocity with Productivity Analytics.
@@ -12,8 +12,6 @@ Software Development Life Cycle (SDLC) process, Productivity Analytics provides
Productivity can slow down for many reasons ranging from degrading code base to quickly growing teams. In order to investigate, department or team leaders can start by visualizing the time it takes for merge requests to be merged.
-By default, a data migration job covering three months of historical data will kick off when deploying Productivity Analytics for the first time.
-
## Supported features
Productivity Analytics allows GitLab users to:
@@ -21,6 +19,7 @@ Productivity Analytics allows GitLab users to:
- Visualize typical merge request (MR) lifetime and statistics. Use a histogram that shows the distribution of the time elapsed between creating and merging merge requests.
- Drill down into the most time consuming merge requests, select a number of outliers, and filter down all subsequent charts to investigate potential causes.
- Filter by group, project, author, label, milestone, or a specific date range. Filter down, for example, to the merge requests of a specific author in a group or project during a milestone or specific date range.
+- Measure velocity over time. Visualize the trends of each metric from the charts above over time in order to observe progress. Zoom in on a particular date range if you notice outliers.
## Accessing metrics and visualizations
@@ -40,7 +39,9 @@ The following metrics and visualizations are available on a project or group lev
- Number of commits per merge request.
- Number of lines of code per commit.
- Number of files touched.
-- Table showing the list of merge requests with their respective time duration metrics.
+- Scatterplot showing all MRs merged on a certain date, together with the days it took to complete the action and a 30 day rolling median.
+ - Users can zoom in and out on specific days of interest.
+- Table showing list of merge requests with their respective times and size metrics.
- Users can sort by any of the above metrics.
## Permissions
diff --git a/doc/user/clusters/applications.md b/doc/user/clusters/applications.md
index 3da6424170f..8a53b4c0e47 100644
--- a/doc/user/clusters/applications.md
+++ b/doc/user/clusters/applications.md
@@ -86,7 +86,7 @@ NOTE: **Note:**
The
[jetstack/cert-manager](https://github.com/jetstack/cert-manager)
chart is used to install this application with a
-[`values.yaml`](https://gitlab.com/gitlab-org/gitlab/blob/master/vendor/cert_manager/values.yaml)
+[`values.yaml`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/vendor/cert_manager/values.yaml)
file. Prior to GitLab 12.3,
the [stable/cert-manager](https://github.com/helm/charts/tree/master/stable/cert-manager)
chart was used.
@@ -109,7 +109,7 @@ NOTE: **Note:**
The
[runner/gitlab-runner](https://gitlab.com/gitlab-org/charts/gitlab-runner)
chart is used to install this application with a
-[`values.yaml`](https://gitlab.com/gitlab-org/gitlab/blob/master/vendor/runner/values.yaml)
+[`values.yaml`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/vendor/runner/values.yaml)
file.
### Ingress
@@ -126,7 +126,7 @@ NOTE: **Note:**
The
[stable/nginx-ingress](https://github.com/helm/charts/tree/master/stable/nginx-ingress)
chart is used to install this application with a
-[`values.yaml`](https://gitlab.com/gitlab-org/gitlab/blob/master/vendor/ingress/values.yaml)
+[`values.yaml`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/vendor/ingress/values.yaml)
file.
#### Modsecurity Application Firewall
@@ -188,7 +188,7 @@ NOTE: **Note:**
The
[jupyter/jupyterhub](https://jupyterhub.github.io/helm-chart/)
chart is used to install this application with a
-[`values.yaml`](https://gitlab.com/gitlab-org/gitlab/blob/master/vendor/jupyter/values.yaml)
+[`values.yaml`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/vendor/jupyter/values.yaml)
file.
#### Jupyter Git Integration
@@ -255,7 +255,7 @@ NOTE: **Note:**
The
[stable/prometheus](https://github.com/helm/charts/tree/master/stable/prometheus)
chart is used to install this application with a
-[`values.yaml`](https://gitlab.com/gitlab-org/gitlab/blob/master/vendor/prometheus/values.yaml)
+[`values.yaml`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/vendor/prometheus/values.yaml)
file.
## Upgrading applications
@@ -281,7 +281,7 @@ To upgrade an application:
NOTE: **Note:**
Upgrades will reset values back to the values built into the `runner`
chart plus the values set by
-[`values.yaml`](https://gitlab.com/gitlab-org/gitlab/blob/master/vendor/runner/values.yaml)
+[`values.yaml`](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/vendor/runner/values.yaml)
## Uninstalling applications
diff --git a/doc/user/clusters/environments.md b/doc/user/clusters/environments.md
index ed56463d0a5..4aef871af55 100644
--- a/doc/user/clusters/environments.md
+++ b/doc/user/clusters/environments.md
@@ -1,6 +1,6 @@
# Cluster Environments **(PREMIUM)**
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/13392) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.3.
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/13392) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.3.
Cluster environments provide a consolidated view of which CI [environments](../../ci/environments.md) are
deployed to the Kubernetes cluster and it:
@@ -14,7 +14,7 @@ NOTE: **Note:**
Cluster environments are only available for
[group-level clusters](../group/clusters/index.md).
Support for [instance-level](../instance/clusters/index.md) clusters is
-[planned](https://gitlab.com/gitlab-org/gitlab-foss/issues/63985).
+[planned](https://gitlab.com/gitlab-org/gitlab-ce/issues/63985).
With cluster environments, you can gain insight into:
diff --git a/doc/user/gitlab_com/index.md b/doc/user/gitlab_com/index.md
index 7340ba713ff..463ce2056fc 100644
--- a/doc/user/gitlab_com/index.md
+++ b/doc/user/gitlab_com/index.md
@@ -177,15 +177,11 @@ sentry_dsn = "X"
GitLab.com runs [Sidekiq][sidekiq] with arguments `--timeout=4 --concurrency=4`
and the following environment variables:
-| Setting | GitLab.com | Default |
-|-------- |----------- |-------- |
-| `SIDEKIQ_DAEMON_MEMORY_KILLER` | - | - |
-| `SIDEKIQ_MEMORY_KILLER_MAX_RSS` | `16000000` | `2000000` |
-| `SIDEKIQ_MEMORY_KILLER_HARD_LIMIT_RSS` | - | - |
-| `SIDEKIQ_MEMORY_KILLER_CHECK_INTERVAL` | - | `3` |
-| `SIDEKIQ_MEMORY_KILLER_GRACE_TIME` | - | `900` |
-| `SIDEKIQ_MEMORY_KILLER_SHUTDOWN_WAIT` | - | `30` |
-| `SIDEKIQ_LOG_ARGUMENTS` | `1` | - |
+| Setting | GitLab.com | Default |
+|-------- |----------- |-------- |
+| `SIDEKIQ_MEMORY_KILLER_MAX_RSS` | `1000000` | `2000000` |
+| `SIDEKIQ_MEMORY_KILLER_SHUTDOWN_SIGNAL` | `SIGKILL` | - |
+| `SIDEKIQ_LOG_ARGUMENTS` | `1` | - |
## Cron jobs
diff --git a/doc/user/group/saml_sso/index.md b/doc/user/group/saml_sso/index.md
index f718f01aba5..90e4dacbd76 100644
--- a/doc/user/group/saml_sso/index.md
+++ b/doc/user/group/saml_sso/index.md
@@ -97,8 +97,6 @@ Once you've set up your identity provider to work with GitLab, you'll need to co
## Providers
-NOTE: **Note:** GitLab is unable to provide support for IdPs that are not listed here.
-
| Provider | Documentation |
|----------|---------------|
| ADFS (Active Directory Federation Services) | [Create a Relying Party Trust](https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/operations/create-a-relying-party-trust) |
diff --git a/doc/user/group/subgroups/index.md b/doc/user/group/subgroups/index.md
index 376d4510934..eec929e3309 100644
--- a/doc/user/group/subgroups/index.md
+++ b/doc/user/group/subgroups/index.md
@@ -4,7 +4,8 @@ type: reference, howto, concepts
# Subgroups
->[Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/2772) in GitLab 9.0.
+NOTE: **Note:**
+[Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/2772) in GitLab 9.0.
Subgroups, also known as nested groups or hierarchical groups, allow you to have up to 20
levels of groups.
@@ -67,9 +68,9 @@ Another example of GitLab as a company would be the following:
The maximum subgroups a group can have, including the first one in the
hierarchy, is 21.
-When performing actions such as transferring or importing a project between
-subgroups, the behavior is the same as when performing these actions at the
-`group/project` level.
+Actions such as transferring or importing a project inside subgroups, work like
+when performing these actions the traditional way with the `group/project`
+structure.
## Creating a subgroup
@@ -116,10 +117,6 @@ When you add a member to a subgroup, they inherit the membership and permission
level from the parent group. This model allows access to nested groups if you
have membership in one of its parents.
-Jobs for pipelines in subgroups can use [Runners](../../../ci/runners/README.md) registered to the parent group. This means secrets configured for the parent group are available to subgroup jobs.
-
-In addition, maintainers of projects that belong to subgroups can see the details of Runners registered to parent groups.
-
The group permissions for a member can be changed only by Owners, and only on
the **Members** page of the group the member was added.
diff --git a/doc/user/packages/npm_registry/index.md b/doc/user/packages/npm_registry/index.md
index 5f5d86ab17e..6d11ab603ef 100644
--- a/doc/user/packages/npm_registry/index.md
+++ b/doc/user/packages/npm_registry/index.md
@@ -84,28 +84,6 @@ NOTE: **Note:**
If you encounter an error message with [Yarn](https://yarnpkg.com/en/), see the
[troubleshooting section](#troubleshooting).
-### Using variables to avoid hard-coding auth token values
-
-To avoid hard-coding the `authToken` value, you may use a variables in its place.
-In your `.npmrc` file, you would add:
-
-```ini
-@foo:registry=https://gitlab.com/api/v4/packages/npm/
-//gitlab.com/api/v4/packages/npm/:_authToken=${NPM_TOKEN}
-//gitlab.com/api/v4/projects/<your_project_id>/packages/npm/:_authToken=${NPM_TOKEN}
-```
-
-Then, you could run `npm publish` either locally or via GitLab CI/CD:
-
-- **Locally:** Export `NPM_TOKEN` before publishing:
-
- ```sh
- NPM_TOKEN=<your_token> npm publish
- ```
-
-- **GitLab CI/CD:** Set an `NPM_TOKEN` [variable](../../../ci/variables/README.md)
- under your project's **Settings > CI/CD > Variables**.
-
## Uploading packages
Before you will be able to upload a package, you need to specify the registry
@@ -167,29 +145,3 @@ with your with your OAuth or personal access token):
```text
//gitlab.com/api/v4/projects/:_authToken=<your_oauth_token>
```
-
-### `npm publish` targets default NPM registry (`registry.npmjs.org`)
-
-Ensure that your package scope is set consistently in your `package.json` and `.npmrc` files.
-
-For example, if your project name in GitLab is `foo/my-package`, then your `package.json` file
-should look like:
-
-```json
-{
- "name": "@foo/my-package",
- "version": "1.0.0",
- "description": "Example package for GitLab NPM registry",
- "publishConfig": {
- "@foo:registry":"https://gitlab.com/api/v4/projects/<your_project_id>/packages/npm/"
- }
-}
-```
-
-And the `.npmrc` file should look like:
-
-```ini
-//gitlab.com/api/v4/projects/<your_project_id>/packages/npm/:_authToken=<your_oauth_token>
-//gitlab.com/api/v4/packages/npm/:_authToken=<your_oauth_token>
-@foo:registry=https://gitlab.com/api/v4/packages/npm/
-```
diff --git a/doc/user/permissions.md b/doc/user/permissions.md
index 2025832a714..4f660d07071 100644
--- a/doc/user/permissions.md
+++ b/doc/user/permissions.md
@@ -236,7 +236,7 @@ nested groups if you have membership in one of its parents.
To learn more, read through the documentation on
[subgroups memberships](group/subgroups/index.md#membership).
-## Free Guest users **(ULTIMATE)**
+## Guest User
When a user is given `Guest` permissions on a project and/or group, and holds no
higher permission level on any other project or group on the instance, the user
@@ -245,9 +245,8 @@ There is no other specific "guest" designation for newly created users.
If the user is assigned a higher role on any projects or groups, the user will
take a license seat. If a user creates a project, the user becomes a `Maintainer`
-on the project, resulting in the use of a license seat.
-
-To prevent a guest user from creating projects, you can edit the user profile to mark the user as
+on the project, resulting in the use of a license seat. To prevent a guest user
+from creating projects, you can edit the user profile to mark the user as
[External](#external-users-permissions).
## External users permissions
diff --git a/doc/user/project/import/gitea.md b/doc/user/project/import/gitea.md
index 0b9034c821b..f5746a0fb31 100644
--- a/doc/user/project/import/gitea.md
+++ b/doc/user/project/import/gitea.md
@@ -66,14 +66,10 @@ From there, you can see the import statuses of your Gitea repositories.
- whereas those that are not yet imported will have an **Import** button on the
right side of the table.
-You also can:
+If you want, you can import all your Gitea projects in one go by hitting
+**Import all projects** in the upper left corner.
-- Import all your Gitea projects in one go by hitting **Import all projects** in
- the upper left corner
-- Filter projects by name. If filter is applied, hitting **Import all projects**
- will only import matched projects
-
-![Gitea importer page](img/import_projects_from_gitea_importer_v12_3.png)
+![Gitea importer page](img/import_projects_from_github_importer.png)
---
diff --git a/doc/user/project/import/github.md b/doc/user/project/import/github.md
index 0fd724f63ac..dad53a600dc 100644
--- a/doc/user/project/import/github.md
+++ b/doc/user/project/import/github.md
@@ -115,14 +115,11 @@ your GitHub repositories are listed.
1. By default, the proposed repository namespaces match the names as they exist in GitHub, but based on your permissions,
you can choose to edit these names before you proceed to import any of them.
-1. Select the **Import** button next to any number of repositories, or select **Import all repositories**. Additionally,
- you can filter projects by name. If filter is applied, **Import all repositories** only imports matched repositories.
+1. Select the **Import** button next to any number of repositories, or select **Import all repositories**.
1. The **Status** column shows the import status of each repository. You can choose to leave the page open and it will
update in realtime or you can return to it later.
1. Once a repository has been imported, click its GitLab path to open its GitLab URL.
-![Github importer page](img/import_projects_from_github_importer_v12_3.png)
-
## Mirroring and pipeline status sharing
Depending your GitLab tier, [project mirroring](../../../workflow/repository_mirroring.md) can be set up to keep
diff --git a/doc/user/project/import/img/import_projects_from_gitea_importer_v12_3.png b/doc/user/project/import/img/import_projects_from_gitea_importer_v12_3.png
deleted file mode 100644
index d8ae1a54851..00000000000
--- a/doc/user/project/import/img/import_projects_from_gitea_importer_v12_3.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/project/import/img/import_projects_from_github_importer.png b/doc/user/project/import/img/import_projects_from_github_importer.png
new file mode 100644
index 00000000000..d8effaf6075
--- /dev/null
+++ b/doc/user/project/import/img/import_projects_from_github_importer.png
Binary files differ
diff --git a/doc/user/project/import/img/import_projects_from_github_importer_v12_3.png b/doc/user/project/import/img/import_projects_from_github_importer_v12_3.png
deleted file mode 100644
index 6a53d9e6d1d..00000000000
--- a/doc/user/project/import/img/import_projects_from_github_importer_v12_3.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/project/index.md b/doc/user/project/index.md
index a6e9ef8a7c0..2700d43ed10 100644
--- a/doc/user/project/index.md
+++ b/doc/user/project/index.md
@@ -214,10 +214,10 @@ A project alias can be only created via API and only by GitLab administrators.
Follow the [Project Aliases API documentation](../../api/project_aliases.md) for
more details.
-Once an alias has been created for a project (e.g., an alias `gitlab` for the
-project `https://gitlab.com/gitlab-org/gitlab`), the repository can be cloned
-using the alias (e.g `git clone git@gitlab.com:gitlab.git` instead of
-`git clone git@gitlab.com:gitlab-org/gitlab.git`).
+Once an alias has been created for a project (e.g., an alias `gitlab-ce` for the
+project `https://gitlab.com/gitlab-org/gitlab-foss`), the repository can be cloned
+using the alias (e.g `git clone git@gitlab.com:gitlab-ce.git` instead of
+`git clone git@gitlab.com:gitlab-org/gitlab-ce.git`).
## Project APIs
diff --git a/doc/user/project/integrations/generic_alerts.md b/doc/user/project/integrations/generic_alerts.md
index 46f05f235df..37fe5132ec2 100644
--- a/doc/user/project/integrations/generic_alerts.md
+++ b/doc/user/project/integrations/generic_alerts.md
@@ -1,6 +1,6 @@
# Generic alerts integration **(ULTIMATE)**
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/13203) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.3.
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/issues/13203) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.3.
GitLab can accept alerts from any source via a generic webhook receiver.
When you set up the generic alerts integration, a unique endpoint will
diff --git a/doc/user/project/integrations/gitlab_slack_application.md b/doc/user/project/integrations/gitlab_slack_application.md
index 50adb5993e5..91de64be1fa 100644
--- a/doc/user/project/integrations/gitlab_slack_application.md
+++ b/doc/user/project/integrations/gitlab_slack_application.md
@@ -53,11 +53,11 @@ The only difference with the [manually configurable Slack slash commands][slack-
is that all the commands should be prefixed with the `/gitlab` keyword.
We are working on making this configurable in the future.
-For example, to show the issue number `1001` under the `gitlab-org/gitlab`
+For example, to show the issue number `1001` under the `gitlab-org/gitlab-ce`
project, you would do:
```
-/gitlab gitlab-org/gitlab issue show 1001
+/gitlab gitlab-org/gitlab-ce issue show 1001
```
[slack-docs]: https://get.slack.help/hc/en-us/articles/202035138-Adding-apps-to-your-team
diff --git a/doc/user/project/integrations/jira.md b/doc/user/project/integrations/jira.md
index 7c48ca49bb4..1b8af89de61 100644
--- a/doc/user/project/integrations/jira.md
+++ b/doc/user/project/integrations/jira.md
@@ -205,4 +205,4 @@ authenticate with the Jira site. You will need to log in to your Jira instance
and complete the CAPTCHA.
[services-templates]: services_templates.md
-[jira-repo-old-docs]: https://gitlab.com/gitlab-org/gitlab/blob/8-13-stable/doc/project_services/jira.md
+[jira-repo-old-docs]: https://gitlab.com/gitlab-org/gitlab-foss/blob/8-13-stable/doc/project_services/jira.md
diff --git a/doc/user/project/merge_requests/browser_performance_testing.md b/doc/user/project/merge_requests/browser_performance_testing.md
index 08feb970334..de8a47f3d73 100644
--- a/doc/user/project/merge_requests/browser_performance_testing.md
+++ b/doc/user/project/merge_requests/browser_performance_testing.md
@@ -175,7 +175,7 @@ performance:
performance: performance.json
```
-A complete example can be found in our [Auto DevOps CI YML](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml).
+A complete example can be found in our [Auto DevOps CI YML](https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml).
### Previous job definitions
diff --git a/doc/user/project/merge_requests/merge_request_dependencies.md b/doc/user/project/merge_requests/merge_request_dependencies.md
index 9daf42f5152..c982bd7f78d 100644
--- a/doc/user/project/merge_requests/merge_request_dependencies.md
+++ b/doc/user/project/merge_requests/merge_request_dependencies.md
@@ -97,9 +97,9 @@ merge.
## Limitations
-- API support: [gitlab#12551](https://gitlab.com/gitlab-org/gitlab/issues/12551)
-- Dependencies are not preserved across project export/import: [gitlab#12549](https://gitlab.com/gitlab-org/gitlab/issues/12549)
-- Complex merge order dependencies are not supported: [gitlab#11393](https://gitlab.com/gitlab-org/gitlab/issues/11393)
+- API support: [gitlab-ee#12551](https://gitlab.com/gitlab-org/gitlab/issues/12551)
+- Dependencies are not preserved across project export/import: [gitlab-ee#12549](https://gitlab.com/gitlab-org/gitlab/issues/12549)
+- Complex merge order dependencies are not supported: [gitlab-ee#11393](https://gitlab.com/gitlab-org/gitlab/issues/11393)
The last item merits a little more explanation. Dependencies between merge
requests can be described as a graph of relationships. The simplest possible
diff --git a/doc/user/project/pipelines/job_artifacts.md b/doc/user/project/pipelines/job_artifacts.md
index 41b5f210d21..703b0a94470 100644
--- a/doc/user/project/pipelines/job_artifacts.md
+++ b/doc/user/project/pipelines/job_artifacts.md
@@ -123,18 +123,18 @@ https://example.com/<namespace>/<project>/-/jobs/artifacts/<ref>/raw/<path_to_fi
```
For example, to download the latest artifacts of the job named `coverage` of
-the `master` branch of the `gitlab` project that belongs to the `gitlab-org`
+the `master` branch of the `gitlab-ce` project that belongs to the `gitlab-org`
namespace, the URL would be:
```
-https://gitlab.com/gitlab-org/gitlab/-/jobs/artifacts/master/download?job=coverage
+https://gitlab.com/gitlab-org/gitlab-foss/-/jobs/artifacts/master/download?job=coverage
```
To download the file `coverage/index.html` from the same
artifacts use the following URL:
```
-https://gitlab.com/gitlab-org/gitlab/-/jobs/artifacts/master/raw/coverage/index.html?job=coverage
+https://gitlab.com/gitlab-org/gitlab-foss/-/jobs/artifacts/master/raw/coverage/index.html?job=coverage
```
There is also a URL to browse the latest job artifacts:
@@ -146,7 +146,7 @@ https://example.com/<namespace>/<project>/-/jobs/artifacts/<ref>/browse?job=<job
For example:
```
-https://gitlab.com/gitlab-org/gitlab/-/jobs/artifacts/master/browse?job=coverage
+https://gitlab.com/gitlab-org/gitlab-foss/-/jobs/artifacts/master/browse?job=coverage
```
There is also a URL to specific files, including html files that
@@ -160,7 +160,7 @@ For example, when a job `coverage` creates the artifact `htmlcov/index.html`,
you can access it at:
```
-https://gitlab.com/gitlab-org/gitlab/-/jobs/artifacts/master/file/htmlcov/index.html?job=coverage
+https://gitlab.com/gitlab-org/gitlab-foss/-/jobs/artifacts/master/file/htmlcov/index.html?job=coverage
```
The latest builds are also exposed in the UI in various places. Specifically,
diff --git a/doc/user/project/protected_branches.md b/doc/user/project/protected_branches.md
index f909725f07e..cf4afef15cd 100644
--- a/doc/user/project/protected_branches.md
+++ b/doc/user/project/protected_branches.md
@@ -166,16 +166,16 @@ for details about the pipelines security model.
**9.2**
-- Allow deletion of protected branches via the web interface [gitlab-org/gitlab-foss#21393][ce-21393]
+- Allow deletion of protected branches via the web interface [gitlab-org/gitlab-ce#21393][ce-21393]
**8.11**
-- Allow creating protected branches that can't be pushed to [gitlab-org/gitlab-foss!5081][ce-5081]
+- Allow creating protected branches that can't be pushed to [gitlab-org/gitlab-ce!5081][ce-5081]
**8.10**
-- Allow developers to merge into a protected branch without having push access [gitlab-org/gitlab-foss!4892][ce-4892]
-- Allow specifying protected branches using wildcards [gitlab-org/gitlab-foss!4665][ce-4665]
+- Allow developers to merge into a protected branch without having push access [gitlab-org/gitlab-ce!4892][ce-4892]
+- Allow specifying protected branches using wildcards [gitlab-org/gitlab-ce!4665][ce-4665]
[ce-4665]: https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/4665 "Allow specifying protected branches using wildcards"
[ce-4892]: https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/4892 "Allow developers to merge into a protected branch without having push access"
diff --git a/doc/user/project/quick_actions.md b/doc/user/project/quick_actions.md
index 487ad005f28..0078e9ea417 100644
--- a/doc/user/project/quick_actions.md
+++ b/doc/user/project/quick_actions.md
@@ -64,8 +64,8 @@ The following quick actions are applicable to descriptions, discussions and thre
| `/create_merge_request <branch name>` | ✓ | | | Create a new merge request starting from the current issue |
| `/relate #issue1 #issue2` | ✓ | | | Mark issues as related **(STARTER)** |
| `/move <path/to/project>` | ✓ | | | Move this issue to another project |
-| `/zoom <Zoom URL>` | ✓ | | | Add Zoom meeting to this issue. ([Introduced in GitLab 12.3](https://gitlab.com/gitlab-org/gitlab/merge_requests/16609) enabled by feature flag `issue_zoom_integration`) |
-| `/remove_zoom` | ✓ | | | Remove Zoom meeting from this issue. ([Introduced in GitLab 12.3](https://gitlab.com/gitlab-org/gitlab/merge_requests/16609) enabled by feature flag `issue_zoom_integration`) |
+| `/zoom <Zoom URL>` | ✓ | | | Add Zoom meeting to this issue. ([Introduced in GitLab 12.3](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/16609) enabled by feature flag `issue_zoom_integration`) |
+| `/remove_zoom` | ✓ | | | Remove Zoom meeting from this issue. ([Introduced in GitLab 12.3](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/16609) enabled by feature flag `issue_zoom_integration`) |
| `/target_branch <local branch name>` | | ✓ | | Set target branch |
| `/wip` | | ✓ | | Toggle the Work In Progress status |
| `/approve` | | ✓ | | Approve the merge request |
diff --git a/doc/user/reserved_names.md b/doc/user/reserved_names.md
index 70c6c885c86..16d032217b3 100644
--- a/doc/user/reserved_names.md
+++ b/doc/user/reserved_names.md
@@ -88,4 +88,4 @@ These group names are unavailable as subgroup names:
- \-
-[reserved]: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/path_regex.rb
+[reserved]: https://gitlab.com/gitlab-org/gitlab-foss/blob/master/lib/gitlab/path_regex.rb
diff --git a/doc/workflow/lfs/lfs_administration.md b/doc/workflow/lfs/lfs_administration.md
index 2e0674064c2..89ad7c174a2 100644
--- a/doc/workflow/lfs/lfs_administration.md
+++ b/doc/workflow/lfs/lfs_administration.md
@@ -218,14 +218,6 @@ For source installations the settings are nested under `lfs:` and then
will be forwarded to object storage unless `background_upload` is set to
false.
-### Migrating back to local storage
-
-In order to migrate back to local storage:
-
-1. Set both `direct_upload` and `background_upload` to false under the LFS object storage settings. Don't forget to restart GitLab.
-1. Run `rake gitlab:lfs:migrate_to_local` on your console.
-1. Disable `object_storage` for LFS objects in `gitlab.rb`. Remember to restart GitLab afterwards.
-
## Storage statistics
You can see the total storage used for LFS objects on groups and projects
@@ -259,7 +251,7 @@ See more information in [!19581](https://gitlab.com/gitlab-org/gitlab-foss/merge
- Support for removing unreferenced LFS objects was added in 8.14 onwards.
- LFS authentications via SSH was added with GitLab 8.12.
-- Only compatible with the Git LFS client versions 1.1.0 and up, or 1.0.2.
+- Only compatible with the GitLFS client versions 1.1.0 and up, or 1.0.2.
- The storage statistics currently count each LFS object multiple times for
every project linking to it.
diff --git a/jest.config.js b/jest.config.js
index 34581c6532a..646648c6928 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -41,7 +41,6 @@ module.exports = {
'^vendor(/.*)$': '<rootDir>/vendor/assets/javascripts$1',
'\\.(jpg|jpeg|png|svg)$': '<rootDir>/spec/frontend/__mocks__/file_mock.js',
'emojis(/.*).json': '<rootDir>/fixtures/emojis$1.json',
- '^spec/test_constants$': '<rootDir>/spec/frontend/helpers/test_constants',
},
collectCoverageFrom: ['<rootDir>/app/assets/javascripts/**/*.{js,vue}'],
coverageDirectory: '<rootDir>/coverage-frontend/',
@@ -63,15 +62,3 @@ module.exports = {
IS_EE,
},
};
-
-const karmaTestFile = process.argv.find(arg => arg.includes('spec/javascripts/'));
-if (karmaTestFile) {
- console.error(`
-Files in spec/javascripts/ and ee/spec/javascripts need to be run with Karma.
-Please use the following command instead:
-
-yarn karma -f ${karmaTestFile}
-
-`);
- process.exit(1);
-}
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index ffff40141de..a2f3e87ebd2 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -37,7 +37,6 @@ module API
optional :path, type: String, desc: 'The file path'
optional :all, type: Boolean, desc: 'Every commit will be returned'
optional :with_stats, type: Boolean, desc: 'Stats about each commit will be added to the response'
- optional :first_parent, type: Boolean, desc: 'Only include the first parent of merges'
use :pagination
end
get ':id/repository/commits' do
@@ -48,7 +47,6 @@ module API
offset = (params[:page] - 1) * params[:per_page]
all = params[:all]
with_stats = params[:with_stats]
- first_parent = params[:first_parent]
commits = user_project.repository.commits(ref,
path: path,
@@ -56,12 +54,11 @@ module API
offset: offset,
before: before,
after: after,
- all: all,
- first_parent: first_parent)
+ all: all)
commit_count =
- if all || path || before || after || first_parent
- user_project.repository.count_commits(ref: ref, path: path, before: before, after: after, all: all, first_parent: first_parent)
+ if all || path || before || after
+ user_project.repository.count_commits(ref: ref, path: path, before: before, after: after, all: all)
else
# Cacheable commit count.
user_project.repository.commit_count_for_ref(ref)
diff --git a/lib/api/project_container_repositories.rb b/lib/api/project_container_repositories.rb
index 2a05974509a..c10ef96922c 100644
--- a/lib/api/project_container_repositories.rb
+++ b/lib/api/project_container_repositories.rb
@@ -106,15 +106,9 @@ module API
authorize_destroy_container_image!
validate_tag!
- result = ::Projects::ContainerRepository::DeleteTagsService
- .new(repository.project, current_user, tags: [declared_params[:tag_name]])
- .execute(repository)
-
- if result[:status] == :success
- status :ok
- else
- status :bad_request
- end
+ tag.delete
+
+ status :ok
end
end
diff --git a/lib/api/project_import.rb b/lib/api/project_import.rb
index b3f17447ea0..7f1ae5ffbe6 100644
--- a/lib/api/project_import.rb
+++ b/lib/api/project_import.rb
@@ -29,7 +29,6 @@ module API
requires :path, type: String, desc: 'The new project path and name'
# TODO: remove rubocop disable - https://gitlab.com/gitlab-org/gitlab/issues/14960
requires :file, type: File, desc: 'The project export file to be imported' # rubocop:disable Scalability/FileUploads
- optional :name, type: String, desc: 'The name of the project to be imported. Defaults to the path of the project if not provided.'
optional :namespace, type: String, desc: "The ID or name of the namespace that the project will be imported into. Defaults to the current user's namespace."
optional :overwrite, type: Boolean, default: false, desc: 'If there is a project in the same namespace and with the same name overwrite it'
optional :override_params,
@@ -56,7 +55,6 @@ module API
project_params = {
path: import_params[:path],
namespace_id: namespace.id,
- name: import_params[:name],
file: import_params[:file]['tempfile'],
overwrite: import_params[:overwrite]
}
diff --git a/lib/container_registry/client.rb b/lib/container_registry/client.rb
index 2bd8eb65306..15f40993ea3 100644
--- a/lib/container_registry/client.rb
+++ b/lib/container_registry/client.rb
@@ -2,7 +2,6 @@
require 'faraday'
require 'faraday_middleware'
-require 'digest'
module ContainerRegistry
class Client
@@ -10,8 +9,6 @@ module ContainerRegistry
DOCKER_DISTRIBUTION_MANIFEST_V2_TYPE = 'application/vnd.docker.distribution.manifest.v2+json'
OCI_MANIFEST_V1_TYPE = 'application/vnd.oci.image.manifest.v1+json'
- CONTAINER_IMAGE_V1_TYPE = 'application/vnd.docker.container.image.v1+json'
-
ACCEPTED_TYPES = [DOCKER_DISTRIBUTION_MANIFEST_V2_TYPE, OCI_MANIFEST_V1_TYPE].freeze
# Taken from: FaradayMiddleware::FollowRedirects
@@ -39,45 +36,6 @@ module ContainerRegistry
faraday.delete("/v2/#{name}/manifests/#{reference}").success?
end
- def upload_raw_blob(path, blob)
- digest = "sha256:#{Digest::SHA256.hexdigest(blob)}"
-
- if upload_blob(path, blob, digest).success?
- [blob, digest]
- end
- end
-
- def upload_blob(name, content, digest)
- upload = faraday.post("/v2/#{name}/blobs/uploads/")
- return unless upload.success?
-
- location = URI(upload.headers['location'])
-
- faraday.put("#{location.path}?#{location.query}") do |req|
- req.params['digest'] = digest
- req.headers['Content-Type'] = 'application/octet-stream'
- req.body = content
- end
- end
-
- def generate_empty_manifest(path)
- image = {
- config: {}
- }
- image, image_digest = upload_raw_blob(path, JSON.pretty_generate(image))
- return unless image
-
- {
- schemaVersion: 2,
- mediaType: DOCKER_DISTRIBUTION_MANIFEST_V2_TYPE,
- config: {
- mediaType: CONTAINER_IMAGE_V1_TYPE,
- size: image.size,
- digest: image_digest
- }
- }
- end
-
def blob(name, digest, type = nil)
type ||= 'application/octet-stream'
response_body faraday_blob.get("/v2/#{name}/blobs/#{digest}", nil, 'Accept' => type), allow_redirect: true
@@ -87,15 +45,6 @@ module ContainerRegistry
faraday.delete("/v2/#{name}/blobs/#{digest}").success?
end
- def put_tag(name, reference, manifest)
- response = faraday.put("/v2/#{name}/manifests/#{reference}") do |req|
- req.headers['Content-Type'] = DOCKER_DISTRIBUTION_MANIFEST_V2_TYPE
- req.body = JSON.pretty_generate(manifest)
- end
-
- response.headers['docker-content-digest'] if response.success?
- end
-
private
def initialize_connection(conn, options)
diff --git a/lib/container_registry/tag.rb b/lib/container_registry/tag.rb
index 2cc4c8d8b1c..ebea84fa1ca 100644
--- a/lib/container_registry/tag.rb
+++ b/lib/container_registry/tag.rb
@@ -98,10 +98,6 @@ module ContainerRegistry
end
end
- def put(digests)
- repository.client.put_tag(repository.path, name, digests)
- end
-
# rubocop: disable CodeReuse/ActiveRecord
def total_size
return unless layers
@@ -110,10 +106,7 @@ module ContainerRegistry
end
# rubocop: enable CodeReuse/ActiveRecord
- # Deletes the image associated with this tag
- # Note this will delete the image and all tags associated with it.
- # Consider using DeleteTagsService instead.
- def unsafe_delete
+ def delete
return unless digest
client.delete_repository_tag(repository.path, digest)
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events.rb b/lib/gitlab/analytics/cycle_analytics/stage_events.rb
index 58572446de6..d21f344f483 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events.rb
@@ -18,8 +18,7 @@ module Gitlab
StageEvents::MergeRequestMerged => 104,
StageEvents::CodeStageStart => 1_000,
StageEvents::IssueStageEnd => 1_001,
- StageEvents::PlanStageStart => 1_002,
- StageEvents::ProductionStageEnd => 1_003
+ StageEvents::PlanStageStart => 1_002
}.freeze
EVENTS = ENUM_MAPPING.keys.freeze
@@ -33,8 +32,7 @@ module Gitlab
StageEvents::MergeRequestCreated
],
StageEvents::IssueCreated => [
- StageEvents::IssueStageEnd,
- StageEvents::ProductionStageEnd
+ StageEvents::IssueStageEnd
],
StageEvents::MergeRequestCreated => [
StageEvents::MergeRequestMerged
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/code_stage_start.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/code_stage_start.rb
index 6af1b90bccc..ff9c8a79225 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/code_stage_start.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events/code_stage_start.rb
@@ -16,21 +16,6 @@ module Gitlab
def object_type
MergeRequest
end
-
- def timestamp_projection
- issue_metrics_table[:first_mentioned_in_commit_at]
- end
-
- # rubocop: disable CodeReuse/ActiveRecord
- def apply_query_customization(query)
- issue_metrics_join = mr_closing_issues_table
- .join(issue_metrics_table)
- .on(mr_closing_issues_table[:issue_id].eq(issue_metrics_table[:issue_id]))
- .join_sources
-
- query.joins(:merge_requests_closing_issues).joins(issue_metrics_join)
- end
- # rubocop: enable CodeReuse/ActiveRecord
end
end
end
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/issue_created.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/issue_created.rb
index 8c9a80740a9..a601c9797f8 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/issue_created.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events/issue_created.rb
@@ -16,10 +16,6 @@ module Gitlab
def object_type
Issue
end
-
- def timestamp_projection
- issue_table[:created_at]
- end
end
end
end
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/issue_first_mentioned_in_commit.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/issue_first_mentioned_in_commit.rb
index fe7f2d85f8b..7424043ef7b 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/issue_first_mentioned_in_commit.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events/issue_first_mentioned_in_commit.rb
@@ -16,16 +16,6 @@ module Gitlab
def object_type
Issue
end
-
- def timestamp_projection
- issue_metrics_table[:first_mentioned_in_commit_at]
- end
-
- # rubocop: disable CodeReuse/ActiveRecord
- def apply_query_customization(query)
- query.joins(:metrics)
- end
- # rubocop: enable CodeReuse/ActiveRecord
end
end
end
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/issue_stage_end.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/issue_stage_end.rb
index 77e4092b9ab..ceb229c552f 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/issue_stage_end.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events/issue_stage_end.rb
@@ -16,19 +16,6 @@ module Gitlab
def object_type
Issue
end
-
- def timestamp_projection
- Arel::Nodes::NamedFunction.new('COALESCE', [
- issue_metrics_table[:first_associated_with_milestone_at],
- issue_metrics_table[:first_added_to_board_at]
- ])
- end
-
- # rubocop: disable CodeReuse/ActiveRecord
- def apply_query_customization(query)
- query.joins(:metrics).where(issue_metrics_table[:first_added_to_board_at].not_eq(nil).or(issue_metrics_table[:first_associated_with_milestone_at].not_eq(nil)))
- end
- # rubocop: enable CodeReuse/ActiveRecord
end
end
end
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_created.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_created.rb
index 7059c425b8f..8be00831b4f 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_created.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_created.rb
@@ -16,10 +16,6 @@ module Gitlab
def object_type
MergeRequest
end
-
- def timestamp_projection
- mr_table[:created_at]
- end
end
end
end
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production.rb
index 3d7482eaaf0..6d7a2c023ff 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production.rb
@@ -16,16 +16,6 @@ module Gitlab
def object_type
MergeRequest
end
-
- def timestamp_projection
- mr_metrics_table[:first_deployed_to_production_at]
- end
-
- # rubocop: disable CodeReuse/ActiveRecord
- def apply_query_customization(query)
- query.joins(:metrics).where(timestamp_projection.gteq(mr_table[:created_at]))
- end
- # rubocop: enable CodeReuse/ActiveRecord
end
end
end
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_finished.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_finished.rb
index 36bb4d6fc8d..12d82fe2c62 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_finished.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_finished.rb
@@ -16,16 +16,6 @@ module Gitlab
def object_type
MergeRequest
end
-
- def timestamp_projection
- mr_metrics_table[:latest_build_finished_at]
- end
-
- # rubocop: disable CodeReuse/ActiveRecord
- def apply_query_customization(query)
- query.joins(:metrics)
- end
- # rubocop: enable CodeReuse/ActiveRecord
end
end
end
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_started.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_started.rb
index 468d9899cc7..9e749b0fdfa 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_started.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_started.rb
@@ -16,16 +16,6 @@ module Gitlab
def object_type
MergeRequest
end
-
- def timestamp_projection
- mr_metrics_table[:latest_build_started_at]
- end
-
- # rubocop: disable CodeReuse/ActiveRecord
- def apply_query_customization(query)
- query.joins(:metrics)
- end
- # rubocop: enable CodeReuse/ActiveRecord
end
end
end
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_merged.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_merged.rb
index 82ecaf1cd6b..bbfb5d12992 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_merged.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_merged.rb
@@ -16,16 +16,6 @@ module Gitlab
def object_type
MergeRequest
end
-
- def timestamp_projection
- mr_metrics_table[:merged_at]
- end
-
- # rubocop: disable CodeReuse/ActiveRecord
- def apply_query_customization(query)
- query.joins(:metrics)
- end
- # rubocop: enable CodeReuse/ActiveRecord
end
end
end
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/plan_stage_start.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/plan_stage_start.rb
index 7ece7d62faa..803317d8b55 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/plan_stage_start.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events/plan_stage_start.rb
@@ -16,22 +16,6 @@ module Gitlab
def object_type
Issue
end
-
- def timestamp_projection
- Arel::Nodes::NamedFunction.new('COALESCE', [
- issue_metrics_table[:first_associated_with_milestone_at],
- issue_metrics_table[:first_added_to_board_at]
- ])
- end
-
- # rubocop: disable CodeReuse/ActiveRecord
- def apply_query_customization(query)
- query
- .joins(:metrics)
- .where(issue_metrics_table[:first_added_to_board_at].not_eq(nil).or(issue_metrics_table[:first_associated_with_milestone_at].not_eq(nil)))
- .where(issue_metrics_table[:first_mentioned_in_commit_at].not_eq(nil))
- end
- # rubocop: enable CodeReuse/ActiveRecord
end
end
end
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/production_stage_end.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/production_stage_end.rb
deleted file mode 100644
index 607371a32e8..00000000000
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/production_stage_end.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module Analytics
- module CycleAnalytics
- module StageEvents
- class ProductionStageEnd < SimpleStageEvent
- def self.name
- PlanStageStart.name
- end
-
- def self.identifier
- :production_stage_end
- end
-
- def object_type
- Issue
- end
-
- def timestamp_projection
- mr_metrics_table[:first_deployed_to_production_at]
- end
-
- # rubocop: disable CodeReuse/ActiveRecord
- def apply_query_customization(query)
- query.joins(merge_requests_closing_issues: { merge_request: [:metrics] }).where(mr_metrics_table[:first_deployed_to_production_at].gteq(mr_table[:created_at]))
- end
- # rubocop: enable CodeReuse/ActiveRecord
- end
- end
- end
- end
-end
diff --git a/lib/gitlab/analytics/cycle_analytics/stage_events/stage_event.rb b/lib/gitlab/analytics/cycle_analytics/stage_events/stage_event.rb
index aa392140eb5..a55eee048c2 100644
--- a/lib/gitlab/analytics/cycle_analytics/stage_events/stage_event.rb
+++ b/lib/gitlab/analytics/cycle_analytics/stage_events/stage_event.rb
@@ -6,8 +6,6 @@ module Gitlab
module StageEvents
# Base class for expressing an event that can be used for a stage.
class StageEvent
- include Gitlab::CycleAnalytics::MetricsTables
-
def initialize(params)
@params = params
end
@@ -23,21 +21,6 @@ module Gitlab
def object_type
raise NotImplementedError
end
-
- # Each StageEvent must expose a timestamp or a timestamp like expression in order to build a range query.
- # Example: get me all the Issue records between start event end end event
- def timestamp_projection
- raise NotImplementedError
- end
-
- # Optionally a StageEvent may apply additional filtering or join other tables on the base query.
- def apply_query_customization(query)
- query
- end
-
- private
-
- attr_reader :params
end
end
end
diff --git a/lib/gitlab/artifacts/migration_helper.rb b/lib/gitlab/artifacts/migration_helper.rb
deleted file mode 100644
index 4f047ab3ea8..00000000000
--- a/lib/gitlab/artifacts/migration_helper.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module Artifacts
- class MigrationHelper
- def migrate_to_remote_storage(&block)
- artifacts = ::Ci::JobArtifact.with_files_stored_locally
- migrate(artifacts, ObjectStorage::Store::REMOTE, &block)
- end
-
- def migrate_to_local_storage(&block)
- artifacts = ::Ci::JobArtifact.with_files_stored_remotely
- migrate(artifacts, ObjectStorage::Store::LOCAL, &block)
- end
-
- private
-
- def batch_size
- ENV.fetch('MIGRATION_BATCH_SIZE', 10).to_i
- end
-
- def migrate(artifacts, store, &block)
- artifacts.find_each(batch_size: batch_size) do |artifact| # rubocop:disable CodeReuse/ActiveRecord
- artifact.file.migrate!(store)
-
- yield artifact if block
- rescue => e
- raise StandardError.new("Failed to transfer artifact of type #{artifact.file_type} and ID #{artifact.id} with error: #{e.message}")
- end
- end
- end
- end
-end
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index c4eb3ad770a..2ac99b1ff02 100644
--- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb
@@ -142,13 +142,13 @@ module Gitlab
# kwargs.merge(deadline: Time.now + 10)
# end
#
- def self.call(storage, service, rpc, request, remote_storage: nil, timeout: default_timeout)
+ def self.call(storage, service, rpc, request, remote_storage: nil, timeout: nil)
start = Gitlab::Metrics::System.monotonic_time
request_hash = request.is_a?(Google::Protobuf::MessageExts) ? request.to_h : {}
enforce_gitaly_request_limits(:call)
- kwargs = request_kwargs(storage, timeout: timeout.to_f, remote_storage: remote_storage)
+ kwargs = request_kwargs(storage, timeout, remote_storage: remote_storage)
kwargs = yield(kwargs) if block_given?
stub(service, storage).__send__(rpc, request, kwargs) # rubocop:disable GitlabSecurity/PublicSend
@@ -200,7 +200,7 @@ module Gitlab
end
private_class_method :authorization_token
- def self.request_kwargs(storage, timeout:, remote_storage: nil)
+ def self.request_kwargs(storage, timeout, remote_storage: nil)
metadata = {
'authorization' => "Bearer #{authorization_token(storage)}",
'client_name' => CLIENT_NAME
@@ -216,7 +216,14 @@ module Gitlab
result = { metadata: metadata }
- result[:deadline] = real_time + timeout if timeout > 0
+ # nil timeout indicates that we should use the default
+ timeout = default_timeout if timeout.nil?
+
+ return result unless timeout > 0
+
+ deadline = real_time + timeout
+ result[:deadline] = deadline
+
result
end
@@ -350,6 +357,8 @@ module Gitlab
# The default timeout on all Gitaly calls
def self.default_timeout
+ return no_timeout if Sidekiq.server?
+
timeout(:gitaly_timeout_default)
end
@@ -361,12 +370,8 @@ module Gitlab
timeout(:gitaly_timeout_medium)
end
- def self.long_timeout
- if Sidekiq.server?
- 6.hours
- else
- 55.seconds
- end
+ def self.no_timeout
+ 0
end
def self.storage_metadata_file_path(storage)
diff --git a/lib/gitlab/gitaly_client/cleanup_service.rb b/lib/gitlab/gitaly_client/cleanup_service.rb
index e2293d3121a..a56bc35f6d7 100644
--- a/lib/gitlab/gitaly_client/cleanup_service.rb
+++ b/lib/gitlab/gitaly_client/cleanup_service.rb
@@ -18,7 +18,7 @@ module Gitlab
:cleanup_service,
:apply_bfg_object_map_stream,
build_object_map_enum(io),
- timeout: GitalyClient.long_timeout
+ timeout: GitalyClient.no_timeout
)
responses.each(&blk)
diff --git a/lib/gitlab/gitaly_client/commit_service.rb b/lib/gitlab/gitaly_client/commit_service.rb
index 2eaf52355dd..a80ce462ab0 100644
--- a/lib/gitlab/gitaly_client/commit_service.rb
+++ b/lib/gitlab/gitaly_client/commit_service.rb
@@ -140,8 +140,7 @@ module Gitlab
request = Gitaly::CountCommitsRequest.new(
repository: @gitaly_repo,
revision: encode_binary(ref),
- all: !!options[:all],
- first_parent: !!options[:first_parent]
+ all: !!options[:all]
)
request.after = Google::Protobuf::Timestamp.new(seconds: options[:after].to_i) if options[:after].present?
request.before = Google::Protobuf::Timestamp.new(seconds: options[:before].to_i) if options[:before].present?
@@ -255,7 +254,7 @@ module Gitlab
def languages(ref = nil)
request = Gitaly::CommitLanguagesRequest.new(repository: @gitaly_repo, revision: ref || '')
- response = GitalyClient.call(@repository.storage, :commit_service, :commit_languages, request, timeout: GitalyClient.long_timeout)
+ response = GitalyClient.call(@repository.storage, :commit_service, :commit_languages, request)
response.languages.map { |l| { value: l.share.round(2), label: l.name, color: l.color, highlight: l.color } }
end
@@ -326,7 +325,6 @@ module Gitlab
follow: options[:follow],
skip_merges: options[:skip_merges],
all: !!options[:all],
- first_parent: !!options[:first_parent],
disable_walk: true # This option is deprecated. The 'walk' implementation is being removed.
)
request.after = GitalyClient.timestamp(options[:after]) if options[:after]
@@ -362,7 +360,7 @@ module Gitlab
def extract_signature(commit_id)
request = Gitaly::ExtractCommitSignatureRequest.new(repository: @gitaly_repo, commit_id: commit_id)
- response = GitalyClient.call(@repository.storage, :commit_service, :extract_commit_signature, request, timeout: GitalyClient.fast_timeout)
+ response = GitalyClient.call(@repository.storage, :commit_service, :extract_commit_signature, request)
signature = +''.b
signed_text = +''.b
diff --git a/lib/gitlab/gitaly_client/conflicts_service.rb b/lib/gitlab/gitaly_client/conflicts_service.rb
index c497bd12738..d16e45c964d 100644
--- a/lib/gitlab/gitaly_client/conflicts_service.rb
+++ b/lib/gitlab/gitaly_client/conflicts_service.rb
@@ -20,7 +20,7 @@ module Gitlab
our_commit_oid: @our_commit_oid,
their_commit_oid: @their_commit_oid
)
- response = GitalyClient.call(@repository.storage, :conflicts_service, :list_conflict_files, request, timeout: GitalyClient.long_timeout)
+ response = GitalyClient.call(@repository.storage, :conflicts_service, :list_conflict_files, request)
GitalyClient::ConflictFilesStitcher.new(response)
end
diff --git a/lib/gitlab/gitaly_client/namespace_service.rb b/lib/gitlab/gitaly_client/namespace_service.rb
index 0be214f3035..f0be3cbebd2 100644
--- a/lib/gitlab/gitaly_client/namespace_service.rb
+++ b/lib/gitlab/gitaly_client/namespace_service.rb
@@ -22,7 +22,7 @@ module Gitlab
def remove(name)
request = Gitaly::RemoveNamespaceRequest.new(storage_name: @storage, name: name)
- gitaly_client_call(:remove_namespace, request, timeout: GitalyClient.long_timeout)
+ gitaly_client_call(:remove_namespace, request, timeout: nil)
end
def rename(from, to)
diff --git a/lib/gitlab/gitaly_client/object_pool_service.rb b/lib/gitlab/gitaly_client/object_pool_service.rb
index 786ef0ebebe..d7fac26bc13 100644
--- a/lib/gitlab/gitaly_client/object_pool_service.rb
+++ b/lib/gitlab/gitaly_client/object_pool_service.rb
@@ -15,15 +15,13 @@ module Gitlab
object_pool: object_pool,
origin: repository.gitaly_repository)
- GitalyClient.call(storage, :object_pool_service, :create_object_pool,
- request, timeout: GitalyClient.medium_timeout)
+ GitalyClient.call(storage, :object_pool_service, :create_object_pool, request)
end
def delete
request = Gitaly::DeleteObjectPoolRequest.new(object_pool: object_pool)
- GitalyClient.call(storage, :object_pool_service, :delete_object_pool,
- request, timeout: GitalyClient.long_timeout)
+ GitalyClient.call(storage, :object_pool_service, :delete_object_pool, request)
end
def link_repository(repository)
@@ -42,8 +40,7 @@ module Gitlab
origin: repository.gitaly_repository
)
- GitalyClient.call(storage, :object_pool_service, :fetch_into_object_pool,
- request, timeout: GitalyClient.long_timeout)
+ GitalyClient.call(storage, :object_pool_service, :fetch_into_object_pool, request)
end
end
end
diff --git a/lib/gitlab/gitaly_client/operation_service.rb b/lib/gitlab/gitaly_client/operation_service.rb
index 6e486c763da..33ca428a942 100644
--- a/lib/gitlab/gitaly_client/operation_service.rb
+++ b/lib/gitlab/gitaly_client/operation_service.rb
@@ -19,7 +19,7 @@ module Gitlab
user: Gitlab::Git::User.from_gitlab(user).to_gitaly
)
- response = GitalyClient.call(@repository.storage, :operation_service, :user_delete_tag, request, timeout: GitalyClient.long_timeout)
+ response = GitalyClient.call(@repository.storage, :operation_service, :user_delete_tag, request, timeout: GitalyClient.medium_timeout)
if pre_receive_error = response.pre_receive_error.presence
raise Gitlab::Git::PreReceiveError, pre_receive_error
@@ -35,7 +35,7 @@ module Gitlab
message: encode_binary(message.to_s)
)
- response = GitalyClient.call(@repository.storage, :operation_service, :user_create_tag, request, timeout: GitalyClient.long_timeout)
+ response = GitalyClient.call(@repository.storage, :operation_service, :user_create_tag, request, timeout: GitalyClient.medium_timeout)
if pre_receive_error = response.pre_receive_error.presence
raise Gitlab::Git::PreReceiveError, pre_receive_error
elsif response.exists
@@ -55,7 +55,7 @@ module Gitlab
start_point: encode_binary(start_point)
)
response = GitalyClient.call(@repository.storage, :operation_service,
- :user_create_branch, request, timeout: GitalyClient.long_timeout)
+ :user_create_branch, request)
if response.pre_receive_error.present?
raise Gitlab::Git::PreReceiveError.new(response.pre_receive_error)
@@ -79,8 +79,7 @@ module Gitlab
oldrev: encode_binary(oldrev)
)
- response = GitalyClient.call(@repository.storage, :operation_service,
- :user_update_branch, request, timeout: GitalyClient.long_timeout)
+ response = GitalyClient.call(@repository.storage, :operation_service, :user_update_branch, request)
if pre_receive_error = response.pre_receive_error.presence
raise Gitlab::Git::PreReceiveError, pre_receive_error
@@ -94,8 +93,7 @@ module Gitlab
user: Gitlab::Git::User.from_gitlab(user).to_gitaly
)
- response = GitalyClient.call(@repository.storage, :operation_service,
- :user_delete_branch, request, timeout: GitalyClient.long_timeout)
+ response = GitalyClient.call(@repository.storage, :operation_service, :user_delete_branch, request)
if pre_receive_error = response.pre_receive_error.presence
raise Gitlab::Git::PreReceiveError, pre_receive_error
@@ -113,8 +111,7 @@ module Gitlab
first_parent_ref: encode_binary(first_parent_ref)
)
- response = GitalyClient.call(@repository.storage, :operation_service,
- :user_merge_to_ref, request, timeout: GitalyClient.long_timeout)
+ response = GitalyClient.call(@repository.storage, :operation_service, :user_merge_to_ref, request)
if pre_receive_error = response.pre_receive_error.presence
raise Gitlab::Git::PreReceiveError, pre_receive_error
@@ -129,8 +126,7 @@ module Gitlab
@repository.storage,
:operation_service,
:user_merge_branch,
- request_enum.each,
- timeout: GitalyClient.long_timeout
+ request_enum.each
)
request_enum.push(
@@ -174,8 +170,7 @@ module Gitlab
@repository.storage,
:operation_service,
:user_ff_branch,
- request,
- timeout: GitalyClient.long_timeout
+ request
)
Gitlab::Git::OperationService::BranchUpdate.from_gitaly(response.branch_update)
@@ -220,7 +215,6 @@ module Gitlab
:operation_service,
:user_rebase,
request,
- timeout: GitalyClient.long_timeout,
remote_storage: remote_repository.storage
)
@@ -242,7 +236,6 @@ module Gitlab
:operation_service,
:user_rebase_confirmable,
request_enum.each,
- timeout: GitalyClient.long_timeout,
remote_storage: remote_repository.storage
)
@@ -293,8 +286,7 @@ module Gitlab
@repository.storage,
:operation_service,
:user_squash,
- request,
- timeout: GitalyClient.long_timeout
+ request
)
if response.git_error.presence
@@ -318,8 +310,7 @@ module Gitlab
@repository.storage,
:operation_service,
:user_update_submodule,
- request,
- timeout: GitalyClient.long_timeout
+ request
)
if response.pre_receive_error.present?
@@ -361,8 +352,7 @@ module Gitlab
end
response = GitalyClient.call(@repository.storage, :operation_service,
- :user_commit_files, req_enum, timeout: GitalyClient.long_timeout,
- remote_storage: start_repository.storage)
+ :user_commit_files, req_enum, remote_storage: start_repository.storage)
if (pre_receive_error = response.pre_receive_error.presence)
raise Gitlab::Git::PreReceiveError, pre_receive_error
@@ -394,8 +384,7 @@ module Gitlab
end
end
- response = GitalyClient.call(@repository.storage, :operation_service,
- :user_apply_patch, chunks, timeout: GitalyClient.long_timeout)
+ response = GitalyClient.call(@repository.storage, :operation_service, :user_apply_patch, chunks)
Gitlab::Git::OperationService::BranchUpdate.from_gitaly(response.branch_update)
end
@@ -435,7 +424,7 @@ module Gitlab
:"user_#{rpc}",
request,
remote_storage: start_repository.storage,
- timeout: GitalyClient.long_timeout
+ timeout: GitalyClient.medium_timeout
)
handle_cherry_pick_or_revert_response(response)
diff --git a/lib/gitlab/gitaly_client/ref_service.rb b/lib/gitlab/gitaly_client/ref_service.rb
index d1f848fae26..b7d509dfa48 100644
--- a/lib/gitlab/gitaly_client/ref_service.rb
+++ b/lib/gitlab/gitaly_client/ref_service.rb
@@ -21,7 +21,7 @@ module Gitlab
def remote_branches(remote_name)
request = Gitaly::FindAllRemoteBranchesRequest.new(repository: @gitaly_repo, remote_name: remote_name)
- response = GitalyClient.call(@repository.storage, :ref_service, :find_all_remote_branches, request, timeout: GitalyClient.medium_timeout)
+ response = GitalyClient.call(@repository.storage, :ref_service, :find_all_remote_branches, request)
consume_find_all_remote_branches_response(remote_name, response)
end
@@ -158,7 +158,7 @@ module Gitlab
start_point: encode_binary(start_point)
)
- response = GitalyClient.call(@repository.storage, :ref_service, :create_branch, request, timeout: GitalyClient.medium_timeout)
+ response = GitalyClient.call(@repository.storage, :ref_service, :create_branch, request)
case response.status
when :OK
@@ -182,7 +182,7 @@ module Gitlab
name: encode_binary(branch_name)
)
- GitalyClient.call(@repository.storage, :ref_service, :delete_branch, request, timeout: GitalyClient.medium_timeout)
+ GitalyClient.call(@repository.storage, :ref_service, :delete_branch, request)
end
def delete_refs(refs: [], except_with_prefixes: [])
@@ -192,7 +192,7 @@ module Gitlab
except_with_prefix: except_with_prefixes.map { |r| encode_binary(r) }
)
- response = GitalyClient.call(@repository.storage, :ref_service, :delete_refs, request, timeout: GitalyClient.medium_timeout)
+ response = GitalyClient.call(@repository.storage, :ref_service, :delete_refs, request, timeout: GitalyClient.default_timeout)
raise Gitlab::Git::Repository::GitError, response.git_error if response.git_error.present?
end
@@ -242,7 +242,7 @@ module Gitlab
def pack_refs
request = Gitaly::PackRefsRequest.new(repository: @gitaly_repo)
- GitalyClient.call(@storage, :ref_service, :pack_refs, request, timeout: GitalyClient.long_timeout)
+ GitalyClient.call(@storage, :ref_service, :pack_refs, request)
end
private
diff --git a/lib/gitlab/gitaly_client/remote_service.rb b/lib/gitlab/gitaly_client/remote_service.rb
index d01a29e1a05..f3589fea39f 100644
--- a/lib/gitlab/gitaly_client/remote_service.rb
+++ b/lib/gitlab/gitaly_client/remote_service.rb
@@ -38,7 +38,9 @@ module Gitlab
def remove_remote(name)
request = Gitaly::RemoveRemoteRequest.new(repository: @gitaly_repo, name: name)
- GitalyClient.call(@storage, :remote_service, :remove_remote, request, timeout: GitalyClient.long_timeout).result
+ response = GitalyClient.call(@storage, :remote_service, :remove_remote, request)
+
+ response.result
end
def fetch_internal_remote(repository)
@@ -49,7 +51,6 @@ module Gitlab
response = GitalyClient.call(@storage, :remote_service,
:fetch_internal_remote, request,
- timeout: GitalyClient.medium_timeout,
remote_storage: repository.storage)
response.result
@@ -62,7 +63,7 @@ module Gitlab
)
response = GitalyClient.call(@storage, :remote_service,
- :find_remote_root_ref, request, timeout: GitalyClient.medium_timeout)
+ :find_remote_root_ref, request)
encode_utf8(response.ref)
end
@@ -94,7 +95,7 @@ module Gitlab
end
end
- GitalyClient.call(@storage, :remote_service, :update_remote_mirror, req_enum, timeout: GitalyClient.long_timeout)
+ GitalyClient.call(@storage, :remote_service, :update_remote_mirror, req_enum)
end
end
end
diff --git a/lib/gitlab/gitaly_client/repository_service.rb b/lib/gitlab/gitaly_client/repository_service.rb
index fc5bfa8e850..ca3e5b51ecc 100644
--- a/lib/gitlab/gitaly_client/repository_service.rb
+++ b/lib/gitlab/gitaly_client/repository_service.rb
@@ -28,17 +28,17 @@ module Gitlab
def garbage_collect(create_bitmap)
request = Gitaly::GarbageCollectRequest.new(repository: @gitaly_repo, create_bitmap: create_bitmap)
- GitalyClient.call(@storage, :repository_service, :garbage_collect, request, timeout: GitalyClient.long_timeout)
+ GitalyClient.call(@storage, :repository_service, :garbage_collect, request)
end
def repack_full(create_bitmap)
request = Gitaly::RepackFullRequest.new(repository: @gitaly_repo, create_bitmap: create_bitmap)
- GitalyClient.call(@storage, :repository_service, :repack_full, request, timeout: GitalyClient.long_timeout)
+ GitalyClient.call(@storage, :repository_service, :repack_full, request)
end
def repack_incremental
request = Gitaly::RepackIncrementalRequest.new(repository: @gitaly_repo)
- GitalyClient.call(@storage, :repository_service, :repack_incremental, request, timeout: GitalyClient.long_timeout)
+ GitalyClient.call(@storage, :repository_service, :repack_incremental, request)
end
def repository_size
@@ -86,12 +86,12 @@ module Gitlab
end
end
- GitalyClient.call(@storage, :repository_service, :fetch_remote, request, timeout: GitalyClient.long_timeout)
+ GitalyClient.call(@storage, :repository_service, :fetch_remote, request)
end
def create_repository
request = Gitaly::CreateRepositoryRequest.new(repository: @gitaly_repo)
- GitalyClient.call(@storage, :repository_service, :create_repository, request, timeout: GitalyClient.fast_timeout)
+ GitalyClient.call(@storage, :repository_service, :create_repository, request, timeout: GitalyClient.medium_timeout)
end
def has_local_branches?
@@ -189,7 +189,6 @@ module Gitlab
:repository_service,
:fetch_source_branch,
request,
- timeout: GitalyClient.default_timeout,
remote_storage: source_repository.storage
)
@@ -198,7 +197,7 @@ module Gitlab
def fsck
request = Gitaly::FsckRequest.new(repository: @gitaly_repo)
- response = GitalyClient.call(@storage, :repository_service, :fsck, request, timeout: GitalyClient.long_timeout)
+ response = GitalyClient.call(@storage, :repository_service, :fsck, request, timeout: GitalyClient.no_timeout)
if response.error.empty?
return "", 0
@@ -212,7 +211,7 @@ module Gitlab
save_path,
:create_bundle,
Gitaly::CreateBundleRequest,
- GitalyClient.long_timeout
+ GitalyClient.no_timeout
)
end
@@ -230,7 +229,7 @@ module Gitlab
bundle_path,
:create_repository_from_bundle,
Gitaly::CreateRepositoryFromBundleRequest,
- GitalyClient.long_timeout
+ GitalyClient.no_timeout
)
end
@@ -255,7 +254,7 @@ module Gitlab
:repository_service,
:create_repository_from_snapshot,
request,
- timeout: GitalyClient.long_timeout
+ timeout: GitalyClient.no_timeout
)
end
@@ -334,7 +333,7 @@ module Gitlab
def search_files_by_content(ref, query)
request = Gitaly::SearchFilesByContentRequest.new(repository: @gitaly_repo, ref: ref, query: query)
- response = GitalyClient.call(@storage, :repository_service, :search_files_by_content, request, timeout: GitalyClient.default_timeout)
+ response = GitalyClient.call(@storage, :repository_service, :search_files_by_content, request)
search_results_from_response(response)
end
@@ -344,7 +343,7 @@ module Gitlab
repository: @gitaly_repo
)
- GitalyClient.call(@storage, :object_pool_service, :disconnect_git_alternates, request, timeout: GitalyClient.long_timeout)
+ GitalyClient.call(@storage, :object_pool_service, :disconnect_git_alternates, request)
end
private
diff --git a/lib/gitlab/gitaly_client/storage_service.rb b/lib/gitlab/gitaly_client/storage_service.rb
index 94fb0d87364..4edcb0b8ba9 100644
--- a/lib/gitlab/gitaly_client/storage_service.rb
+++ b/lib/gitlab/gitaly_client/storage_service.rb
@@ -11,14 +11,14 @@ module Gitlab
def list_directories(depth: 1)
request = Gitaly::ListDirectoriesRequest.new(storage_name: @storage, depth: depth)
- GitalyClient.call(@storage, :storage_service, :list_directories, request, timeout: GitalyClient.medium_timeout)
+ GitalyClient.call(@storage, :storage_service, :list_directories, request)
.flat_map(&:paths)
end
# Delete all repositories in the storage. This is a slow and VERY DESTRUCTIVE operation.
def delete_all_repositories
request = Gitaly::DeleteAllRepositoriesRequest.new(storage_name: @storage)
- GitalyClient.call(@storage, :storage_service, :delete_all_repositories, request, timeout: GitalyClient.long_timeout)
+ GitalyClient.call(@storage, :storage_service, :delete_all_repositories, request)
end
end
end
diff --git a/lib/gitlab/gitaly_client/wiki_service.rb b/lib/gitlab/gitaly_client/wiki_service.rb
index 15e0d7349dd..ce9faad825c 100644
--- a/lib/gitlab/gitaly_client/wiki_service.rb
+++ b/lib/gitlab/gitaly_client/wiki_service.rb
@@ -34,7 +34,7 @@ module Gitlab
end
end
- response = GitalyClient.call(@repository.storage, :wiki_service, :wiki_write_page, enum, timeout: GitalyClient.medium_timeout)
+ response = GitalyClient.call(@repository.storage, :wiki_service, :wiki_write_page, enum)
if error = response.duplicate_error.presence
raise Gitlab::Git::Wiki::DuplicatePageError, error
end
@@ -61,7 +61,7 @@ module Gitlab
end
end
- GitalyClient.call(@repository.storage, :wiki_service, :wiki_update_page, enum, timeout: GitalyClient.medium_timeout)
+ GitalyClient.call(@repository.storage, :wiki_service, :wiki_update_page, enum)
end
def delete_page(page_path, commit_details)
@@ -187,7 +187,7 @@ module Gitlab
directory: encode_binary(dir)
)
- response = GitalyClient.call(@repository.storage, :wiki_service, :wiki_get_formatted_data, request, timeout: GitalyClient.medium_timeout)
+ response = GitalyClient.call(@repository.storage, :wiki_service, :wiki_get_formatted_data, request)
response.reduce([]) { |memo, msg| memo << msg.data }.join
end
diff --git a/lib/gitlab/github_import/importer/releases_importer.rb b/lib/gitlab/github_import/importer/releases_importer.rb
index fe3a8d4aea5..9d925581441 100644
--- a/lib/gitlab/github_import/importer/releases_importer.rb
+++ b/lib/gitlab/github_import/importer/releases_importer.rb
@@ -32,11 +32,10 @@ module Gitlab
def build(release)
{
- name: release.name,
tag: release.tag_name,
description: description_for(release),
created_at: release.created_at,
- updated_at: release.created_at,
+ updated_at: release.updated_at,
released_at: release.published_at,
project_id: project.id
}
diff --git a/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb b/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb
index b30258123d4..c5fb39b7b52 100644
--- a/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb
+++ b/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb
@@ -10,9 +10,11 @@ module Gitlab
StrategyError = Class.new(StandardError)
+ AFTER_EXPORT_LOCK_FILE_NAME = '.after_export_action'
+
private
- attr_reader :project, :current_user, :lock_file
+ attr_reader :project, :current_user
public
@@ -27,9 +29,8 @@ module Gitlab
def execute(current_user, project)
@project = project
- ensure_export_ready!
- ensure_lock_files_path!
- @lock_file = File.join(lock_files_path, SecureRandom.hex)
+ return unless @project.export_status == :finished
+
@current_user = current_user
if invalid?
@@ -47,32 +48,19 @@ module Gitlab
false
ensure
delete_after_export_lock
- delete_export_file
- delete_archive_path
end
def to_json(options = {})
@options.to_h.merge!(klass: self.class.name).to_json
end
- def ensure_export_ready!
- raise StrategyError unless project.export_file_exists?
- end
-
- def ensure_lock_files_path!
- FileUtils.mkdir_p(lock_files_path) unless Dir.exist?(lock_files_path)
- end
-
- def lock_files_path
- project.import_export_shared.lock_files_path
- end
+ def self.lock_file_path(project)
+ return unless project.export_path || export_file_exists?
- def archive_path
- project.import_export_shared.archive_path
- end
+ lock_path = project.import_export_shared.archive_path
- def locks_present?
- project.import_export_shared.locks_present?
+ mkdir_p(lock_path)
+ File.join(lock_path, AFTER_EXPORT_LOCK_FILE_NAME)
end
protected
@@ -81,33 +69,25 @@ module Gitlab
raise NotImplementedError
end
- def delete_export?
- true
- end
-
private
- def delete_export_file
- return if locks_present? || !delete_export?
-
- project.remove_exports
- end
-
- def delete_archive_path
- FileUtils.rm_rf(archive_path) if File.directory?(archive_path)
- end
-
def create_or_update_after_export_lock
- FileUtils.touch(lock_file)
+ FileUtils.touch(self.class.lock_file_path(project))
end
def delete_after_export_lock
+ lock_file = self.class.lock_file_path(project)
+
FileUtils.rm(lock_file) if lock_file.present? && File.exist?(lock_file)
end
def log_validation_errors
errors.full_messages.each { |msg| project.import_export_shared.add_error_message(msg) }
end
+
+ def export_file_exists?
+ project.export_file_exists?
+ end
end
end
end
diff --git a/lib/gitlab/import_export/after_export_strategies/download_notification_strategy.rb b/lib/gitlab/import_export/after_export_strategies/download_notification_strategy.rb
index 39a6090ad87..1b391314a74 100644
--- a/lib/gitlab/import_export/after_export_strategies/download_notification_strategy.rb
+++ b/lib/gitlab/import_export/after_export_strategies/download_notification_strategy.rb
@@ -4,12 +4,6 @@ module Gitlab
module ImportExport
module AfterExportStrategies
class DownloadNotificationStrategy < BaseAfterExportStrategy
- protected
-
- def delete_export?
- false
- end
-
private
def strategy_execute
diff --git a/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb b/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb
index fd98bc2caad..aaa70f0b36d 100644
--- a/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb
+++ b/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb
@@ -24,6 +24,8 @@ module Gitlab
def strategy_execute
handle_response_error(send_file)
+
+ project.remove_exports
end
def handle_response_error(response)
diff --git a/lib/gitlab/import_export/shared.rb b/lib/gitlab/import_export/shared.rb
index 9144a4406cd..725c1101d70 100644
--- a/lib/gitlab/import_export/shared.rb
+++ b/lib/gitlab/import_export/shared.rb
@@ -1,32 +1,10 @@
# frozen_string_literal: true
-#
-# This class encapsulates the directories used by project import/export:
-#
-# 1. The project export job first generates the project metadata tree
-# (e.g. `project.json) and repository bundle (e.g. `project.bundle`)
-# inside a temporary `export_path`
-# (e.g. /path/to/shared/tmp/project_exports/namespace/project/:randomA/:randomB).
-#
-# 2. The job then creates a tarball (e.g. `project.tar.gz`) in
-# `archive_path` (e.g. /path/to/shared/tmp/project_exports/namespace/project/:randomA).
-# CarrierWave moves this tarball files into its permanent location.
-#
-# 3. Lock files are used to indicate whether a project is in the
-# `after_export` state. These are stored in a directory
-# (e.g. /path/to/shared/tmp/project_exports/namespace/project/locks. The
-# number of lock files present signifies how many concurrent project
-# exports are running. Note that this assumes the temporary directory
-# is a shared mount:
-# https://gitlab.com/gitlab-org/gitlab/issues/32203
-#
-# NOTE: Stale files should be cleaned up via ImportExportCleanupService.
+
module Gitlab
module ImportExport
class Shared
attr_reader :errors, :project
- LOCKS_DIRECTORY = 'locks'
-
def initialize(project)
@project = project
@errors = []
@@ -34,27 +12,17 @@ module Gitlab
end
def active_export_count
- Dir[File.join(base_path, '*')].count { |name| File.basename(name) != LOCKS_DIRECTORY && File.directory?(name) }
+ Dir[File.join(archive_path, '*')].count { |name| File.directory?(name) }
end
- # The path where the project metadata and repository bundle is saved
def export_path
@export_path ||= Gitlab::ImportExport.export_path(relative_path: relative_path)
end
- # The path where the tarball is saved
def archive_path
@archive_path ||= Gitlab::ImportExport.export_path(relative_path: relative_archive_path)
end
- def base_path
- @base_path ||= Gitlab::ImportExport.export_path(relative_path: relative_base_path)
- end
-
- def lock_files_path
- @locks_files_path ||= File.join(base_path, LOCKS_DIRECTORY)
- end
-
def error(error)
log_error(message: error.message, caller: caller[0].dup)
log_debug(backtrace: error.backtrace&.join("\n"))
@@ -69,24 +37,16 @@ module Gitlab
end
def after_export_in_progress?
- locks_present?
- end
-
- def locks_present?
- Dir.exist?(lock_files_path) && !Dir.empty?(lock_files_path)
+ File.exist?(after_export_lock_file)
end
private
def relative_path
- @relative_path ||= File.join(relative_archive_path, SecureRandom.hex)
+ File.join(relative_archive_path, SecureRandom.hex)
end
def relative_archive_path
- @relative_archive_path ||= File.join(@project.disk_path, SecureRandom.hex)
- end
-
- def relative_base_path
@project.disk_path
end
@@ -110,6 +70,10 @@ module Gitlab
def filtered_error_message(message)
Projects::ImportErrorFilter.filter_message(message)
end
+
+ def after_export_lock_file
+ AfterExportStrategies::BaseAfterExportStrategy.lock_file_path(project)
+ end
end
end
end
diff --git a/lib/gitlab/quick_actions/issue_actions.rb b/lib/gitlab/quick_actions/issue_actions.rb
index 404e0c31871..7e64fe2a1f4 100644
--- a/lib/gitlab/quick_actions/issue_actions.rb
+++ b/lib/gitlab/quick_actions/issue_actions.rb
@@ -135,8 +135,7 @@ module Gitlab
end
types Issue
condition do
- !quick_action_target.confidential? &&
- current_user.can?(:"admin_#{quick_action_target.to_ability_name}", quick_action_target)
+ current_user.can?(:"admin_#{quick_action_target.to_ability_name}", quick_action_target)
end
command :confidential do
@updates[:confidential] = true
diff --git a/lib/gitlab/sidekiq_daemon/memory_killer.rb b/lib/gitlab/sidekiq_daemon/memory_killer.rb
deleted file mode 100644
index 25b91318dfe..00000000000
--- a/lib/gitlab/sidekiq_daemon/memory_killer.rb
+++ /dev/null
@@ -1,221 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module SidekiqDaemon
- class MemoryKiller < Daemon
- include ::Gitlab::Utils::StrongMemoize
-
- # Today 64-bit CPU support max 256T memory. It is big enough.
- MAX_MEMORY_KB = 256 * 1024 * 1024 * 1024
- # RSS below `soft_limit_rss` is considered safe
- SOFT_LIMIT_RSS_KB = ENV.fetch('SIDEKIQ_MEMORY_KILLER_MAX_RSS', 2000000).to_i
- # RSS above `hard_limit_rss` will be stopped
- HARD_LIMIT_RSS_KB = ENV.fetch('SIDEKIQ_MEMORY_KILLER_HARD_LIMIT_RSS', MAX_MEMORY_KB).to_i
- # RSS in range (soft_limit_rss, hard_limit_rss) is allowed for GRACE_BALLOON_SECONDS
- GRACE_BALLOON_SECONDS = ENV.fetch('SIDEKIQ_MEMORY_KILLER_GRACE_TIME', 15 * 60).to_i
- # Check RSS every CHECK_INTERVAL_SECONDS, minimum 2 seconds
- CHECK_INTERVAL_SECONDS = [ENV.fetch('SIDEKIQ_MEMORY_KILLER_CHECK_INTERVAL', 3).to_i, 2].max
- # Give Sidekiq up to 30 seconds to allow existing jobs to finish after exceeding the limit
- SHUTDOWN_TIMEOUT_SECONDS = ENV.fetch('SIDEKIQ_MEMORY_KILLER_SHUTDOWN_WAIT', 30).to_i
- # Developer/admin should always set `memory_killer_max_memory_growth_kb` explicitly
- # In case not set, default to 300M. This is for extra-safe.
- DEFAULT_MAX_MEMORY_GROWTH_KB = 300_000
-
- def initialize
- super
-
- @enabled = true
- end
-
- private
-
- def start_working
- Sidekiq.logger.info(
- class: self.class.to_s,
- action: 'start',
- pid: pid,
- message: 'Starting Gitlab::SidekiqDaemon::MemoryKiller Daemon'
- )
-
- while enabled?
- begin
- restart_sidekiq unless rss_within_range?
- sleep(CHECK_INTERVAL_SECONDS)
- rescue => e
- log_exception(e, __method__)
- rescue Exception => e # rubocop:disable Lint/RescueException
- log_exception(e, __method__ )
- raise e
- end
- end
- ensure
- Sidekiq.logger.warn(
- class: self.class.to_s,
- action: 'stop',
- pid: pid,
- message: 'Stopping Gitlab::SidekiqDaemon::MemoryKiller Daemon'
- )
- end
-
- def log_exception(exception, method)
- Sidekiq.logger.warn(
- class: self.class.to_s,
- pid: pid,
- message: "Exception from #{method}: #{exception.message}"
- )
- end
-
- def stop_working
- @enabled = false
- end
-
- def enabled?
- @enabled
- end
-
- def restart_sidekiq
- # Tell Sidekiq to stop fetching new jobs
- # We first SIGNAL and then wait given time
- # We also monitor a number of running jobs and allow to restart early
- signal_and_wait(SHUTDOWN_TIMEOUT_SECONDS, 'SIGTSTP', 'stop fetching new jobs')
- return unless enabled?
-
- # Tell sidekiq to restart itself
- # Keep extra safe to wait `Sidekiq.options[:timeout] + 2` seconds before SIGKILL
- signal_and_wait(Sidekiq.options[:timeout] + 2, 'SIGTERM', 'gracefully shut down')
- return unless enabled?
-
- # Ideally we should never reach this condition
- # Wait for Sidekiq to shutdown gracefully, and kill it if it didn't
- # Kill the whole pgroup, so we can be sure no children are left behind
- signal_pgroup('SIGKILL', 'die')
- end
-
- def rss_within_range?
- current_rss = nil
- deadline = Gitlab::Metrics::System.monotonic_time + GRACE_BALLOON_SECONDS.seconds
- loop do
- return true unless enabled?
-
- current_rss = get_rss
-
- # RSS go above hard limit should trigger forcible shutdown right away
- break if current_rss > hard_limit_rss
-
- # RSS go below the soft limit
- return true if current_rss < soft_limit_rss
-
- # RSS did not go below the soft limit within deadline, restart
- break if Gitlab::Metrics::System.monotonic_time > deadline
-
- sleep(CHECK_INTERVAL_SECONDS)
- end
-
- log_rss_out_of_range(current_rss, hard_limit_rss, soft_limit_rss)
-
- false
- end
-
- def log_rss_out_of_range(current_rss, hard_limit_rss, soft_limit_rss)
- Sidekiq.logger.warn(
- class: self.class.to_s,
- pid: pid,
- message: 'Sidekiq worker RSS out of range',
- current_rss: current_rss,
- hard_limit_rss: hard_limit_rss,
- soft_limit_rss: soft_limit_rss,
- reason: out_of_range_description(current_rss, hard_limit_rss, soft_limit_rss)
- )
- end
-
- def out_of_range_description(rss, hard_limit, soft_limit)
- if rss > hard_limit
- "current_rss(#{rss}) > hard_limit_rss(#{hard_limit})"
- else
- "current_rss(#{rss}) > soft_limit_rss(#{soft_limit}) longer than GRACE_BALLOON_SECONDS(#{GRACE_BALLOON_SECONDS})"
- end
- end
-
- def get_rss
- output, status = Gitlab::Popen.popen(%W(ps -o rss= -p #{pid}), Rails.root.to_s)
- return 0 unless status&.zero?
-
- output.to_i
- end
-
- def soft_limit_rss
- SOFT_LIMIT_RSS_KB + rss_increase_by_jobs
- end
-
- def hard_limit_rss
- HARD_LIMIT_RSS_KB
- end
-
- def signal_and_wait(time, signal, explanation)
- Sidekiq.logger.warn(
- class: self.class.to_s,
- pid: pid,
- signal: signal,
- explanation: explanation,
- wait_time: time,
- message: "Sending signal and waiting"
- )
- Process.kill(signal, pid)
-
- deadline = Gitlab::Metrics::System.monotonic_time + time
-
- # we try to finish as early as all jobs finished
- # so we retest that in loop
- sleep(CHECK_INTERVAL_SECONDS) while enabled? && any_jobs? && Gitlab::Metrics::System.monotonic_time < deadline
- end
-
- def signal_pgroup(signal, explanation)
- if Process.getpgrp == pid
- pid_or_pgrp_str = 'PGRP'
- pid_to_signal = 0
- else
- pid_or_pgrp_str = 'PID'
- pid_to_signal = pid
- end
-
- Sidekiq.logger.warn(
- class: self.class.to_s,
- signal: signal,
- pid: pid,
- message: "sending Sidekiq worker #{pid_or_pgrp_str}-#{pid} #{signal} (#{explanation})"
- )
- Process.kill(signal, pid_to_signal)
- end
-
- def rss_increase_by_jobs
- Gitlab::SidekiqDaemon::Monitor.instance.jobs.sum do |job| # rubocop:disable CodeReuse/ActiveRecord
- rss_increase_by_job(job)
- end
- end
-
- def rss_increase_by_job(job)
- memory_growth_kb = get_job_options(job, 'memory_killer_memory_growth_kb', 0).to_i
- max_memory_growth_kb = get_job_options(job, 'memory_killer_max_memory_growth_kb', DEFAULT_MAX_MEMORY_GROWTH_KB).to_i
-
- return 0 if memory_growth_kb.zero?
-
- time_elapsed = [Gitlab::Metrics::System.monotonic_time - job[:started_at], 0].max
- [memory_growth_kb * time_elapsed, max_memory_growth_kb].min
- end
-
- def get_job_options(job, key, default)
- job[:worker_class].sidekiq_options.fetch(key, default)
- rescue
- default
- end
-
- def pid
- Process.pid
- end
-
- def any_jobs?
- Gitlab::SidekiqDaemon::Monitor.instance.jobs.any?
- end
- end
- end
-end
diff --git a/lib/gitlab/sidekiq_daemon/monitor.rb b/lib/gitlab/sidekiq_daemon/monitor.rb
index 09f30837cd2..bbfca130425 100644
--- a/lib/gitlab/sidekiq_daemon/monitor.rb
+++ b/lib/gitlab/sidekiq_daemon/monitor.rb
@@ -14,19 +14,19 @@ module Gitlab
# that should not be caught by application
CancelledError = Class.new(Exception) # rubocop:disable Lint/InheritException
- attr_reader :jobs
+ attr_reader :jobs_thread
attr_reader :jobs_mutex
def initialize
super
- @jobs = {}
+ @jobs_thread = {}
@jobs_mutex = Mutex.new
end
- def within_job(worker_class, jid, queue)
+ def within_job(jid, queue)
jobs_mutex.synchronize do
- jobs[jid] = { worker_class: worker_class, thread: Thread.current, started_at: Gitlab::Metrics::System.monotonic_time }
+ jobs_thread[jid] = Thread.current
end
if cancelled?(jid)
@@ -43,7 +43,7 @@ module Gitlab
yield
ensure
jobs_mutex.synchronize do
- jobs.delete(jid)
+ jobs_thread.delete(jid)
end
end
@@ -62,27 +62,23 @@ module Gitlab
private
def start_working
- return unless notification_channel_enabled?
-
- begin
- Sidekiq.logger.info(
- class: self.class.to_s,
- action: 'start',
- message: 'Starting Monitor Daemon'
- )
-
- while enabled?
- process_messages
- sleep(RECONNECT_TIME)
- end
+ Sidekiq.logger.info(
+ class: self.class.to_s,
+ action: 'start',
+ message: 'Starting Monitor Daemon'
+ )
- ensure
- Sidekiq.logger.warn(
- class: self.class.to_s,
- action: 'stop',
- message: 'Stopping Monitor Daemon'
- )
+ while enabled?
+ process_messages
+ sleep(RECONNECT_TIME)
end
+
+ ensure
+ Sidekiq.logger.warn(
+ class: self.class.to_s,
+ action: 'stop',
+ message: 'Stopping Monitor Daemon'
+ )
end
def stop_working
@@ -160,7 +156,7 @@ module Gitlab
# This is why it passes thread in block,
# to ensure that we do process this thread
def find_thread_unsafe(jid)
- jobs.dig(jid, :thread)
+ jobs_thread[jid]
end
def find_thread_with_lock(jid)
@@ -183,10 +179,6 @@ module Gitlab
def self.cancel_job_key(jid)
"sidekiq:cancel:#{jid}"
end
-
- def notification_channel_enabled?
- ENV.fetch("SIDEKIQ_MONITOR_WORKER", 0).to_i.nonzero?
- end
end
end
end
diff --git a/lib/gitlab/sidekiq_middleware/monitor.rb b/lib/gitlab/sidekiq_middleware/monitor.rb
index ed825dbfd60..00965bf5506 100644
--- a/lib/gitlab/sidekiq_middleware/monitor.rb
+++ b/lib/gitlab/sidekiq_middleware/monitor.rb
@@ -4,7 +4,7 @@ module Gitlab
module SidekiqMiddleware
class Monitor
def call(worker, job, queue)
- Gitlab::SidekiqDaemon::Monitor.instance.within_job(worker.class, job['jid'], queue) do
+ Gitlab::SidekiqDaemon::Monitor.instance.within_job(job['jid'], queue) do
yield
end
rescue Gitlab::SidekiqDaemon::Monitor::CancelledError
diff --git a/lib/gitlab/uploads/migration_helper.rb b/lib/gitlab/uploads/migration_helper.rb
deleted file mode 100644
index 4ff064007f1..00000000000
--- a/lib/gitlab/uploads/migration_helper.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module Uploads
- class MigrationHelper
- attr_reader :logger
-
- CATEGORIES = [%w(AvatarUploader Project :avatar),
- %w(AvatarUploader Group :avatar),
- %w(AvatarUploader User :avatar),
- %w(AttachmentUploader Note :attachment),
- %w(AttachmentUploader Appearance :logo),
- %w(AttachmentUploader Appearance :header_logo),
- %w(FaviconUploader Appearance :favicon),
- %w(FileUploader Project),
- %w(PersonalFileUploader Snippet),
- %w(NamespaceFileUploader Snippet),
- %w(FileUploader MergeRequest)].freeze
-
- def initialize(args, logger)
- prepare_variables(args, logger)
- end
-
- def migrate_to_remote_storage
- @to_store = ObjectStorage::Store::REMOTE
-
- uploads.each_batch(of: batch_size, &method(:enqueue_batch))
- end
-
- def migrate_to_local_storage
- @to_store = ObjectStorage::Store::LOCAL
-
- uploads(ObjectStorage::Store::REMOTE).each_batch(of: batch_size, &method(:enqueue_batch))
- end
-
- private
-
- def batch_size
- ENV.fetch('MIGRATION_BATCH_SIZE', 200).to_i
- end
-
- def prepare_variables(args, logger)
- @mounted_as = args.mounted_as&.gsub(':', '')&.to_sym
- @uploader_class = args.uploader_class.constantize
- @model_class = args.model_class.constantize
- @logger = logger
- end
-
- def enqueue_batch(batch, index)
- job = ObjectStorage::MigrateUploadsWorker.enqueue!(batch,
- @model_class,
- @mounted_as,
- @to_store)
- logger.info(message: "[Uploads migration] Enqueued upload migration job", index: index, job_id: job)
- rescue ObjectStorage::MigrateUploadsWorker::SanityCheckError => e
- # continue for the next batch
- logger.warn(message: "[Uploads migration] Could not enqueue batch", ids: batch.ids, reason: e.message) # rubocop:disable CodeReuse/ActiveRecord
- end
-
- # rubocop:disable CodeReuse/ActiveRecord
- def uploads(store_type = [nil, ObjectStorage::Store::LOCAL])
- Upload.class_eval { include EachBatch } unless Upload < EachBatch
-
- Upload
- .where(store: store_type,
- uploader: @uploader_class.to_s,
- model_type: @model_class.base_class.sti_name)
- end
- # rubocop:enable CodeReuse/ActiveRecord
- end
- end
-end
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb
index ed2693aaedf..c6c2876033d 100644
--- a/lib/gitlab/usage_data.rb
+++ b/lib/gitlab/usage_data.rb
@@ -116,7 +116,6 @@ module Gitlab
def features_usage_data_ce
{
container_registry_enabled: Gitlab.config.registry.enabled,
- dependency_proxy_enabled: Gitlab.config.try(:dependency_proxy)&.enabled,
gitlab_shared_runners_enabled: Gitlab.config.gitlab_ci.shared_runners_enabled,
gravatar_enabled: Gitlab::CurrentSettings.gravatar_enabled?,
influxdb_metrics_enabled: Gitlab::Metrics.influx_metrics_enabled?,
diff --git a/lib/tasks/gitlab/artifacts/migrate.rake b/lib/tasks/gitlab/artifacts/migrate.rake
index 0d09fd0a4e3..9012e55a70c 100644
--- a/lib/tasks/gitlab/artifacts/migrate.rake
+++ b/lib/tasks/gitlab/artifacts/migrate.rake
@@ -6,31 +6,18 @@ namespace :gitlab do
namespace :artifacts do
task migrate: :environment do
logger = Logger.new(STDOUT)
- logger.info('Starting transfer of artifacts to remote storage')
+ logger.info('Starting transfer of artifacts')
- helper = Gitlab::Artifacts::MigrationHelper.new
+ Ci::Build.joins(:project)
+ .with_artifacts_stored_locally
+ .find_each(batch_size: 10) do |build|
- begin
- helper.migrate_to_remote_storage do |artifact|
- logger.info("Transferred artifact ID #{artifact.id} of type #{artifact.file_type} with size #{artifact.size} to object storage")
- end
- rescue => e
- logger.error(e.message)
- end
- end
-
- task migrate_to_local: :environment do
- logger = Logger.new(STDOUT)
- logger.info('Starting transfer of artifacts to local storage')
-
- helper = Gitlab::Artifacts::MigrationHelper.new
+ build.artifacts_file.migrate!(ObjectStorage::Store::REMOTE)
+ build.artifacts_metadata.migrate!(ObjectStorage::Store::REMOTE)
- begin
- helper.migrate_to_local_storage do |artifact|
- logger.info("Transferred artifact ID #{artifact.id} of type #{artifact.file_type} with size #{artifact.size} to local storage")
- end
+ logger.info("Transferred artifact ID #{build.id} with size #{build.artifacts_size} to object storage")
rescue => e
- logger.error(e.message)
+ logger.error("Failed to transfer artifacts of #{build.id} with error: #{e.message}")
end
end
end
diff --git a/lib/tasks/gitlab/lfs/migrate.rake b/lib/tasks/gitlab/lfs/migrate.rake
index 4142903d9c3..97c15175a23 100644
--- a/lib/tasks/gitlab/lfs/migrate.rake
+++ b/lib/tasks/gitlab/lfs/migrate.rake
@@ -17,20 +17,5 @@ namespace :gitlab do
logger.error("Failed to transfer LFS object #{lfs_object.oid} with error: #{e.message}")
end
end
-
- task migrate_to_local: :environment do
- logger = Logger.new(STDOUT)
- logger.info('Starting transfer of LFS files to local storage')
-
- LfsObject.with_files_stored_remotely
- .find_each(batch_size: 10) do |lfs_object|
-
- lfs_object.file.migrate!(LfsObjectUploader::Store::LOCAL)
-
- logger.info("Transferred LFS object #{lfs_object.oid} of size #{lfs_object.size.to_i.bytes} to local storage")
- rescue => e
- logger.error("Failed to transfer LFS object #{lfs_object.oid} with error: #{e.message}")
- end
- end
end
end
diff --git a/lib/tasks/gitlab/traces.rake b/lib/tasks/gitlab/traces.rake
new file mode 100644
index 00000000000..5e1ec481ece
--- /dev/null
+++ b/lib/tasks/gitlab/traces.rake
@@ -0,0 +1,38 @@
+require 'logger'
+require 'resolv-replace'
+
+desc "GitLab | Archive legacy traces to trace artifacts"
+namespace :gitlab do
+ namespace :traces do
+ task archive: :environment do
+ logger = Logger.new(STDOUT)
+ logger.info('Archiving legacy traces')
+
+ Ci::Build.finished.without_archived_trace
+ .order(id: :asc)
+ .find_in_batches(batch_size: 1000) do |jobs|
+ job_ids = jobs.map { |job| [job.id] }
+
+ ArchiveTraceWorker.bulk_perform_async(job_ids)
+
+ logger.info("Scheduled #{job_ids.count} jobs. From #{job_ids.min} to #{job_ids.max}")
+ end
+ end
+
+ task migrate: :environment do
+ logger = Logger.new(STDOUT)
+ logger.info('Starting transfer of job traces')
+
+ Ci::Build.joins(:project)
+ .with_archived_trace_stored_locally
+ .find_each(batch_size: 10) do |build|
+
+ build.job_artifacts_trace.file.migrate!(ObjectStorage::Store::REMOTE)
+
+ logger.info("Transferred job trace of #{build.id} to object storage")
+ rescue => e
+ logger.error("Failed to transfer artifacts of #{build.id} with error: #{e.message}")
+ end
+ end
+ end
+end
diff --git a/lib/tasks/gitlab/uploads/migrate.rake b/lib/tasks/gitlab/uploads/migrate.rake
index 44536a447c7..1c93609a006 100644
--- a/lib/tasks/gitlab/uploads/migrate.rake
+++ b/lib/tasks/gitlab/uploads/migrate.rake
@@ -3,7 +3,19 @@ namespace :gitlab do
namespace :migrate do
desc "GitLab | Uploads | Migrate all uploaded files to object storage"
task all: :environment do
- Gitlab::Uploads::MigrationHelper::CATEGORIES.each do |args|
+ categories = [%w(AvatarUploader Project :avatar),
+ %w(AvatarUploader Group :avatar),
+ %w(AvatarUploader User :avatar),
+ %w(AttachmentUploader Note :attachment),
+ %w(AttachmentUploader Appearance :logo),
+ %w(AttachmentUploader Appearance :header_logo),
+ %w(FaviconUploader Appearance :favicon),
+ %w(FileUploader Project),
+ %w(PersonalFileUploader Snippet),
+ %w(NamespaceFileUploader Snippet),
+ %w(FileUploader MergeRequest)]
+
+ categories.each do |args|
Rake::Task["gitlab:uploads:migrate"].invoke(*args)
Rake::Task["gitlab:uploads:migrate"].reenable
end
@@ -13,23 +25,34 @@ namespace :gitlab do
# The following is the actual rake task that migrates uploads of specified
# category to object storage
desc 'GitLab | Uploads | Migrate the uploaded files of specified type to object storage'
- task :migrate, [:uploader_class, :model_class, :mounted_as] => :environment do |_t, args|
- Gitlab::Uploads::MigrationHelper.new(args, Logger.new(STDOUT)).migrate_to_remote_storage
+ task :migrate, [:uploader_class, :model_class, :mounted_as] => :environment do |task, args|
+ batch_size = ENV.fetch('BATCH', 200).to_i
+ @to_store = ObjectStorage::Store::REMOTE
+ @mounted_as = args.mounted_as&.gsub(':', '')&.to_sym
+ @uploader_class = args.uploader_class.constantize
+ @model_class = args.model_class.constantize
+
+ uploads.each_batch(of: batch_size, &method(:enqueue_batch))
end
- namespace :migrate_to_local do
- desc "GitLab | Uploads | Migrate all uploaded files to local storage"
- task all: :environment do
- Gitlab::Uploads::MigrationHelper::CATEGORIES.each do |args|
- Rake::Task["gitlab:uploads:migrate_to_local"].invoke(*args)
- Rake::Task["gitlab:uploads:migrate_to_local"].reenable
- end
- end
+ def enqueue_batch(batch, index)
+ job = ObjectStorage::MigrateUploadsWorker.enqueue!(batch,
+ @model_class,
+ @mounted_as,
+ @to_store)
+ puts "Enqueued job ##{index}: #{job}"
+ rescue ObjectStorage::MigrateUploadsWorker::SanityCheckError => e
+ # continue for the next batch
+ puts "Could not enqueue batch (#{batch.ids}) #{e.message}".color(:red)
end
- desc 'GitLab | Uploads | Migrate the uploaded files of specified type to local storage'
- task :migrate_to_local, [:uploader_class, :model_class, :mounted_as] => :environment do |_t, args|
- Gitlab::Uploads::MigrationHelper.new(args, Logger.new(STDOUT)).migrate_to_local_storage
+ def uploads
+ Upload.class_eval { include EachBatch } unless Upload < EachBatch
+
+ Upload
+ .where(store: [nil, ObjectStorage::Store::LOCAL],
+ uploader: @uploader_class.to_s,
+ model_type: @model_class.base_class.sti_name)
end
end
end
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 9be6cbca00c..1c1d941940e 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -1453,9 +1453,6 @@ msgstr ""
msgid "An error occurred while fetching this tab."
msgstr ""
-msgid "An error occurred while generating a username. Please try again."
-msgstr ""
-
msgid "An error occurred while getting projects"
msgstr ""
@@ -1860,12 +1857,6 @@ msgstr ""
msgid "Artifact ID"
msgstr ""
-msgid "Artifact could not be deleted."
-msgstr ""
-
-msgid "Artifact was successfully deleted."
-msgstr ""
-
msgid "Artifacts"
msgstr ""
@@ -2665,9 +2656,6 @@ msgstr ""
msgid "CLOSED"
msgstr ""
-msgid "CLOSED (MOVED)"
-msgstr ""
-
msgid "CONTRIBUTING"
msgstr ""
@@ -6747,9 +6735,6 @@ msgstr ""
msgid "First day of the week"
msgstr ""
-msgid "First name"
-msgstr ""
-
msgid "Fixed date"
msgstr ""
@@ -8033,9 +8018,6 @@ msgstr ""
msgid "However, you are already a member of this %{member_source}. Sign in using a different account to accept the invitation."
msgstr ""
-msgid "I accept the %{terms_link_start}Terms of Service and Privacy Policy%{terms_link_end}"
-msgstr ""
-
msgid "I accept the %{terms_link}"
msgstr ""
@@ -8048,9 +8030,6 @@ msgstr ""
msgid "I have read and agree to the Let's Encrypt %{link_start}Terms of Service%{link_end}"
msgstr ""
-msgid "I'd like to receive updates via email about GitLab"
-msgstr ""
-
msgid "ID"
msgstr ""
@@ -8270,7 +8249,7 @@ msgstr ""
msgid "ImportProjects|The repository could not be created."
msgstr ""
-msgid "ImportProjects|Update of imported projects with realtime changes failed"
+msgid "ImportProjects|Updating the imported projects failed"
msgstr ""
msgid "Improve Issue boards"
@@ -8937,9 +8916,6 @@ msgstr ""
msgid "Last edited by %{name}"
msgstr ""
-msgid "Last name"
-msgstr ""
-
msgid "Last reply by"
msgstr ""
@@ -10214,7 +10190,7 @@ msgstr ""
msgid "No %{header} for this request."
msgstr ""
-msgid "No %{providerTitle} repositories found"
+msgid "No %{providerTitle} repositories available to import"
msgstr ""
msgid "No Epic"
@@ -10238,9 +10214,6 @@ msgstr ""
msgid "No application_settings found"
msgstr ""
-msgid "No authentication methods configured."
-msgstr ""
-
msgid "No available namespaces to fork the project."
msgstr ""
@@ -10627,9 +10600,6 @@ msgstr ""
msgid "One or more of your dependency files are not supported, and the dependency list may be incomplete. Below is a list of supported file types."
msgstr ""
-msgid "Only 'Reporter' roles and above on tiers Premium / Silver and above can see Cycle Analytics."
-msgstr ""
-
msgid "Only Project Members"
msgstr ""
@@ -10774,9 +10744,6 @@ msgstr ""
msgid "Other visibility settings have been disabled by the administrator."
msgstr ""
-msgid "Our Privacy Policy has changed, please visit %{privacy_policy_link} to review these changes."
-msgstr ""
-
msgid "Outbound requests"
msgstr ""
@@ -12744,9 +12711,6 @@ msgstr ""
msgid "Releases mark specific points in a project's development history, communicate information about the type of change, and deliver on prepared, often compiled, versions of the software to be reused elsewhere. Currently, releases can only be created through the API."
msgstr ""
-msgid "Remember me"
-msgstr ""
-
msgid "Remind later"
msgstr ""
@@ -13089,9 +13053,6 @@ msgstr ""
msgid "Require users to prove ownership of custom domains"
msgstr ""
-msgid "Required argument 'targetElement' is missing"
-msgstr ""
-
msgid "Requires approval from %{names}."
msgid_plural "Requires %{count} more approvals from %{names}."
msgstr[0] ""
@@ -13560,14 +13521,6 @@ msgstr ""
msgid "SearchResults|Showing %{from} - %{to} of %{count} %{scope} for \"%{term}\""
msgstr ""
-msgid "SearchResults|We couldn't find any %{scope} matching %{term}"
-msgstr ""
-
-msgid "SearchResults|code result"
-msgid_plural "SearchResults|code results"
-msgstr[0] ""
-msgstr[1] ""
-
msgid "SearchResults|comment"
msgid_plural "SearchResults|comments"
msgstr[0] ""
@@ -13598,13 +13551,13 @@ msgid_plural "SearchResults|projects"
msgstr[0] ""
msgstr[1] ""
-msgid "SearchResults|snippet"
-msgid_plural "SearchResults|snippets"
+msgid "SearchResults|result"
+msgid_plural "SearchResults|results"
msgstr[0] ""
msgstr[1] ""
-msgid "SearchResults|snippet result"
-msgid_plural "SearchResults|snippet results"
+msgid "SearchResults|snippet"
+msgid_plural "SearchResults|snippets"
msgstr[0] ""
msgstr[1] ""
@@ -13613,11 +13566,6 @@ msgid_plural "SearchResults|users"
msgstr[0] ""
msgstr[1] ""
-msgid "SearchResults|wiki result"
-msgid_plural "SearchResults|wiki results"
-msgstr[0] ""
-msgstr[1] ""
-
msgid "Seats currently in use"
msgstr ""
@@ -14047,10 +13995,10 @@ msgstr ""
msgid "Set up CI/CD"
msgstr ""
-msgid "Set up a %{type} Runner automatically"
+msgid "Set up a %{type} Runner manually"
msgstr ""
-msgid "Set up a %{type} Runner manually"
+msgid "Set up a specific Runner automatically"
msgstr ""
msgid "Set up assertions/attributes/claims (email, first_name, last_name) and NameID according to %{docsLinkStart}the documentation %{icon}%{docsLinkEnd}"
@@ -14262,12 +14210,6 @@ msgstr ""
msgid "Sign-up restrictions"
msgstr ""
-msgid "SignUp|First Name is too long (maximum is %{max_length} characters)."
-msgstr ""
-
-msgid "SignUp|Last Name is too long (maximum is %{max_length} characters)."
-msgstr ""
-
msgid "SignUp|Name is too long (maximum is %{max_length} characters)."
msgstr ""
@@ -14505,9 +14447,6 @@ msgstr ""
msgid "SortOptions|Due soon"
msgstr ""
-msgid "SortOptions|Expired date"
-msgstr ""
-
msgid "SortOptions|Label priority"
msgstr ""
@@ -14598,9 +14537,6 @@ msgstr ""
msgid "SortOptions|Recently starred"
msgstr ""
-msgid "SortOptions|Size"
-msgstr ""
-
msgid "SortOptions|Sort direction"
msgstr ""
@@ -14718,9 +14654,6 @@ msgstr ""
msgid "Start a %{new_merge_request} with these changes"
msgstr ""
-msgid "Start a Free Trial"
-msgstr ""
-
msgid "Start a new discussion..."
msgstr ""
@@ -14736,7 +14669,7 @@ msgstr ""
msgid "Start by choosing a group to see how your team is spending time. You can then drill down to the project level."
msgstr ""
-msgid "Start by choosing a group to start exploring the merge requests in that group. You can then proceed to filter by projects, labels, milestones and authors."
+msgid "Start by choosing a group to start exploring the merge requests in that group. You can then proceed to filter by projects, labels, milestones, authors and assignees."
msgstr ""
msgid "Start cleanup"
@@ -15302,9 +15235,6 @@ msgid_plural "The %{type} contains the following errors:"
msgstr[0] ""
msgstr[1] ""
-msgid "The API path was not specified."
-msgstr ""
-
msgid "The Advanced Global Search in GitLab is a powerful search service that saves you time. Instead of creating duplicate code and wasting time, you can now search for code within other teams that can help your own project."
msgstr ""
@@ -15536,9 +15466,6 @@ msgstr ""
msgid "The staging stage shows the time between merging the MR and deploying code to the production environment. The data will be automatically added once you deploy to production for the first time."
msgstr ""
-msgid "The target element is missing."
-msgstr ""
-
msgid "The testing stage shows the time GitLab CI takes to run every pipeline for the related merge request. The data will automatically be added after your first pipeline finishes running."
msgstr ""
@@ -17535,6 +17462,9 @@ msgstr ""
msgid "We could not determine the path to remove the issue"
msgstr ""
+msgid "We couldn't find any results matching"
+msgstr ""
+
msgid "We created a short guided tour that will help you learn the basics of GitLab and how it will help you be better at your job. It should only take a couple of minutes. You will be guided by two types of helpers, best recognized by their color."
msgstr ""
@@ -17987,10 +17917,7 @@ msgstr ""
msgid "You don't have any recent searches"
msgstr ""
-msgid "You don’t have access to Cycle Analytics for this group"
-msgstr ""
-
-msgid "You don’t have access to Productivity Analytics in this group"
+msgid "You don’t have acces to Productivity Analaytics in this group"
msgstr ""
msgid "You have been granted %{access_level} access to the %{source_link} %{source_type}."
diff --git a/package.json b/package.json
index 9e1ea86b692..c468f7875ae 100644
--- a/package.json
+++ b/package.json
@@ -37,9 +37,9 @@
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-syntax-import-meta": "^7.2.0",
"@babel/preset-env": "^7.5.5",
- "@gitlab/svgs": "^1.74.0",
- "@gitlab/ui": "5.26.0",
- "@gitlab/visual-review-tools": "1.0.2",
+ "@gitlab/svgs": "^1.73.0",
+ "@gitlab/ui": "5.25.2",
+ "@gitlab/visual-review-tools": "1.0.1",
"apollo-cache-inmemory": "^1.5.1",
"apollo-client": "^2.5.1",
"apollo-link": "^1.2.11",
@@ -133,6 +133,7 @@
"vue": "^2.6.10",
"vue-apollo": "^3.0.0-beta.28",
"vue-loader": "^15.7.0",
+ "vue-resource": "^1.5.1",
"vue-router": "^3.0.2",
"vue-template-compiler": "^2.6.10",
"vue-virtual-scroll-list": "^1.3.1",
@@ -166,7 +167,6 @@
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jasmine": "^2.10.1",
"eslint-plugin-jest": "^22.3.0",
- "eslint-plugin-no-jquery": "^2.1.0",
"gettext-extractor": "^3.4.3",
"gettext-extractor-vue": "^4.0.2",
"graphql-tag": "^2.10.0",
diff --git a/qa/qa.rb b/qa/qa.rb
index d860e0b5e33..6e87129641a 100644
--- a/qa/qa.rb
+++ b/qa/qa.rb
@@ -23,7 +23,6 @@ module QA
autoload :Feature, 'qa/runtime/feature'
autoload :Fixtures, 'qa/runtime/fixtures'
autoload :Logger, 'qa/runtime/logger'
- autoload :GPG, 'qa/runtime/gpg'
module API
autoload :Client, 'qa/runtime/api/client'
@@ -68,9 +67,7 @@ module QA
autoload :Fork, 'qa/resource/fork'
autoload :SSHKey, 'qa/resource/ssh_key'
autoload :Snippet, 'qa/resource/snippet'
- autoload :Tag, 'qa/resource/tag'
autoload :ProjectMember, 'qa/resource/project_member'
- autoload :UserGPG, 'qa/resource/user_gpg'
module Events
autoload :Base, 'qa/resource/events/base'
diff --git a/qa/qa/git/repository.rb b/qa/qa/git/repository.rb
index 09052a5e33f..24b9fc67dd9 100644
--- a/qa/qa/git/repository.rb
+++ b/qa/qa/git/repository.rb
@@ -14,7 +14,7 @@ module QA
include Scenario::Actable
RepositoryCommandError = Class.new(StandardError)
- attr_writer :use_lfs, :gpg_key_id
+ attr_writer :use_lfs
attr_accessor :env_vars
InvalidCredentialsError = Class.new(RuntimeError)
@@ -25,7 +25,6 @@ module QA
# .netrc can be utilised
self.env_vars = [%Q{HOME="#{tmp_home_dir}"}]
@use_lfs = false
- @gpg_key_id = nil
end
def self.perform(*args)
@@ -100,18 +99,10 @@ module QA
git_lfs_track_result.to_s + git_add_result.to_s
end
- def delete_tag(tag_name)
- run(%Q{git push origin --delete #{tag_name}}).to_s
- end
-
def commit(message)
run(%Q{git commit -m "#{message}"}).to_s
end
- def commit_with_gpg(message)
- run(%Q{git config user.signingkey #{@gpg_key_id} && git config gpg.program $(which gpg) && git commit -S -m "#{message}"}).to_s
- end
-
def push_changes(branch = 'master')
run("git push #{uri} #{branch}").to_s
end
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb
index 104c9b19e2a..45496c6b245 100644
--- a/qa/qa/page/base.rb
+++ b/qa/qa/page/base.rb
@@ -15,10 +15,6 @@ module QA
def_delegators :evaluator, :view, :views
- def assert_no_element(name)
- assert_no_selector(element_selector_css(name))
- end
-
def refresh
page.refresh
end
@@ -94,8 +90,8 @@ module QA
end
# replace with (..., page = self.class)
- def click_element(name, page = nil, text: nil)
- find_element(name, text: nil).click
+ def click_element(name, page = nil)
+ find_element(name).click
page.validate_elements_present! if page
end
@@ -106,9 +102,9 @@ module QA
def select_element(name, value)
element = find_element(name)
- return if element.text == value
+ return if element.text.downcase.to_s == value.to_s
- element.select value
+ element.select value.to_s.capitalize
end
def has_element?(name, text: nil, wait: Capybara.default_max_wait_time)
diff --git a/qa/qa/page/project/settings/mirroring_repositories.rb b/qa/qa/page/project/settings/mirroring_repositories.rb
index 4afe042d9fb..441235afca8 100644
--- a/qa/qa/page/project/settings/mirroring_repositories.rb
+++ b/qa/qa/page/project/settings/mirroring_repositories.rb
@@ -15,9 +15,7 @@ module QA
element :mirror_repository_button
element :mirror_repository_url_cell
element :mirror_last_update_at_cell
- element :mirror_error_badge
element :mirrored_repository_row
- element :copy_public_key_button
end
view 'app/views/projects/mirrors/_mirror_repos_form.html.haml' do
@@ -26,17 +24,6 @@ module QA
view 'app/views/shared/_remote_mirror_update_button.html.haml' do
element :update_now_button
- element :updating_button
- end
-
- view 'app/views/projects/mirrors/_ssh_host_keys.html.haml' do
- element :detect_host_keys
- element :fingerprints_list
- end
-
- view 'app/views/projects/mirrors/_authentication_method.html.haml' do
- element :authentication_method
- element :password
end
def repository_url=(value)
@@ -48,40 +35,17 @@ module QA
end
def mirror_direction=(value)
- raise ArgumentError, "Mirror direction must be 'Push' or 'Pull'" unless %w(Push Pull).include? value
+ raise ArgumentError, "Mirror direction must be :push or :pull" unless [:push, :pull].include? value
select_element(:mirror_direction, value)
-
- # Changing the mirror direction causes the fields below to change,
- # and that change is animated, so we need to wait for the animation
- # to complete otherwise changes to those fields could fail
- wait_for_animated_element :authentication_method
end
def authentication_method=(value)
- raise ArgumentError, "Authentication method must be 'SSH public key', 'Password', or 'None'" unless %w(Password None SSH\ public\ key).include? value
+ raise ArgumentError, "Authentication method must be :password or :none" unless [:password, :none].include? value
select_element(:authentication_method, value)
end
- def public_key(url)
- row_index = find_repository_row_index url
-
- within_element_by_index(:mirrored_repository_row, row_index) do
- find_element(:copy_public_key_button)['data-clipboard-text']
- end
- end
-
- def detect_host_keys
- click_element :detect_host_keys
-
- # The host key detection process is interrupted if we navigate away
- # from the page before the fingerprint appears.
- wait(max: 5) do
- find_element(:fingerprints_list).has_text? /.*/
- end
- end
-
def mirror_repository
click_element :mirror_repository_button
end
@@ -90,9 +54,7 @@ module QA
row_index = find_repository_row_index url
within_element_by_index(:mirrored_repository_row, row_index) do
- # When a repository is first mirrored, the update process might
- # already be started, so the button is already "clicked"
- click_element :update_now_button unless has_element? :updating_button
+ click_element :update_now_button
end
# Wait a few seconds for the sync to occur and then refresh the page
@@ -110,19 +72,16 @@ module QA
# Fail early if the page still shows that there has been no update
within_element_by_index(:mirrored_repository_row, row_index) do
find_element(:mirror_last_update_at_cell, wait: 0).assert_no_text('Never')
- assert_no_element(:mirror_error_badge)
end
end
private
def find_repository_row_index(target_url)
- wait(max: 5, reload: false) do
- all_elements(:mirror_repository_url_cell).index do |url|
- # The url might be a sanitized url but the target_url won't be so
- # we compare just the paths instead of the full url
- URI.parse(url.text).path == target_url.path
- end
+ all_elements(:mirror_repository_url_cell).index do |url|
+ # The url might be a sanitized url but the target_url won't be so
+ # we compare just the paths instead of the full url
+ URI.parse(url.text).path == target_url.path
end
end
end
diff --git a/qa/qa/page/project/settings/repository.rb b/qa/qa/page/project/settings/repository.rb
index 58ed37870b7..437a945aceb 100644
--- a/qa/qa/page/project/settings/repository.rb
+++ b/qa/qa/page/project/settings/repository.rb
@@ -16,7 +16,7 @@ module QA
end
view 'app/views/projects/mirrors/_mirror_repos.html.haml' do
- element :mirroring_repositories_settings_section
+ element :mirroring_repositories_settings
end
def expand_deploy_keys(&block)
@@ -38,7 +38,7 @@ module QA
end
def expand_mirroring_repositories(&block)
- expand_section(:mirroring_repositories_settings_section) do
+ expand_section(:mirroring_repositories_settings) do
MirroringRepositories.perform(&block)
end
end
@@ -47,5 +47,3 @@ module QA
end
end
end
-
-QA::Page::Project::Settings::Repository.prepend_if_ee('QA::EE::Page::Project::Settings::Repository')
diff --git a/qa/qa/resource/issue.rb b/qa/qa/resource/issue.rb
index 9d0a5e159e0..a894e5c2033 100644
--- a/qa/qa/resource/issue.rb
+++ b/qa/qa/resource/issue.rb
@@ -1,7 +1,5 @@
# frozen_string_literal: true
-require 'securerandom'
-
module QA
module Resource
class Issue < Base
@@ -15,14 +13,11 @@ module QA
end
attribute :id
- attribute :assignee_ids
attribute :labels
attribute :title
def initialize
- @assignee_ids = []
@labels = []
- @title = "Issue title #{SecureRandom.hex(8)}"
end
def fabricate!
@@ -30,10 +25,10 @@ module QA
Page::Project::Show.perform(&:go_to_new_issue)
- Page::Project::Issue::New.perform do |new_page|
- new_page.add_title(@title)
- new_page.add_description(@description)
- new_page.create_new_issue
+ Page::Project::Issue::New.perform do |page| # rubocop:disable QA/AmbiguousPageObjectName
+ page.add_title(@title)
+ page.add_description(@description)
+ page.create_new_issue
end
end
@@ -47,7 +42,6 @@ module QA
def api_post_body
{
- assignee_ids: assignee_ids,
labels: labels,
title: title
}.tap do |hash|
diff --git a/qa/qa/resource/repository/push.rb b/qa/qa/resource/repository/push.rb
index 68674248be2..a5827fb6e73 100644
--- a/qa/qa/resource/repository/push.rb
+++ b/qa/qa/resource/repository/push.rb
@@ -8,9 +8,9 @@ module QA
class Push < Base
attr_accessor :file_name, :file_content, :commit_message,
:branch_name, :new_branch, :output, :repository_http_uri,
- :repository_ssh_uri, :ssh_key, :user, :use_lfs, :tag_name
+ :repository_ssh_uri, :ssh_key, :user, :use_lfs
- attr_writer :remote_branch, :gpg_key_id
+ attr_writer :remote_branch
def initialize
@file_name = 'file.txt'
@@ -21,8 +21,6 @@ module QA
@repository_http_uri = ""
@ssh_key = nil
@use_lfs = false
- @tag_name = nil
- @gpg_key_id = nil
end
def remote_branch
@@ -69,43 +67,29 @@ module QA
email = user.email
end
- unless @gpg_key_id.nil?
- repository.gpg_key_id = @gpg_key_id
- end
-
@output += repository.clone
repository.configure_identity(username, email)
@output += repository.checkout(branch_name, new_branch: new_branch)
- if @tag_name
- @output += repository.delete_tag(@tag_name)
- else
- if @directory
- @directory.each_child do |f|
- @output += repository.add_file(f.basename, f.read) if f.file?
- end
- elsif @files
- @files.each do |f|
- repository.add_file(f[:name], f[:content])
- end
- else
- @output += repository.add_file(file_name, file_content)
+ if @directory
+ @directory.each_child do |f|
+ @output += repository.add_file(f.basename, f.read) if f.file?
end
-
- @output += commit_to repository
- @output += repository.push_changes("#{branch_name}:#{remote_branch}")
+ elsif @files
+ @files.each do |f|
+ repository.add_file(f[:name], f[:content])
+ end
+ else
+ @output += repository.add_file(file_name, file_content)
end
+ @output += repository.commit(commit_message)
+ @output += repository.push_changes("#{branch_name}:#{remote_branch}")
+
repository.delete_ssh_key
end
end
-
- private
-
- def commit_to(repository)
- @gpg_key_id.nil? ? repository.commit(@commit_message) : repository.commit_with_gpg(@commit_message)
- end
end
end
end
diff --git a/qa/qa/resource/tag.rb b/qa/qa/resource/tag.rb
deleted file mode 100644
index ac4fccec525..00000000000
--- a/qa/qa/resource/tag.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-module QA
- module Resource
- class Tag < Base
- attr_accessor :project, :name, :ref
-
- def resource_web_url(resource)
- super
- rescue ResourceURLMissingError
- # this particular resource does not expose a web_url property
- end
-
- def api_get_path
- "/projects/#{project.id}/repository/tags/#{name}"
- end
-
- def api_post_path
- "/projects/#{project.id}/repository/tags"
- end
-
- def api_post_body
- {
- tag_name: name,
- ref: ref
- }
- end
- end
- end
-end
diff --git a/qa/qa/resource/user_gpg.rb b/qa/qa/resource/user_gpg.rb
deleted file mode 100644
index 25d74ad8ce5..00000000000
--- a/qa/qa/resource/user_gpg.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# frozen_string_literal: true
-
-module QA
- module Resource
- class UserGPG < Base
- attr_accessor :id, :gpg
- attr_reader :key_id
-
- def initialize
- @gpg = Runtime::GPG.new
- @key_id = @gpg.key_id
- end
-
- def fabricate_via_api!
- super
- @id = self.api_response[:id]
- rescue ResourceFabricationFailedError => error
- if error.message.include? 'has already been taken'
- self
- else
- raise ResourceFabricationFailedError error
- end
- end
-
- def resource_web_url(resource)
- super
- rescue ResourceURLMissingError
- # this particular resource does not expose a web_url property
- end
-
- def api_get_path
- "/user/gpg_keys/#{@id}"
- end
-
- def api_post_path
- '/user/gpg_keys'
- end
-
- def api_post_body
- {
- key: @gpg.key
- }
- end
- end
- end
-end
diff --git a/qa/qa/runtime/gpg.rb b/qa/qa/runtime/gpg.rb
deleted file mode 100644
index 9f8baf7e580..00000000000
--- a/qa/qa/runtime/gpg.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-module QA
- module Runtime
- class GPG
- attr_reader :key, :key_id
-
- def initialize
- @key_id = 'B8358D73048DACC4'
- import_key(File.expand_path('qa/ee/fixtures/gpg/admin.asc'))
- @key = collect_key.first
- end
-
- private
-
- def import_key(path)
- import_key = "gpg --import #{path}"
- execute(import_key)
- end
-
- def collect_key
- get_ascii_format = "gpg --armor --export #{@key_id}"
- execute(get_ascii_format)
- end
-
- def execute(command)
- Open3.capture2e(*command) do |stdin, out, wait|
- out.each_char { |char| print char }
-
- if wait.value.exited? && wait.value.exitstatus.nonzero?
- raise CommandError, "Command `#{command}` failed!"
- end
- end
- end
- end
- end
-end
diff --git a/qa/qa/runtime/user.rb b/qa/qa/runtime/user.rb
index 3c26a3ad691..011e4a548a5 100644
--- a/qa/qa/runtime/user.rb
+++ b/qa/qa/runtime/user.rb
@@ -25,10 +25,6 @@ module QA
Runtime::Env.user_password || default_password
end
- def email
- default_email
- end
-
def ldap_user?
Runtime::Env.ldap_username && Runtime::Env.ldap_password
end
diff --git a/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb
index 45c14d0537c..e3fd835bb01 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb
@@ -11,7 +11,6 @@ module QA
project = Resource::Project.fabricate_via_api! do |resource|
resource.name = 'project-to-test-mention'
- resource.visibility = 'private'
end
project.visit!
diff --git a/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb
index 059362704b4..448d4980727 100644
--- a/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb
@@ -25,8 +25,8 @@ module QA
settings.expand_mirroring_repositories do |mirror_settings|
# Configure the source project to push to the target project
mirror_settings.repository_url = target_project_uri
- mirror_settings.mirror_direction = 'Push'
- mirror_settings.authentication_method = 'Password'
+ mirror_settings.mirror_direction = :push
+ mirror_settings.authentication_method = :password
mirror_settings.password = Runtime::User.password
mirror_settings.mirror_repository
mirror_settings.update target_project_uri
diff --git a/qa/qa/support/page/logging.rb b/qa/qa/support/page/logging.rb
index 6b6e12f86de..93d8fa99c0a 100644
--- a/qa/qa/support/page/logging.rb
+++ b/qa/qa/support/page/logging.rb
@@ -4,12 +4,6 @@ module QA
module Support
module Page
module Logging
- def assert_no_element(name)
- log("asserting no element :#{name}")
-
- super
- end
-
def refresh
log("refreshing #{current_url}")
@@ -59,10 +53,9 @@ module QA
elements
end
- def click_element(name, page = nil, **kwargs)
+ def click_element(name, page = nil)
msg = ["clicking :#{name}"]
msg << ", expecting to be at #{page.class}" if page
- msg << "with args #{kwargs}"
log(msg.compact.join(' '))
diff --git a/rubocop/migration_helpers.rb b/rubocop/migration_helpers.rb
index 577f768da67..c066d424437 100644
--- a/rubocop/migration_helpers.rb
+++ b/rubocop/migration_helpers.rb
@@ -3,17 +3,15 @@ module RuboCop
module MigrationHelpers
# Returns true if the given node originated from the db/migrate directory.
def in_migration?(node)
- dirname(node).end_with?('db/migrate', 'db/geo/migrate') || in_post_deployment_migration?(node)
- end
+ dirname = File.dirname(node.location.expression.source_buffer.name)
- def in_post_deployment_migration?(node)
- dirname(node).end_with?('db/post_migrate', 'db/geo/post_migrate')
+ dirname.end_with?('db/migrate', 'db/post_migrate')
end
- private
+ def in_post_deployment_migration?(node)
+ dirname = File.dirname(node.location.expression.source_buffer.name)
- def dirname(node)
- File.dirname(node.location.expression.source_buffer.name)
+ dirname.end_with?('db/post_migrate')
end
end
end
diff --git a/spec/controllers/dashboard/todos_controller_spec.rb b/spec/controllers/dashboard/todos_controller_spec.rb
index 4ce445fe41a..c5af04f72ee 100644
--- a/spec/controllers/dashboard/todos_controller_spec.rb
+++ b/spec/controllers/dashboard/todos_controller_spec.rb
@@ -131,7 +131,7 @@ describe Dashboard::TodosController do
expect(todo.reload).to be_pending
expect(response).to have_gitlab_http_status(200)
- expect(json_response).to eq({ "count" => 1, "done_count" => 0 })
+ expect(json_response).to eq({ "count" => "1", "done_count" => "0" })
end
end
@@ -145,7 +145,7 @@ describe Dashboard::TodosController do
expect(todo.reload).to be_pending
end
expect(response).to have_gitlab_http_status(200)
- expect(json_response).to eq({ 'count' => 2, 'done_count' => 0 })
+ expect(json_response).to eq({ 'count' => '2', 'done_count' => '0' })
end
end
end
diff --git a/spec/controllers/projects/artifacts_controller_spec.rb b/spec/controllers/projects/artifacts_controller_spec.rb
index c0b01e573b2..6ea82785e98 100644
--- a/spec/controllers/projects/artifacts_controller_spec.rb
+++ b/spec/controllers/projects/artifacts_controller_spec.rb
@@ -6,7 +6,7 @@ describe Projects::ArtifactsController do
let(:user) { project.owner }
set(:project) { create(:project, :repository, :public) }
- set(:pipeline) do
+ let(:pipeline) do
create(:ci_pipeline,
project: project,
sha: project.commit.sha,
@@ -14,119 +14,12 @@ describe Projects::ArtifactsController do
status: 'success')
end
- let!(:job) { create(:ci_build, :success, :artifacts, pipeline: pipeline) }
+ let(:job) { create(:ci_build, :success, :artifacts, pipeline: pipeline) }
before do
sign_in(user)
end
- describe 'GET index' do
- subject { get :index, params: { namespace_id: project.namespace, project_id: project } }
-
- context 'when feature flag is on' do
- before do
- stub_feature_flags(artifacts_management_page: true)
- end
-
- it 'sets the artifacts variable' do
- subject
-
- expect(assigns(:artifacts)).to contain_exactly(*project.job_artifacts)
- end
-
- it 'sets the total size variable' do
- subject
-
- expect(assigns(:total_size)).to eq(project.job_artifacts.total_size)
- end
-
- describe 'pagination' do
- before do
- stub_const("#{described_class}::MAX_PER_PAGE", 1)
- end
-
- it 'paginates artifacts' do
- subject
-
- expect(assigns(:artifacts)).to contain_exactly(project.job_artifacts.last)
- end
- end
- end
-
- context 'when feature flag is off' do
- before do
- stub_feature_flags(artifacts_management_page: false)
- end
-
- it 'renders no content' do
- subject
-
- expect(response).to have_gitlab_http_status(:no_content)
- end
-
- it 'does not set the artifacts variable' do
- subject
-
- expect(assigns(:artifacts)).to eq(nil)
- end
-
- it 'does not set the total size variable' do
- subject
-
- expect(assigns(:total_size)).to eq(nil)
- end
- end
- end
-
- describe 'DELETE destroy' do
- let!(:artifact) { job.job_artifacts.erasable.first }
-
- subject { delete :destroy, params: { namespace_id: project.namespace, project_id: project, id: artifact } }
-
- it 'deletes the artifact' do
- expect { subject }.to change { Ci::JobArtifact.count }.by(-1)
- expect(artifact).not_to exist
- end
-
- it 'redirects to artifacts index page' do
- subject
-
- expect(response).to redirect_to(project_artifacts_path(project))
- end
-
- it 'sets the notice' do
- subject
-
- expect(flash[:notice]).to eq('Artifact was successfully deleted.')
- end
-
- context 'when artifact deletion fails' do
- before do
- allow_any_instance_of(Ci::JobArtifact).to receive(:destroy).and_return(false)
- end
-
- it 'redirects to artifacts index page' do
- subject
-
- expect(response).to redirect_to(project_artifacts_path(project))
- end
-
- it 'sets the notice' do
- subject
-
- expect(flash[:notice]).to eq('Artifact could not be deleted.')
- end
- end
-
- context 'when user is not authorized' do
- let(:user) { create(:user) }
-
- it 'does not delete the artifact' do
- expect { subject }.not_to change { Ci::JobArtifact.count }
- end
- end
- end
-
describe 'GET download' do
def download_artifact(extra_params = {})
params = { namespace_id: project.namespace, project_id: project, job_id: job }.merge(extra_params)
diff --git a/spec/controllers/projects/registry/tags_controller_spec.rb b/spec/controllers/projects/registry/tags_controller_spec.rb
index 8da0d217e9e..c6e063d8229 100644
--- a/spec/controllers/projects/registry/tags_controller_spec.rb
+++ b/spec/controllers/projects/registry/tags_controller_spec.rb
@@ -10,8 +10,6 @@ describe Projects::Registry::TagsController do
create(:container_repository, name: 'image', project: project)
end
- let(:service) { double('service') }
-
before do
sign_in(user)
stub_container_registry_config(enabled: true)
@@ -86,17 +84,17 @@ describe Projects::Registry::TagsController do
context 'when there is matching tag present' do
before do
- stub_container_registry_tags(repository: repository.path, tags: %w[rc1], with_manifest: true)
+ stub_container_registry_tags(repository: repository.path, tags: %w[rc1 test.])
end
it 'makes it possible to delete regular tag' do
- expect_delete_tags(%w[rc1])
+ expect_any_instance_of(ContainerRegistry::Tag).to receive(:delete)
destroy_tag('rc1')
end
it 'makes it possible to delete a tag that ends with a dot' do
- expect_delete_tags(%w[test.])
+ expect_any_instance_of(ContainerRegistry::Tag).to receive(:delete)
destroy_tag('test.')
end
@@ -127,12 +125,11 @@ describe Projects::Registry::TagsController do
stub_container_registry_tags(repository: repository.path, tags: %w[rc1 test.])
end
- let(:tags) { %w[tc1 test.] }
-
it 'makes it possible to delete tags in bulk' do
- expect_delete_tags(tags)
+ allow_any_instance_of(ContainerRegistry::Tag).to receive(:delete) { |*args| ContainerRegistry::Tag.delete(*args) }
+ expect(ContainerRegistry::Tag).to receive(:delete).exactly(2).times
- bulk_destroy_tags(tags)
+ bulk_destroy_tags(['rc1', 'test.'])
end
end
end
@@ -149,9 +146,4 @@ describe Projects::Registry::TagsController do
format: :json
end
end
-
- def expect_delete_tags(tags, status = :success)
- expect(service).to receive(:execute).with(repository) { { status: status } }
- expect(Projects::ContainerRepository::DeleteTagsService).to receive(:new).with(repository.project, user, tags: tags) { service }
- end
end
diff --git a/spec/controllers/projects/templates_controller_spec.rb b/spec/controllers/projects/templates_controller_spec.rb
index 07b8a36fefc..d5ef2b0e114 100644
--- a/spec/controllers/projects/templates_controller_spec.rb
+++ b/spec/controllers/projects/templates_controller_spec.rb
@@ -99,44 +99,4 @@ describe Projects::TemplatesController do
include_examples 'renders 404 when params are invalid'
end
end
-
- describe '#names' do
- before do
- project.add_developer(user)
- sign_in(user)
- end
-
- shared_examples 'template names request' do
- it 'returns the template names' do
- get(:names, params: { namespace_id: project.namespace, template_type: template_type, project_id: project }, format: :json)
-
- expect(response).to have_gitlab_http_status(200)
- expect(json_response.size).to eq(1)
- expect(json_response[0]['name']).to eq(expected_template_name)
- end
-
- it 'fails for user with no access' do
- other_user = create(:user)
- sign_in(other_user)
-
- get(:names, params: { namespace_id: project.namespace, template_type: template_type, project_id: project }, format: :json)
-
- expect(response).to have_gitlab_http_status(404)
- end
- end
-
- context 'when querying for issue templates' do
- it_behaves_like 'template names request' do
- let(:template_type) { 'issue' }
- let(:expected_template_name) { 'issue_template' }
- end
- end
-
- context 'when querying for merge_request templates' do
- it_behaves_like 'template names request' do
- let(:template_type) { 'merge_request' }
- let(:expected_template_name) { 'merge_request_template' }
- end
- end
- end
end
diff --git a/spec/features/clusters/cluster_detail_page_spec.rb b/spec/features/clusters/cluster_detail_page_spec.rb
index 927862689c1..683c57a97f8 100644
--- a/spec/features/clusters/cluster_detail_page_spec.rb
+++ b/spec/features/clusters/cluster_detail_page_spec.rb
@@ -13,7 +13,7 @@ describe 'Clusterable > Show page' do
sign_in(current_user)
end
- shared_examples 'show page' do
+ shared_examples 'editing domain' do
before do
clusterable.add_maintainer(current_user)
end
@@ -53,12 +53,6 @@ describe 'Clusterable > Show page' do
end
end
end
-
- it 'does not show the environments tab' do
- visit cluster_path
-
- expect(page).not_to have_selector('.js-cluster-nav-environments', text: 'Environments')
- end
end
shared_examples 'editing a GCP cluster' do
@@ -119,30 +113,42 @@ describe 'Clusterable > Show page' do
end
context 'when clusterable is a project' do
- let(:clusterable) { create(:project) }
- let(:cluster_path) { project_cluster_path(clusterable, cluster) }
- let(:cluster) { create(:cluster, :provided_by_gcp, :project, projects: [clusterable]) }
-
- it_behaves_like 'show page'
+ it_behaves_like 'editing domain' do
+ let(:clusterable) { create(:project) }
+ let(:cluster) { create(:cluster, :provided_by_gcp, :project, projects: [clusterable]) }
+ let(:cluster_path) { project_cluster_path(clusterable, cluster) }
+ end
- it_behaves_like 'editing a GCP cluster'
+ it_behaves_like 'editing a GCP cluster' do
+ let(:clusterable) { create(:project) }
+ let(:cluster) { create(:cluster, :provided_by_gcp, :project, projects: [clusterable]) }
+ let(:cluster_path) { project_cluster_path(clusterable, cluster) }
+ end
it_behaves_like 'editing a user-provided cluster' do
+ let(:clusterable) { create(:project) }
let(:cluster) { create(:cluster, :provided_by_user, :project, projects: [clusterable]) }
+ let(:cluster_path) { project_cluster_path(clusterable, cluster) }
end
end
context 'when clusterable is a group' do
- let(:clusterable) { create(:group) }
- let(:cluster_path) { group_cluster_path(clusterable, cluster) }
- let(:cluster) { create(:cluster, :provided_by_gcp, :group, groups: [clusterable]) }
-
- it_behaves_like 'show page'
+ it_behaves_like 'editing domain' do
+ let(:clusterable) { create(:group) }
+ let(:cluster) { create(:cluster, :provided_by_gcp, :group, groups: [clusterable]) }
+ let(:cluster_path) { group_cluster_path(clusterable, cluster) }
+ end
- it_behaves_like 'editing a GCP cluster'
+ it_behaves_like 'editing a GCP cluster' do
+ let(:clusterable) { create(:group) }
+ let(:cluster) { create(:cluster, :provided_by_gcp, :group, groups: [clusterable]) }
+ let(:cluster_path) { group_cluster_path(clusterable, cluster) }
+ end
it_behaves_like 'editing a user-provided cluster' do
+ let(:clusterable) { create(:group) }
let(:cluster) { create(:cluster, :provided_by_user, :group, groups: [clusterable]) }
+ let(:cluster_path) { group_cluster_path(clusterable, cluster) }
end
end
end
diff --git a/spec/features/container_registry_spec.rb b/spec/features/container_registry_spec.rb
index dfd08483430..aefdc4d6d4f 100644
--- a/spec/features/container_registry_spec.rb
+++ b/spec/features/container_registry_spec.rb
@@ -53,9 +53,7 @@ describe 'Container Registry', :js do
find('.js-toggle-repo').click
wait_for_requests
- service = double('service')
- expect(service).to receive(:execute).with(container_repository) { { status: :success } }
- expect(Projects::ContainerRepository::DeleteTagsService).to receive(:new).with(container_repository.project, user, tags: ['latest']) { service }
+ expect_any_instance_of(ContainerRegistry::Tag).to receive(:delete).and_return(true)
click_on(class: 'js-delete-registry-row', visible: false)
expect(find('.modal .modal-title')).to have_content 'Remove image'
diff --git a/spec/features/issues/gfm_autocomplete_spec.rb b/spec/features/issues/gfm_autocomplete_spec.rb
index 0ff3809a915..cc834df367b 100644
--- a/spec/features/issues/gfm_autocomplete_spec.rb
+++ b/spec/features/issues/gfm_autocomplete_spec.rb
@@ -27,8 +27,6 @@ describe 'GFM autocomplete', :js do
it 'updates issue description with GFM reference' do
find('.js-issuable-edit').click
- wait_for_requests
-
simulate_input('#issue-description', "@#{user.name[0...3]}")
wait_for_requests
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb
index f9e83af352d..5bdd9113b06 100644
--- a/spec/features/issues_spec.rb
+++ b/spec/features/issues_spec.rb
@@ -470,6 +470,9 @@ describe 'Issues' do
expect(page).to have_content 'None'
end
+ # wait_for_requests does not work with vue-resource at the moment
+ sleep 1
+
expect(issue.reload.assignees).to be_empty
end
diff --git a/spec/features/projects/import_export/export_file_spec.rb b/spec/features/projects/import_export/export_file_spec.rb
index 7618a2bdea3..a1002f38936 100644
--- a/spec/features/projects/import_export/export_file_spec.rb
+++ b/spec/features/projects/import_export/export_file_spec.rb
@@ -49,7 +49,8 @@ describe 'Import/Export - project export integration test', :js do
expect(page).to have_content('Download export')
- expect(project.export_status).to eq(:finished)
+ expect(file_permissions(project.export_path)).to eq(0700)
+
expect(project.export_file.path).to include('tar.gz')
in_directory_with_expanded_export(project) do |exit_status, tmpdir|
diff --git a/spec/features/runners_spec.rb b/spec/features/runners_spec.rb
index 0049d3ca7c9..63d21d94b5f 100644
--- a/spec/features/runners_spec.rb
+++ b/spec/features/runners_spec.rb
@@ -272,12 +272,6 @@ describe 'Runners' do
expect(page).to have_content 'This group does not provide any group Runners yet'
end
-
- it 'user can see a link to install runners on kubernetes clusters' do
- visit group_settings_ci_cd_path(group)
-
- expect(page).to have_link('Install Runner on Kubernetes', href: group_clusters_path(group))
- end
end
context 'group with a runner' do
diff --git a/spec/finders/artifacts_finder_spec.rb b/spec/finders/artifacts_finder_spec.rb
deleted file mode 100644
index b956e2c9515..00000000000
--- a/spec/finders/artifacts_finder_spec.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe ArtifactsFinder do
- let(:project) { create(:project) }
-
- describe '#execute' do
- before do
- create(:ci_build, :artifacts, project: project)
- end
-
- subject { described_class.new(project, params).execute }
-
- context 'with empty params' do
- let(:params) { {} }
-
- it 'returns all artifacts belonging to the project' do
- expect(subject).to contain_exactly(*project.job_artifacts)
- end
- end
-
- context 'with sort param' do
- let(:params) { { sort: 'size_desc' } }
-
- it 'sorts the artifacts' do
- expect(subject).to eq(project.job_artifacts.order_by('size_desc'))
- end
- end
- end
-end
diff --git a/spec/frontend/helpers/vue_resource_helper.js b/spec/frontend/helpers/vue_resource_helper.js
new file mode 100644
index 00000000000..0f58af09933
--- /dev/null
+++ b/spec/frontend/helpers/vue_resource_helper.js
@@ -0,0 +1,11 @@
+// eslint-disable-next-line import/prefer-default-export
+export const headersInterceptor = (request, next) => {
+ next(response => {
+ const headers = {};
+ response.headers.forEach((value, key) => {
+ headers[key] = value;
+ });
+ // eslint-disable-next-line no-param-reassign
+ response.headers = headers;
+ });
+};
diff --git a/spec/frontend/import_projects/components/import_projects_table_spec.js b/spec/frontend/import_projects/components/import_projects_table_spec.js
index 708f2758083..17a998d0174 100644
--- a/spec/frontend/import_projects/components/import_projects_table_spec.js
+++ b/spec/frontend/import_projects/components/import_projects_table_spec.js
@@ -93,7 +93,7 @@ describe('ImportProjectsTable', () => {
return vm.$nextTick().then(() => {
expect(vm.$el.querySelector('.js-loading-button-icon')).toBeNull();
expect(vm.$el.querySelector('.table')).toBeNull();
- expect(vm.$el.innerText).toMatch(`No ${providerTitle} repositories found`);
+ expect(vm.$el.innerText).toMatch(`No ${providerTitle} repositories available to import`);
});
});
@@ -182,10 +182,4 @@ describe('ImportProjectsTable', () => {
expect(vm.$el.querySelector(`.ic-status_${statusObject.icon}`)).not.toBeNull();
});
});
-
- it('renders filtering input field', () => {
- expect(
- vm.$el.querySelector('input[data-qa-selector="githubish_import_filter_field"]'),
- ).not.toBeNull();
- });
});
diff --git a/spec/frontend/import_projects/store/actions_spec.js b/spec/frontend/import_projects/store/actions_spec.js
index 340b6f02d93..6a7b90788dd 100644
--- a/spec/frontend/import_projects/store/actions_spec.js
+++ b/spec/frontend/import_projects/store/actions_spec.js
@@ -97,7 +97,6 @@ describe('import_projects store actions', () => {
describe('fetchRepos', () => {
let mock;
- const payload = { imported_projects: [{}], provider_repos: [{}], namespaces: [{}] };
beforeEach(() => {
localState.reposPath = `${TEST_HOST}/endpoint.json`;
@@ -106,7 +105,8 @@ describe('import_projects store actions', () => {
afterEach(() => mock.restore());
- it('dispatches stopJobsPolling, requestRepos and receiveReposSuccess actions on a successful request', done => {
+ it('dispatches requestRepos and receiveReposSuccess actions on a successful request', done => {
+ const payload = { imported_projects: [{}], provider_repos: [{}], namespaces: [{}] };
mock.onGet(`${TEST_HOST}/endpoint.json`).reply(200, payload);
testAction(
@@ -115,7 +115,6 @@ describe('import_projects store actions', () => {
localState,
[],
[
- { type: 'stopJobsPolling' },
{ type: 'requestRepos' },
{
type: 'receiveReposSuccess',
@@ -129,7 +128,7 @@ describe('import_projects store actions', () => {
);
});
- it('dispatches stopJobsPolling, requestRepos and receiveReposError actions on an unsuccessful request', done => {
+ it('dispatches requestRepos and receiveReposSuccess actions on an unsuccessful request', done => {
mock.onGet(`${TEST_HOST}/endpoint.json`).reply(500);
testAction(
@@ -137,39 +136,10 @@ describe('import_projects store actions', () => {
null,
localState,
[],
- [{ type: 'stopJobsPolling' }, { type: 'requestRepos' }, { type: 'receiveReposError' }],
+ [{ type: 'requestRepos' }, { type: 'receiveReposError' }],
done,
);
});
-
- describe('when filtered', () => {
- beforeEach(() => {
- localState.filter = 'filter';
- });
-
- it('fetches repos with filter applied', done => {
- mock.onGet(`${TEST_HOST}/endpoint.json?filter=filter`).reply(200, payload);
-
- testAction(
- fetchRepos,
- null,
- localState,
- [],
- [
- { type: 'stopJobsPolling' },
- { type: 'requestRepos' },
- {
- type: 'receiveReposSuccess',
- payload: convertObjectPropsToCamelCase(payload, { deep: true }),
- },
- {
- type: 'fetchJobs',
- },
- ],
- done,
- );
- });
- });
});
describe('requestImport', () => {
@@ -279,7 +249,6 @@ describe('import_projects store actions', () => {
describe('fetchJobs', () => {
let mock;
- const updatedProjects = [{ name: 'imported/project' }, { name: 'provider/repo' }];
beforeEach(() => {
localState.jobsPath = `${TEST_HOST}/endpoint.json`;
@@ -294,6 +263,7 @@ describe('import_projects store actions', () => {
afterEach(() => mock.restore());
it('dispatches requestJobs and receiveJobsSuccess actions on a successful request', done => {
+ const updatedProjects = [{ name: 'imported/project' }, { name: 'provider/repo' }];
mock.onGet(`${TEST_HOST}/endpoint.json`).reply(200, updatedProjects);
testAction(
@@ -310,29 +280,5 @@ describe('import_projects store actions', () => {
done,
);
});
-
- describe('when filtered', () => {
- beforeEach(() => {
- localState.filter = 'filter';
- });
-
- it('fetches realtime changes with filter applied', done => {
- mock.onGet(`${TEST_HOST}/endpoint.json?filter=filter`).reply(200, updatedProjects);
-
- testAction(
- fetchJobs,
- null,
- localState,
- [],
- [
- {
- type: 'receiveJobsSuccess',
- payload: convertObjectPropsToCamelCase(updatedProjects, { deep: true }),
- },
- ],
- done,
- );
- });
- });
});
});
diff --git a/spec/frontend/jobs/components/log/collapsible_section_spec.js b/spec/frontend/jobs/components/log/collapsible_section_spec.js
deleted file mode 100644
index 6c1ebf0a7c1..00000000000
--- a/spec/frontend/jobs/components/log/collapsible_section_spec.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import { mount } from '@vue/test-utils';
-import CollpasibleSection from '~/jobs/components/log/collapsible_section.vue';
-import { nestedSectionOpened, nestedSectionClosed } from './mock_data';
-
-describe('Job Log Collapsible Section', () => {
- let wrapper;
-
- const traceEndpoint = 'jobs/335';
-
- const findCollapsibleLine = () => wrapper.find('.collapsible-line');
-
- const createComponent = (props = {}) => {
- wrapper = mount(CollpasibleSection, {
- sync: true,
- propsData: {
- ...props,
- },
- });
- };
-
- afterEach(() => {
- wrapper.destroy();
- });
-
- describe('with closed nested section', () => {
- beforeEach(() => {
- createComponent({
- section: nestedSectionClosed,
- traceEndpoint,
- });
- });
-
- it('renders clickable header line', () => {
- expect(findCollapsibleLine().attributes('role')).toBe('button');
- });
- });
-
- describe('with opened nested section', () => {
- beforeEach(() => {
- createComponent({
- section: nestedSectionOpened,
- traceEndpoint,
- });
- });
-
- it('renders all sections opened', () => {
- expect(wrapper.findAll('.collapsible-line').length).toBe(2);
- });
- });
-
- it('emits onClickCollapsibleLine on click', () => {
- createComponent({
- section: nestedSectionOpened,
- traceEndpoint,
- });
-
- findCollapsibleLine().trigger('click');
- expect(wrapper.emitted('onClickCollapsibleLine').length).toBe(1);
- });
-});
diff --git a/spec/frontend/jobs/components/log/mock_data.js b/spec/frontend/jobs/components/log/mock_data.js
index 0dae306dcc7..db42644de77 100644
--- a/spec/frontend/jobs/components/log/mock_data.js
+++ b/spec/frontend/jobs/components/log/mock_data.js
@@ -150,73 +150,3 @@ export const collapsibleTraceIncremental = [
sections: ['section'],
},
];
-
-export const nestedSectionClosed = {
- offset: 5,
- section_header: true,
- isHeader: true,
- isClosed: true,
- line: {
- content: [{ text: 'foo' }],
- sections: ['prepare-script'],
- lineNumber: 1,
- },
- section_duration: '00:03',
- lines: [
- {
- section_header: true,
- section_duration: '00:02',
- isHeader: true,
- isClosed: true,
- line: {
- offset: 52,
- content: [{ text: 'bar' }],
- sections: ['prepare-script', 'prepare-script-nested'],
- lineNumber: 2,
- },
- lines: [
- {
- offset: 80,
- content: [{ text: 'this is a collapsible nested section' }],
- sections: ['prepare-script', 'prepare-script-nested'],
- lineNumber: 3,
- },
- ],
- },
- ],
-};
-
-export const nestedSectionOpened = {
- offset: 5,
- section_header: true,
- isHeader: true,
- isClosed: false,
- line: {
- content: [{ text: 'foo' }],
- sections: ['prepare-script'],
- lineNumber: 1,
- },
- section_duration: '00:03',
- lines: [
- {
- section_header: true,
- section_duration: '00:02',
- isHeader: true,
- isClosed: false,
- line: {
- offset: 52,
- content: [{ text: 'bar' }],
- sections: ['prepare-script', 'prepare-script-nested'],
- lineNumber: 2,
- },
- lines: [
- {
- offset: 80,
- content: [{ text: 'this is a collapsible nested section' }],
- sections: ['prepare-script', 'prepare-script-nested'],
- lineNumber: 3,
- },
- ],
- },
- ],
-};
diff --git a/spec/frontend/tracking_spec.js b/spec/frontend/tracking_spec.js
index 964f8b8787e..dfc068ab6ea 100644
--- a/spec/frontend/tracking_spec.js
+++ b/spec/frontend/tracking_spec.js
@@ -1,9 +1,10 @@
+import $ from 'jquery';
import { setHTMLFixture } from './helpers/fixtures';
+
import Tracking, { initUserTracking } from '~/tracking';
describe('Tracking', () => {
let snowplowSpy;
- let bindDocumentSpy;
beforeEach(() => {
window.snowplow = window.snowplow || (() => {});
@@ -16,10 +17,6 @@ describe('Tracking', () => {
});
describe('initUserTracking', () => {
- beforeEach(() => {
- bindDocumentSpy = jest.spyOn(Tracking, 'bindDocument').mockImplementation(() => null);
- });
-
it('calls through to get a new tracker with the expected options', () => {
initUserTracking();
expect(snowplowSpy).toHaveBeenCalledWith('newTracker', '_namespace_', 'app.gitfoo.com', {
@@ -53,11 +50,6 @@ describe('Tracking', () => {
expect(snowplowSpy).toHaveBeenCalledWith('enableFormTracking');
expect(snowplowSpy).toHaveBeenCalledWith('enableLinkClickTracking');
});
-
- it('binds the document event handling', () => {
- initUserTracking();
- expect(bindDocumentSpy).toHaveBeenCalled();
- });
});
describe('.event', () => {
@@ -70,15 +62,11 @@ describe('Tracking', () => {
it('tracks to snowplow (our current tracking system)', () => {
Tracking.event('_category_', '_eventName_', { label: '_label_' });
- expect(snowplowSpy).toHaveBeenCalledWith(
- 'trackStructEvent',
- '_category_',
- '_eventName_',
- '_label_',
- undefined,
- undefined,
- undefined,
- );
+ expect(snowplowSpy).toHaveBeenCalledWith('trackStructEvent', '_category_', '_eventName_', {
+ label: '_label_',
+ property: '',
+ value: '',
+ });
});
it('skips tracking if snowplow is unavailable', () => {
@@ -111,70 +99,83 @@ describe('Tracking', () => {
});
describe('tracking interface events', () => {
- let eventSpy;
-
- const trigger = (selector, eventName = 'click') => {
- const event = new Event(eventName, { bubbles: true });
- document.querySelector(selector).dispatchEvent(event);
- };
+ let eventSpy = null;
+ let subject = null;
beforeEach(() => {
eventSpy = jest.spyOn(Tracking, 'event');
- Tracking.bindDocument('_category_'); // only happens once
+ subject = new Tracking('_category_');
setHTMLFixture(`
<input data-track-event="click_input1" data-track-label="_label_" value="_value_"/>
<input data-track-event="click_input2" data-track-value="_value_override_" value="_value_"/>
<input type="checkbox" data-track-event="toggle_checkbox" value="_value_" checked/>
<input class="dropdown" data-track-event="toggle_dropdown"/>
- <div data-track-event="nested_event"><span class="nested"></span></div>
+ <div class="js-projects-list-holder"></div>
`);
});
it('binds to clicks on elements matching [data-track-event]', () => {
- trigger('[data-track-event="click_input1"]');
+ subject.bind(document);
+ $('[data-track-event="click_input1"]').click();
expect(eventSpy).toHaveBeenCalledWith('_category_', 'click_input1', {
label: '_label_',
value: '_value_',
+ property: '',
});
});
it('allows value override with the data-track-value attribute', () => {
- trigger('[data-track-event="click_input2"]');
+ subject.bind(document);
+ $('[data-track-event="click_input2"]').click();
expect(eventSpy).toHaveBeenCalledWith('_category_', 'click_input2', {
+ label: '',
value: '_value_override_',
+ property: '',
});
});
it('handles checkbox values correctly', () => {
- trigger('[data-track-event="toggle_checkbox"]'); // checking
+ subject.bind(document);
+ const $checkbox = $('[data-track-event="toggle_checkbox"]');
+
+ $checkbox.click(); // unchecking
expect(eventSpy).toHaveBeenCalledWith('_category_', 'toggle_checkbox', {
+ label: '',
+ property: '',
value: false,
});
- trigger('[data-track-event="toggle_checkbox"]'); // unchecking
+ $checkbox.click(); // checking
expect(eventSpy).toHaveBeenCalledWith('_category_', 'toggle_checkbox', {
+ label: '',
+ property: '',
value: '_value_',
});
});
it('handles bootstrap dropdowns', () => {
- trigger('[data-track-event="toggle_dropdown"]', 'show.bs.dropdown'); // showing
+ new Tracking('_category_').bind(document);
+ const $dropdown = $('[data-track-event="toggle_dropdown"]');
- expect(eventSpy).toHaveBeenCalledWith('_category_', 'toggle_dropdown_show', {});
+ $dropdown.trigger('show.bs.dropdown'); // showing
- trigger('[data-track-event="toggle_dropdown"]', 'hide.bs.dropdown'); // hiding
-
- expect(eventSpy).toHaveBeenCalledWith('_category_', 'toggle_dropdown_hide', {});
- });
+ expect(eventSpy).toHaveBeenCalledWith('_category_', 'toggle_dropdown_show', {
+ label: '',
+ property: '',
+ value: '',
+ });
- it('handles nested elements inside an element with tracking', () => {
- trigger('span.nested', 'click');
+ $dropdown.trigger('hide.bs.dropdown'); // hiding
- expect(eventSpy).toHaveBeenCalledWith('_category_', 'nested_event', {});
+ expect(eventSpy).toHaveBeenCalledWith('_category_', 'toggle_dropdown_hide', {
+ label: '',
+ property: '',
+ value: '',
+ });
});
});
});
diff --git a/spec/helpers/issuables_helper_spec.rb b/spec/helpers/issuables_helper_spec.rb
index 583b8f90db9..3c8179460ac 100644
--- a/spec/helpers/issuables_helper_spec.rb
+++ b/spec/helpers/issuables_helper_spec.rb
@@ -190,6 +190,7 @@ describe IssuablesHelper do
issuableRef: "##{issue.iid}",
markdownPreviewPath: "/#{@project.full_path}/preview_markdown",
markdownDocsPath: '/help/user/markdown',
+ issuableTemplates: [],
lockVersion: issue.lock_version,
projectPath: @project.path,
projectNamespace: @project.namespace.path,
diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb
index cc058d5b983..e1dc589236b 100644
--- a/spec/helpers/search_helper_spec.rb
+++ b/spec/helpers/search_helper_spec.rb
@@ -103,17 +103,19 @@ describe SearchHelper do
using RSpec::Parameterized::TableSyntax
where(:scope, :label) do
- 'blobs' | 'code result'
'commits' | 'commit'
'issues' | 'issue'
'merge_requests' | 'merge request'
'milestones' | 'milestone'
- 'notes' | 'comment'
'projects' | 'project'
- 'snippet_blobs' | 'snippet result'
'snippet_titles' | 'snippet'
'users' | 'user'
- 'wiki_blobs' | 'wiki result'
+
+ 'blobs' | 'result'
+ 'snippet_blobs' | 'result'
+ 'wiki_blobs' | 'result'
+
+ 'notes' | 'comment'
end
with_them do
@@ -138,15 +140,6 @@ describe SearchHelper do
end
end
- describe 'search_entries_empty_message' do
- it 'returns the formatted entry message' do
- message = search_entries_empty_message('projects', 'foo')
-
- expect(message).to eq("We couldn't find any projects matching <code>foo</code>")
- expect(message).to be_html_safe
- end
- end
-
describe 'search_filter_input_options' do
context 'project' do
before do
diff --git a/spec/javascripts/blob/balsamiq/balsamiq_viewer_spec.js b/spec/javascripts/blob/balsamiq/balsamiq_viewer_spec.js
index d175c8ba853..fd73fb4bfcc 100644
--- a/spec/javascripts/blob/balsamiq/balsamiq_viewer_spec.js
+++ b/spec/javascripts/blob/balsamiq/balsamiq_viewer_spec.js
@@ -1,10 +1,8 @@
import sqljs from 'sql.js';
-import axios from '~/lib/utils/axios_utils';
import BalsamiqViewer from '~/blob/balsamiq/balsamiq_viewer';
import ClassSpecHelper from '../../helpers/class_spec_helper';
describe('BalsamiqViewer', () => {
- const mockArrayBuffer = new ArrayBuffer(10);
let balsamiqViewer;
let viewer;
@@ -21,65 +19,44 @@ describe('BalsamiqViewer', () => {
});
describe('loadFile', () => {
- let bv;
+ let xhr;
+ let loadFile;
const endpoint = 'endpoint';
- const requestSuccess = Promise.resolve({
- data: mockArrayBuffer,
- status: 200,
- });
beforeEach(() => {
- viewer = {};
- bv = new BalsamiqViewer(viewer);
- });
+ xhr = jasmine.createSpyObj('xhr', ['open', 'send']);
- it('should call `axios.get` on `endpoint` param with responseType set to `arraybuffer', () => {
- spyOn(axios, 'get').and.returnValue(requestSuccess);
- spyOn(bv, 'renderFile').and.stub();
+ balsamiqViewer = jasmine.createSpyObj('balsamiqViewer', ['renderFile']);
- bv.loadFile(endpoint);
+ spyOn(window, 'XMLHttpRequest').and.returnValue(xhr);
- expect(axios.get).toHaveBeenCalledWith(
- endpoint,
- jasmine.objectContaining({
- responseType: 'arraybuffer',
- }),
- );
+ loadFile = BalsamiqViewer.prototype.loadFile.call(balsamiqViewer, endpoint);
});
- it('should call `renderFile` on request success', done => {
- spyOn(axios, 'get').and.returnValue(requestSuccess);
- spyOn(bv, 'renderFile').and.callFake(() => {});
+ it('should call .open', () => {
+ expect(xhr.open).toHaveBeenCalledWith('GET', endpoint, true);
+ });
- bv.loadFile(endpoint)
- .then(() => {
- expect(bv.renderFile).toHaveBeenCalledWith(mockArrayBuffer);
- })
- .then(done)
- .catch(done.fail);
+ it('should set .responseType', () => {
+ expect(xhr.responseType).toBe('arraybuffer');
});
- it('should not call `renderFile` on request failure', done => {
- spyOn(axios, 'get').and.returnValue(Promise.reject());
- spyOn(bv, 'renderFile');
+ it('should call .send', () => {
+ expect(xhr.send).toHaveBeenCalled();
+ });
- bv.loadFile(endpoint)
- .then(() => {
- done.fail('Expected loadFile to throw error!');
- })
- .catch(() => {
- expect(bv.renderFile).not.toHaveBeenCalled();
- })
- .then(done)
- .catch(done.fail);
+ it('should return a promise', () => {
+ expect(loadFile).toEqual(jasmine.any(Promise));
});
});
describe('renderFile', () => {
let container;
+ let loadEvent;
let previews;
beforeEach(() => {
+ loadEvent = { target: { response: {} } };
viewer = jasmine.createSpyObj('viewer', ['appendChild']);
previews = [document.createElement('ul'), document.createElement('ul')];
@@ -96,11 +73,11 @@ describe('BalsamiqViewer', () => {
container = containerElement;
});
- BalsamiqViewer.prototype.renderFile.call(balsamiqViewer, mockArrayBuffer);
+ BalsamiqViewer.prototype.renderFile.call(balsamiqViewer, loadEvent);
});
it('should call .initDatabase', () => {
- expect(balsamiqViewer.initDatabase).toHaveBeenCalledWith(mockArrayBuffer);
+ expect(balsamiqViewer.initDatabase).toHaveBeenCalledWith(loadEvent.target.response);
});
it('should call .getPreviews', () => {
diff --git a/spec/javascripts/header_spec.js b/spec/javascripts/header_spec.js
index c36d3be1b22..0ddf589f368 100644
--- a/spec/javascripts/header_spec.js
+++ b/spec/javascripts/header_spec.js
@@ -20,26 +20,26 @@ describe('Header', function() {
});
it('should update todos-count after receiving the todo:toggle event', () => {
- triggerToggle(5);
+ triggerToggle('5');
expect($(todosPendingCount).text()).toEqual('5');
});
it('should hide todos-count when it is 0', () => {
- triggerToggle(0);
+ triggerToggle('0');
expect(isTodosCountHidden()).toEqual(true);
});
it('should show todos-count when it is more than 0', () => {
- triggerToggle(10);
+ triggerToggle('10');
expect(isTodosCountHidden()).toEqual(false);
});
describe('when todos-count is 1000', () => {
beforeEach(() => {
- triggerToggle(1000);
+ triggerToggle('1000');
});
it('should show todos-count', () => {
diff --git a/spec/javascripts/helpers/tracking_helper.js b/spec/javascripts/helpers/tracking_helper.js
deleted file mode 100644
index 68c1bd2dbca..00000000000
--- a/spec/javascripts/helpers/tracking_helper.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import Tracking from '~/tracking';
-
-export default Tracking;
-
-let document;
-let handlers;
-
-export function mockTracking(category = '_category_', documentOverride, spyMethod) {
- document = documentOverride || window.document;
- window.snowplow = () => {};
- Tracking.bindDocument(category, document);
- return spyMethod ? spyMethod(Tracking, 'event') : null;
-}
-
-export function unmockTracking() {
- window.snowplow = undefined;
- handlers.forEach(event => document.removeEventListener(event.name, event.func));
-}
-
-export function triggerEvent(selectorOrEl, eventName = 'click') {
- const event = new Event(eventName, { bubbles: true });
- const el = typeof selectorOrEl === 'string' ? document.querySelector(selectorOrEl) : selectorOrEl;
-
- el.dispatchEvent(event);
-}
diff --git a/spec/javascripts/helpers/vue_resource_helper.js b/spec/javascripts/helpers/vue_resource_helper.js
new file mode 100644
index 00000000000..0f58af09933
--- /dev/null
+++ b/spec/javascripts/helpers/vue_resource_helper.js
@@ -0,0 +1,11 @@
+// eslint-disable-next-line import/prefer-default-export
+export const headersInterceptor = (request, next) => {
+ next(response => {
+ const headers = {};
+ response.headers.forEach((value, key) => {
+ headers[key] = value;
+ });
+ // eslint-disable-next-line no-param-reassign
+ response.headers = headers;
+ });
+};
diff --git a/spec/javascripts/integrations/integration_settings_form_spec.js b/spec/javascripts/integrations/integration_settings_form_spec.js
index 82d1f815ca8..069e2cb07b5 100644
--- a/spec/javascripts/integrations/integration_settings_form_spec.js
+++ b/spec/javascripts/integrations/integration_settings_form_spec.js
@@ -126,7 +126,6 @@ describe('IntegrationSettingsForm', () => {
spyOn(axios, 'put').and.callThrough();
integrationSettingsForm = new IntegrationSettingsForm('.js-integration-settings-form');
- // eslint-disable-next-line no-jquery/no-serialize
formData = integrationSettingsForm.$form.serialize();
});
diff --git a/spec/javascripts/issue_show/components/app_spec.js b/spec/javascripts/issue_show/components/app_spec.js
index c3d1440c34e..2770743937e 100644
--- a/spec/javascripts/issue_show/components/app_spec.js
+++ b/spec/javascripts/issue_show/components/app_spec.js
@@ -1,5 +1,3 @@
-/* eslint-disable no-unused-vars */
-import GLDropdown from '~/gl_dropdown';
import Vue from 'vue';
import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils';
@@ -54,7 +52,6 @@ describe('Issuable output', () => {
markdownDocsPath: '/',
projectNamespace: '/',
projectPath: '/',
- issuableTemplateNamesPath: '/issuable-templates-path',
},
}).$mount();
@@ -132,11 +129,11 @@ describe('Issuable output', () => {
});
it('does not update formState if form is already open', done => {
- vm.updateAndShowForm();
+ vm.openForm();
vm.state.titleText = 'testing 123';
- vm.updateAndShowForm();
+ vm.openForm();
Vue.nextTick(() => {
expect(vm.store.formState.title).not.toBe('testing 123');
@@ -287,7 +284,7 @@ describe('Issuable output', () => {
});
});
- it('shows error message from backend if exists', done => {
+ it('shows error mesage from backend if exists', done => {
const msg = 'Custom error message from backend';
spyOn(vm.service, 'updateIssuable').and.callFake(
// eslint-disable-next-line prefer-promise-reject-errors
@@ -408,20 +405,20 @@ describe('Issuable output', () => {
});
});
- describe('updateAndShowForm', () => {
+ describe('open form', () => {
it('shows locked warning if form is open & data is different', done => {
vm.$nextTick()
.then(() => {
- vm.updateAndShowForm();
+ vm.openForm();
vm.poll.makeRequest();
-
- return new Promise(resolve => {
- vm.$watch('formState.lockedWarningVisible', value => {
- if (value) resolve();
- });
- });
})
+ // Wait for the request
+ .then(vm.$nextTick)
+ // Wait for the successCallback to update the store state
+ .then(vm.$nextTick)
+ // Wait for the new state to flow to the Vue components
+ .then(vm.$nextTick)
.then(() => {
expect(vm.formState.lockedWarningVisible).toEqual(true);
expect(vm.formState.lock_version).toEqual(1);
@@ -432,41 +429,6 @@ describe('Issuable output', () => {
});
});
- describe('requestTemplatesAndShowForm', () => {
- beforeEach(() => {
- spyOn(vm, 'updateAndShowForm');
- });
-
- it('shows the form if template names request is successful', done => {
- const mockData = [{ name: 'Bug' }];
- mock.onGet('/issuable-templates-path').reply(() => Promise.resolve([200, mockData]));
-
- vm.requestTemplatesAndShowForm()
- .then(() => {
- expect(vm.updateAndShowForm).toHaveBeenCalledWith(mockData);
- })
- .then(done)
- .catch(done.fail);
- });
-
- it('shows the form if template names request failed', done => {
- mock
- .onGet('/issuable-templates-path')
- .reply(() => Promise.reject(new Error('something went wrong')));
-
- vm.requestTemplatesAndShowForm()
- .then(() => {
- expect(document.querySelector('.flash-container .flash-text').textContent).toContain(
- 'Error updating issue',
- );
-
- expect(vm.updateAndShowForm).toHaveBeenCalledWith();
- })
- .then(done)
- .catch(done.fail);
- });
- });
-
describe('show inline edit button', () => {
it('should not render by default', () => {
expect(vm.$el.querySelector('.title-container .note-action-button')).toBeDefined();
diff --git a/spec/javascripts/sidebar/assignee_title_spec.js b/spec/javascripts/sidebar/assignee_title_spec.js
index 6c65a55ff29..7fff7c075d9 100644
--- a/spec/javascripts/sidebar/assignee_title_spec.js
+++ b/spec/javascripts/sidebar/assignee_title_spec.js
@@ -1,12 +1,13 @@
import Vue from 'vue';
import AssigneeTitle from '~/sidebar/components/assignees/assignee_title.vue';
-import { mockTracking, triggerEvent } from 'spec/helpers/tracking_helper';
describe('AssigneeTitle component', () => {
let component;
let AssigneeTitleComponent;
+ let statsSpy;
beforeEach(() => {
+ statsSpy = spyOnDependency(AssigneeTitle, 'trackEvent');
AssigneeTitleComponent = Vue.extend(AssigneeTitle);
});
@@ -104,20 +105,15 @@ describe('AssigneeTitle component', () => {
expect(component.$el.querySelector('.edit-link')).not.toBeNull();
});
- it('tracks the event when edit is clicked', () => {
+ it('calls trackEvent when edit is clicked', () => {
component = new AssigneeTitleComponent({
propsData: {
numberOfAssignees: 0,
editable: true,
},
}).$mount();
+ component.$el.querySelector('.js-sidebar-dropdown-toggle').click();
- const spy = mockTracking('_category_', component.$el, spyOn);
- triggerEvent('.js-sidebar-dropdown-toggle');
-
- expect(spy).toHaveBeenCalledWith('_category_', 'click_edit_button', {
- label: 'right_sidebar',
- property: 'assignee',
- });
+ expect(statsSpy).toHaveBeenCalled();
});
});
diff --git a/spec/javascripts/sidebar/confidential_issue_sidebar_spec.js b/spec/javascripts/sidebar/confidential_issue_sidebar_spec.js
index 50374b8973f..ea9e5677bc5 100644
--- a/spec/javascripts/sidebar/confidential_issue_sidebar_spec.js
+++ b/spec/javascripts/sidebar/confidential_issue_sidebar_spec.js
@@ -1,12 +1,13 @@
import Vue from 'vue';
import confidentialIssueSidebar from '~/sidebar/components/confidential/confidential_issue_sidebar.vue';
-import { mockTracking, triggerEvent } from 'spec/helpers/tracking_helper';
describe('Confidential Issue Sidebar Block', () => {
let vm1;
let vm2;
+ let statsSpy;
beforeEach(() => {
+ statsSpy = spyOnDependency(confidentialIssueSidebar, 'trackEvent');
const Component = Vue.extend(confidentialIssueSidebar);
const service = {
update: () => Promise.resolve(true),
@@ -69,13 +70,9 @@ describe('Confidential Issue Sidebar Block', () => {
});
});
- it('tracks the event when "Edit" is clicked', () => {
- const spy = mockTracking('_category_', vm1.$el, spyOn);
- triggerEvent('.confidential-edit');
+ it('calls trackEvent when "Edit" is clicked', () => {
+ vm1.$el.querySelector('.confidential-edit').click();
- expect(spy).toHaveBeenCalledWith('_category_', 'click_edit_button', {
- label: 'right_sidebar',
- property: 'confidentiality',
- });
+ expect(statsSpy).toHaveBeenCalled();
});
});
diff --git a/spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js b/spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js
index decccbb8964..2d930428230 100644
--- a/spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js
+++ b/spec/javascripts/sidebar/lock/lock_issue_sidebar_spec.js
@@ -1,12 +1,13 @@
import Vue from 'vue';
import lockIssueSidebar from '~/sidebar/components/lock/lock_issue_sidebar.vue';
-import { mockTracking, triggerEvent } from 'spec/helpers/tracking_helper';
describe('LockIssueSidebar', () => {
let vm1;
let vm2;
+ let statsSpy;
beforeEach(() => {
+ statsSpy = spyOnDependency(lockIssueSidebar, 'trackEvent');
const Component = Vue.extend(lockIssueSidebar);
const mediator = {
@@ -60,14 +61,10 @@ describe('LockIssueSidebar', () => {
});
});
- it('tracks an event when "Edit" is clicked', () => {
- const spy = mockTracking('_category_', vm1.$el, spyOn);
- triggerEvent('.lock-edit');
+ it('calls trackEvent when "Edit" is clicked', () => {
+ vm1.$el.querySelector('.lock-edit').click();
- expect(spy).toHaveBeenCalledWith('_category_', 'click_edit_button', {
- label: 'right_sidebar',
- property: 'lock_issue',
- });
+ expect(statsSpy).toHaveBeenCalled();
});
it('displays the edit form when opened from collapsed state', done => {
diff --git a/spec/javascripts/sidebar/subscriptions_spec.js b/spec/javascripts/sidebar/subscriptions_spec.js
index a97608d6b8a..2efa13f3fe8 100644
--- a/spec/javascripts/sidebar/subscriptions_spec.js
+++ b/spec/javascripts/sidebar/subscriptions_spec.js
@@ -2,13 +2,14 @@ import Vue from 'vue';
import subscriptions from '~/sidebar/components/subscriptions/subscriptions.vue';
import eventHub from '~/sidebar/event_hub';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
-import { mockTracking } from 'spec/helpers/tracking_helper';
describe('Subscriptions', function() {
let vm;
let Subscriptions;
+ let statsSpy;
beforeEach(() => {
+ statsSpy = spyOnDependency(subscriptions, 'trackEvent');
Subscriptions = Vue.extend(subscriptions);
});
@@ -52,7 +53,6 @@ describe('Subscriptions', function() {
vm = mountComponent(Subscriptions, { subscribed: true });
spyOn(eventHub, '$emit');
spyOn(vm, '$emit');
- spyOn(vm, 'track');
vm.toggleSubscription();
@@ -60,12 +60,11 @@ describe('Subscriptions', function() {
expect(vm.$emit).toHaveBeenCalledWith('toggleSubscription', jasmine.any(Object));
});
- it('tracks the event when toggled', () => {
+ it('calls trackEvent when toggled', () => {
vm = mountComponent(Subscriptions, { subscribed: true });
- const spy = mockTracking('_category_', vm.$el, spyOn);
vm.toggleSubscription();
- expect(spy).toHaveBeenCalled();
+ expect(statsSpy).toHaveBeenCalled();
});
it('onClickCollapsedIcon method emits `toggleSidebar` event on component', () => {
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index 191df3cc709..c0a999cfaa6 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -7,6 +7,7 @@ import 'core-js/features/set-immediate';
import 'vendor/jasmine-jquery';
import '~/commons';
import Vue from 'vue';
+import VueResource from 'vue-resource';
import Translate from '~/vue_shared/translate';
import jasmineDiff from 'jasmine-diff';
import { config as testUtilsConfig } from '@vue/test-utils';
@@ -45,6 +46,7 @@ Vue.config.errorHandler = function(err) {
fail(err);
};
+Vue.use(VueResource);
Vue.use(Translate);
// enable test fixtures
@@ -100,6 +102,13 @@ afterEach(__rewire_reset_all__); // eslint-disable-line
// to run our unit tests.
beforeEach(done => done());
+const builtinVueHttpInterceptors = Vue.http.interceptors.slice();
+
+beforeEach(() => {
+ // restore interceptors so we have no remaining ones from previous tests
+ Vue.http.interceptors = builtinVueHttpInterceptors.slice();
+});
+
let longRunningTestTimeoutHandle;
beforeEach(done => {
diff --git a/spec/javascripts/todos_spec.js b/spec/javascripts/todos_spec.js
index dc3c547c632..802f54f6a7e 100644
--- a/spec/javascripts/todos_spec.js
+++ b/spec/javascripts/todos_spec.js
@@ -1,31 +1,18 @@
import $ from 'jquery';
-import MockAdapter from 'axios-mock-adapter';
import Todos from '~/pages/dashboard/todos/index/todos';
import '~/lib/utils/common_utils';
-import '~/gl_dropdown';
-import axios from '~/lib/utils/axios_utils';
-import { addDelimiter } from '~/lib/utils/text_utility';
-
-const TEST_COUNT_BIG = 2000;
-const TEST_DONE_COUNT_BIG = 7300;
describe('Todos', () => {
preloadFixtures('todos/todos.html');
let todoItem;
- let mock;
beforeEach(() => {
loadFixtures('todos/todos.html');
todoItem = document.querySelector('.todos-list .todo');
- mock = new MockAdapter(axios);
return new Todos();
});
- afterEach(() => {
- mock.restore();
- });
-
describe('goToTodoUrl', () => {
it('opens the todo url', done => {
const todoLink = todoItem.dataset.url;
@@ -66,43 +53,5 @@ describe('Todos', () => {
expect(windowOpenSpy).not.toHaveBeenCalled();
});
});
-
- describe('on done todo click', () => {
- let onToggleSpy;
-
- beforeEach(done => {
- const el = document.querySelector('.js-done-todo');
- const path = el.dataset.href;
-
- // Arrange
- mock
- .onDelete(path)
- .replyOnce(200, { count: TEST_COUNT_BIG, done_count: TEST_DONE_COUNT_BIG });
- onToggleSpy = jasmine.createSpy('onToggle');
- $(document).on('todo:toggle', onToggleSpy);
-
- // Act
- el.click();
-
- // Wait for axios and HTML to udpate
- setImmediate(done);
- });
-
- it('dispatches todo:toggle', () => {
- expect(onToggleSpy).toHaveBeenCalledWith(jasmine.anything(), TEST_COUNT_BIG);
- });
-
- it('updates pending text', () => {
- expect(document.querySelector('.todos-pending .badge').innerHTML).toEqual(
- addDelimiter(TEST_COUNT_BIG),
- );
- });
-
- it('updates done text', () => {
- expect(document.querySelector('.todos-done .badge').innerHTML).toEqual(
- addDelimiter(TEST_DONE_COUNT_BIG),
- );
- });
- });
});
});
diff --git a/spec/javascripts/vue_shared/components/deprecated_modal_2_spec.js b/spec/javascripts/vue_shared/components/gl_modal_spec.js
index 64fb984d9fc..19af8b5d2f7 100644
--- a/spec/javascripts/vue_shared/components/deprecated_modal_2_spec.js
+++ b/spec/javascripts/vue_shared/components/gl_modal_spec.js
@@ -1,11 +1,11 @@
import $ from 'jquery';
import Vue from 'vue';
-import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue';
+import GlModal from '~/vue_shared/components/gl_modal.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
-const modalComponent = Vue.extend(DeprecatedModal2);
+const modalComponent = Vue.extend(GlModal);
-describe('DeprecatedModal2', () => {
+describe('GlModal', () => {
let vm;
afterEach(() => {
@@ -153,17 +153,17 @@ describe('DeprecatedModal2', () => {
let template;
if (slotName) {
template = `
- <deprecated-modal-2>
+ <gl-modal>
<template slot="${slotName}">${slotContent}</template>
- </deprecated-modal-2>
+ </gl-modal>
`;
} else {
- template = `<deprecated-modal-2>${slotContent}</deprecated-modal-2>`;
+ template = `<gl-modal>${slotContent}</gl-modal>`;
}
return Vue.extend({
components: {
- DeprecatedModal2,
+ GlModal,
},
template,
});
diff --git a/spec/lib/container_registry/client_spec.rb b/spec/lib/container_registry/client_spec.rb
index 3782c30e88a..6c2b338bfcd 100644
--- a/spec/lib/container_registry/client_spec.rb
+++ b/spec/lib/container_registry/client_spec.rb
@@ -73,69 +73,4 @@ describe ContainerRegistry::Client do
expect(response).to eq('Successfully redirected')
end
end
-
- def stub_upload(path, content, digest, status = 200)
- stub_request(:post, "http://container-registry/v2/#{path}/blobs/uploads/")
- .to_return(status: status, body: "", headers: { 'location' => 'http://container-registry/next_upload?id=someid' })
-
- stub_request(:put, "http://container-registry/next_upload?digest=#{digest}&id=someid")
- .with(body: content)
- .to_return(status: status, body: "", headers: {})
- end
-
- describe '#upload_blob' do
- subject { client.upload_blob('path', 'content', 'sha256:123') }
-
- context 'with successful uploads' do
- it 'starts the upload and posts the blob' do
- stub_upload('path', 'content', 'sha256:123')
-
- expect(subject).to be_success
- end
- end
-
- context 'with a failed upload' do
- before do
- stub_upload('path', 'content', 'sha256:123', 400)
- end
-
- it 'returns nil' do
- expect(subject).to be nil
- end
- end
- end
-
- describe '#generate_empty_manifest' do
- subject { client.generate_empty_manifest('path') }
-
- let(:result_manifest) do
- {
- schemaVersion: 2,
- mediaType: 'application/vnd.docker.distribution.manifest.v2+json',
- config: {
- mediaType: 'application/vnd.docker.container.image.v1+json',
- size: 21,
- digest: 'sha256:4435000728ee66e6a80e55637fc22725c256b61de344a2ecdeaac6bdb36e8bc3'
- }
- }
- end
-
- it 'uploads a random image and returns the manifest' do
- stub_upload('path', "{\n \"config\": {\n }\n}", 'sha256:4435000728ee66e6a80e55637fc22725c256b61de344a2ecdeaac6bdb36e8bc3')
-
- expect(subject).to eq(result_manifest)
- end
- end
-
- describe '#put_tag' do
- subject { client.put_tag('path', 'tagA', { foo: :bar }) }
-
- it 'uploads the manifest and returns the digest' do
- stub_request(:put, "http://container-registry/v2/path/manifests/tagA")
- .with(body: "{\n \"foo\": \"bar\"\n}")
- .to_return(status: 200, body: "", headers: { 'docker-content-digest' => 'sha256:123' })
-
- expect(subject).to eq 'sha256:123'
- end
- end
end
diff --git a/spec/lib/container_registry/tag_spec.rb b/spec/lib/container_registry/tag_spec.rb
index 3115dfe852f..110f006536b 100644
--- a/spec/lib/container_registry/tag_spec.rb
+++ b/spec/lib/container_registry/tag_spec.rb
@@ -179,7 +179,7 @@ describe ContainerRegistry::Tag do
end
end
- describe '#unsafe_delete' do
+ describe '#delete' do
before do
stub_request(:delete, 'http://registry.gitlab/v2/group/test/manifests/sha256:digest')
.with(headers: headers)
@@ -187,7 +187,7 @@ describe ContainerRegistry::Tag do
end
it 'correctly deletes the tag' do
- expect(tag.unsafe_delete).to be_truthy
+ expect(tag.delete).to be_truthy
end
end
end
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/code_stage_start_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/code_stage_start_spec.rb
deleted file mode 100644
index 29c8d548754..00000000000
--- a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/code_stage_start_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::Analytics::CycleAnalytics::StageEvents::CodeStageStart do
- let(:subject) { described_class.new({}) }
- let(:project) { create(:project) }
-
- it_behaves_like 'cycle analytics event'
-
- it 'needs connection with an issue via merge_requests_closing_issues table' do
- issue = create(:issue, project: project)
- merge_request = create(:merge_request, source_project: project)
- create(:merge_requests_closing_issues, issue: issue, merge_request: merge_request)
-
- other_merge_request = create(:merge_request, source_project: project, source_branch: 'a', target_branch: 'master')
-
- records = subject.apply_query_customization(MergeRequest.all)
- expect(records).to eq([merge_request])
- expect(records).not_to include(other_merge_request)
- end
-end
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_created_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_created_spec.rb
deleted file mode 100644
index efdef91c5a2..00000000000
--- a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_created_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::Analytics::CycleAnalytics::StageEvents::IssueCreated do
- it_behaves_like 'cycle analytics event'
-end
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_first_mentioned_in_commit_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_first_mentioned_in_commit_spec.rb
deleted file mode 100644
index 50883e1c1e2..00000000000
--- a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_first_mentioned_in_commit_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::Analytics::CycleAnalytics::StageEvents::IssueFirstMentionedInCommit do
- it_behaves_like 'cycle analytics event'
-end
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_stage_end_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_stage_end_spec.rb
deleted file mode 100644
index 85062db370a..00000000000
--- a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_stage_end_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::Analytics::CycleAnalytics::StageEvents::IssueStageEnd do
- it_behaves_like 'cycle analytics event'
-end
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_created_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_created_spec.rb
deleted file mode 100644
index 7858b810661..00000000000
--- a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_created_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::Analytics::CycleAnalytics::StageEvents::MergeRequestCreated do
- it_behaves_like 'cycle analytics event'
-end
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production_spec.rb
deleted file mode 100644
index ba9d8be5a2c..00000000000
--- a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_first_deployed_to_production_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::Analytics::CycleAnalytics::StageEvents::MergeRequestFirstDeployedToProduction do
- it_behaves_like 'cycle analytics event'
-end
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_finished_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_finished_spec.rb
deleted file mode 100644
index 8e83e10ef96..00000000000
--- a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_finished_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::Analytics::CycleAnalytics::StageEvents::MergeRequestLastBuildFinished do
- it_behaves_like 'cycle analytics event'
-end
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_started_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_started_spec.rb
deleted file mode 100644
index 9f6b430a320..00000000000
--- a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_last_build_started_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::Analytics::CycleAnalytics::StageEvents::MergeRequestLastBuildStarted do
- it_behaves_like 'cycle analytics event'
-end
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_merged_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_merged_spec.rb
deleted file mode 100644
index ce2aa0a60db..00000000000
--- a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/merge_request_merged_spec.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::Analytics::CycleAnalytics::StageEvents::MergeRequestMerged do
- it_behaves_like 'cycle analytics event'
-end
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/plan_stage_start_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/plan_stage_start_spec.rb
deleted file mode 100644
index cb63139f0a8..00000000000
--- a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/plan_stage_start_spec.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::Analytics::CycleAnalytics::StageEvents::PlanStageStart do
- let(:subject) { described_class.new({}) }
- let(:project) { create(:project) }
-
- it_behaves_like 'cycle analytics event'
-
- it 'filters issues where first_associated_with_milestone_at or first_added_to_board_at is filled' do
- issue1 = create(:issue, project: project)
- issue1.metrics.update!(first_added_to_board_at: 1.month.ago, first_mentioned_in_commit_at: 2.months.ago)
-
- issue2 = create(:issue, project: project)
- issue2.metrics.update!(first_associated_with_milestone_at: 1.month.ago, first_mentioned_in_commit_at: 2.months.ago)
-
- issue_without_metrics = create(:issue, project: project)
-
- records = subject.apply_query_customization(Issue.all)
- expect(records).to match_array([issue1, issue2])
- expect(records).not_to include(issue_without_metrics)
- end
-end
diff --git a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/stage_event_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/stage_event_spec.rb
index b05faf5d813..29f4be76a65 100644
--- a/spec/lib/gitlab/analytics/cycle_analytics/stage_events/stage_event_spec.rb
+++ b/spec/lib/gitlab/analytics/cycle_analytics/stage_events/stage_event_spec.rb
@@ -3,11 +3,8 @@
require 'spec_helper'
describe Gitlab::Analytics::CycleAnalytics::StageEvents::StageEvent do
- let(:instance) { described_class.new({}) }
-
it { expect(described_class).to respond_to(:name) }
it { expect(described_class).to respond_to(:identifier) }
- it { expect(instance).to respond_to(:object_type) }
- it { expect(instance).to respond_to(:timestamp_projection) }
- it { expect(instance).to respond_to(:apply_query_customization) }
+
+ it { expect(described_class.new({})).to respond_to(:object_type) }
end
diff --git a/spec/lib/gitlab/gitaly_client_spec.rb b/spec/lib/gitlab/gitaly_client_spec.rb
index ea3bb12d049..1c5f72a4396 100644
--- a/spec/lib/gitlab/gitaly_client_spec.rb
+++ b/spec/lib/gitlab/gitaly_client_spec.rb
@@ -182,24 +182,24 @@ describe Gitlab::GitalyClient do
end
it 'sets the gitaly-session-id in the metadata' do
- results = described_class.request_kwargs('default', timeout: 1)
+ results = described_class.request_kwargs('default', nil)
expect(results[:metadata]).to include('gitaly-session-id')
end
context 'when RequestStore is not enabled' do
it 'sets a different gitaly-session-id per request' do
- gitaly_session_id = described_class.request_kwargs('default', timeout: 1)[:metadata]['gitaly-session-id']
+ gitaly_session_id = described_class.request_kwargs('default', nil)[:metadata]['gitaly-session-id']
- expect(described_class.request_kwargs('default', timeout: 1)[:metadata]['gitaly-session-id']).not_to eq(gitaly_session_id)
+ expect(described_class.request_kwargs('default', nil)[:metadata]['gitaly-session-id']).not_to eq(gitaly_session_id)
end
end
context 'when RequestStore is enabled', :request_store do
it 'sets the same gitaly-session-id on every outgoing request metadata' do
- gitaly_session_id = described_class.request_kwargs('default', timeout: 1)[:metadata]['gitaly-session-id']
+ gitaly_session_id = described_class.request_kwargs('default', nil)[:metadata]['gitaly-session-id']
3.times do
- expect(described_class.request_kwargs('default', timeout: 1)[:metadata]['gitaly-session-id']).to eq(gitaly_session_id)
+ expect(described_class.request_kwargs('default', nil)[:metadata]['gitaly-session-id']).to eq(gitaly_session_id)
end
end
end
diff --git a/spec/lib/gitlab/github_import/importer/releases_importer_spec.rb b/spec/lib/gitlab/github_import/importer/releases_importer_spec.rb
index a1585fd2eb3..0e5419e6c5e 100644
--- a/spec/lib/gitlab/github_import/importer/releases_importer_spec.rb
+++ b/spec/lib/gitlab/github_import/importer/releases_importer_spec.rb
@@ -4,17 +4,17 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
let(:project) { create(:project) }
let(:client) { double(:client) }
let(:importer) { described_class.new(project, client) }
- let(:github_release_name) { 'Initial Release' }
let(:created_at) { Time.new(2017, 1, 1, 12, 00) }
+ let(:updated_at) { Time.new(2017, 1, 1, 12, 15) }
let(:released_at) { Time.new(2017, 1, 1, 12, 00) }
- let(:github_release) do
+ let(:release) do
double(
- :github_release,
+ :release,
tag_name: '1.0',
- name: github_release_name,
body: 'This is my release',
created_at: created_at,
+ updated_at: updated_at,
published_at: released_at
)
end
@@ -25,7 +25,7 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
tag_name: '1.0',
description: 'This is my release',
created_at: created_at,
- updated_at: created_at,
+ updated_at: updated_at,
released_at: released_at
}
@@ -37,8 +37,8 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
end
describe '#build_releases' do
- it 'returns an Array containing release rows' do
- expect(importer).to receive(:each_release).and_return([github_release])
+ it 'returns an Array containnig release rows' do
+ expect(importer).to receive(:each_release).and_return([release])
rows = importer.build_releases
@@ -49,13 +49,13 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
it 'does not create releases that already exist' do
create(:release, project: project, tag: '1.0', description: '1.0')
- expect(importer).to receive(:each_release).and_return([github_release])
+ expect(importer).to receive(:each_release).and_return([release])
expect(importer.build_releases).to be_empty
end
it 'uses a default release description if none is provided' do
- expect(github_release).to receive(:body).and_return('')
- expect(importer).to receive(:each_release).and_return([github_release])
+ expect(release).to receive(:body).and_return('')
+ expect(importer).to receive(:each_release).and_return([release])
release = importer.build_releases.first
@@ -64,7 +64,7 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
end
describe '#build' do
- let(:release_hash) { importer.build(github_release) }
+ let(:release_hash) { importer.build(release) }
it 'returns the attributes of the release as a Hash' do
expect(release_hash).to be_an_instance_of(Hash)
@@ -88,17 +88,13 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
end
it 'includes the updated timestamp' do
- expect(release_hash[:updated_at]).to eq(created_at)
- end
-
- it 'includes the release name' do
- expect(release_hash[:name]).to eq(github_release_name)
+ expect(release_hash[:updated_at]).to eq(updated_at)
end
end
end
describe '#each_release' do
- let(:github_release) { double(:github_release) }
+ let(:release) { double(:release) }
before do
allow(project).to receive(:import_source).and_return('foo/bar')
@@ -106,7 +102,7 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
allow(client)
.to receive(:releases)
.with('foo/bar')
- .and_return([github_release].to_enum)
+ .and_return([release].to_enum)
end
it 'returns an Enumerator' do
@@ -114,19 +110,19 @@ describe Gitlab::GithubImport::Importer::ReleasesImporter do
end
it 'yields every release to the Enumerator' do
- expect(importer.each_release.next).to eq(github_release)
+ expect(importer.each_release.next).to eq(release)
end
end
describe '#description_for' do
it 'returns the description when present' do
- expect(importer.description_for(github_release)).to eq(github_release.body)
+ expect(importer.description_for(release)).to eq(release.body)
end
it 'returns a generated description when one is not present' do
- allow(github_release).to receive(:body).and_return('')
+ allow(release).to receive(:body).and_return('')
- expect(importer.description_for(github_release)).to eq('Release for tag 1.0')
+ expect(importer.description_for(release)).to eq('Release for tag 1.0')
end
end
end
diff --git a/spec/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy_spec.rb b/spec/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy_spec.rb
index a3d2880182d..9a442de2900 100644
--- a/spec/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy_spec.rb
+++ b/spec/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy_spec.rb
@@ -24,22 +24,14 @@ describe Gitlab::ImportExport::AfterExportStrategies::BaseAfterExportStrategy do
service.execute(user, project)
- expect(service.locks_present?).to be_truthy
+ expect(lock_path_exist?).to be_truthy
end
context 'when the method succeeds' do
it 'removes the lock file' do
service.execute(user, project)
- expect(service.locks_present?).to be_falsey
- end
-
- it 'removes the archive path' do
- FileUtils.mkdir_p(shared.archive_path)
-
- service.execute(user, project)
-
- expect(File.exist?(shared.archive_path)).to be_falsey
+ expect(lock_path_exist?).to be_falsey
end
end
@@ -70,21 +62,13 @@ describe Gitlab::ImportExport::AfterExportStrategies::BaseAfterExportStrategy do
service.execute(user, project)
end
-
- it 'removes the archive path' do
- FileUtils.mkdir_p(shared.archive_path)
-
- service.execute(user, project)
-
- expect(File.exist?(shared.archive_path)).to be_falsey
- end
end
context 'when an exception is raised' do
it 'removes the lock' do
expect { service.execute(user, project) }.to raise_error(NotImplementedError)
- expect(service.locks_present?).to be_falsey
+ expect(lock_path_exist?).to be_falsey
end
end
end
@@ -113,4 +97,8 @@ describe Gitlab::ImportExport::AfterExportStrategies::BaseAfterExportStrategy do
expect(described_class.new(params).to_json).to eq result
end
end
+
+ def lock_path_exist?
+ File.exist?(described_class.lock_file_path(project))
+ end
end
diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml
index 3b43ff3a4e1..d3be1e86539 100644
--- a/spec/lib/gitlab/import_export/all_models.yml
+++ b/spec/lib/gitlab/import_export/all_models.yml
@@ -349,7 +349,6 @@ project:
- members_and_requesters
- build_trace_section_names
- build_trace_chunks
-- job_artifacts
- root_of_fork_network
- fork_network_member
- fork_network
diff --git a/spec/lib/gitlab/import_export/shared_spec.rb b/spec/lib/gitlab/import_export/shared_spec.rb
index da2c96dcf51..2c288cff6ef 100644
--- a/spec/lib/gitlab/import_export/shared_spec.rb
+++ b/spec/lib/gitlab/import_export/shared_spec.rb
@@ -5,35 +5,6 @@ describe Gitlab::ImportExport::Shared do
let(:project) { build(:project) }
subject { project.import_export_shared }
- context 'with a repository on disk' do
- let(:project) { create(:project, :repository) }
- let(:base_path) { %(/tmp/project_exports/#{project.disk_path}/) }
-
- describe '#archive_path' do
- it 'uses a random hash to avoid conflicts' do
- expect(subject.archive_path).to match(/#{base_path}\h{32}/)
- end
-
- it 'memoizes the path' do
- path = subject.archive_path
-
- 2.times { expect(subject.archive_path).to eq(path) }
- end
- end
-
- describe '#export_path' do
- it 'uses a random hash relative to project path' do
- expect(subject.export_path).to match(/#{base_path}\h{32}\/\h{32}/)
- end
-
- it 'memoizes the path' do
- path = subject.export_path
-
- 2.times { expect(subject.export_path).to eq(path) }
- end
- end
- end
-
describe '#error' do
let(:error) { StandardError.new('Error importing into /my/folder Permission denied @ unlink_internal - /var/opt/gitlab/gitlab-rails/shared/a/b/c/uploads/file') }
diff --git a/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb b/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb
deleted file mode 100644
index 756c7947df0..00000000000
--- a/spec/lib/gitlab/sidekiq_daemon/memory_killer_spec.rb
+++ /dev/null
@@ -1,402 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Gitlab::SidekiqDaemon::MemoryKiller do
- let(:memory_killer) { described_class.new }
- let(:pid) { 12345 }
-
- before do
- allow(memory_killer).to receive(:pid).and_return(pid)
- allow(Sidekiq.logger).to receive(:info)
- allow(Sidekiq.logger).to receive(:warn)
- end
-
- describe '#start_working' do
- subject { memory_killer.send(:start_working) }
-
- before do
- # let enabled? return 3 times: true, true, false
- allow(memory_killer).to receive(:enabled?).and_return(true, true, false)
- end
-
- context 'when structured logging is used' do
- it 'logs start message once' do
- expect(Sidekiq.logger).to receive(:info).once
- .with(
- class: described_class.to_s,
- action: 'start',
- pid: pid,
- message: 'Starting Gitlab::SidekiqDaemon::MemoryKiller Daemon')
-
- subject
- end
-
- it 'logs StandardError message twice' do
- expect(Sidekiq.logger).to receive(:warn).twice
- .with(
- class: described_class.to_s,
- pid: pid,
- message: "Exception from start_working: My Exception")
-
- expect(memory_killer).to receive(:rss_within_range?).twice.and_raise(StandardError, 'My Exception')
-
- expect { subject }.not_to raise_exception
- end
-
- it 'logs exception message once and raise execption and log stop message' do
- expect(Sidekiq.logger).to receive(:warn).once
- .with(
- class: described_class.to_s,
- pid: pid,
- message: "Exception from start_working: My Exception")
-
- expect(memory_killer).to receive(:rss_within_range?).once.and_raise(Exception, 'My Exception')
-
- expect(Sidekiq.logger).to receive(:warn).once
- .with(
- class: described_class.to_s,
- action: 'stop',
- pid: pid,
- message: 'Stopping Gitlab::SidekiqDaemon::MemoryKiller Daemon')
-
- expect { subject }.to raise_exception
- end
-
- it 'logs stop message once' do
- expect(Sidekiq.logger).to receive(:warn).once
- .with(
- class: described_class.to_s,
- action: 'stop',
- pid: pid,
- message: 'Stopping Gitlab::SidekiqDaemon::MemoryKiller Daemon')
-
- subject
- end
- end
-
- it 'not invoke restart_sidekiq when rss in range' do
- expect(memory_killer).to receive(:rss_within_range?).twice.and_return(true)
-
- expect(memory_killer).not_to receive(:restart_sidekiq)
-
- subject
- end
-
- it 'invoke restart_sidekiq when rss not in range' do
- expect(memory_killer).to receive(:rss_within_range?).at_least(:once).and_return(false)
-
- expect(memory_killer).to receive(:restart_sidekiq).at_least(:once)
-
- subject
- end
- end
-
- describe '#stop_working' do
- subject { memory_killer.send(:stop_working)}
-
- it 'changed enable? to false' do
- expect(memory_killer.send(:enabled?)).to be true
- subject
- expect(memory_killer.send(:enabled?)).to be false
- end
- end
-
- describe '#rss_within_range?' do
- let(:shutdown_timeout_seconds) { 7 }
- let(:check_interval_seconds) { 2 }
- let(:grace_balloon_seconds) { 5 }
-
- subject { memory_killer.send(:rss_within_range?) }
-
- before do
- stub_const("#{described_class}::SHUTDOWN_TIMEOUT_SECONDS", shutdown_timeout_seconds)
- stub_const("#{described_class}::CHECK_INTERVAL_SECONDS", check_interval_seconds)
- stub_const("#{described_class}::GRACE_BALLOON_SECONDS", grace_balloon_seconds)
- allow(Process).to receive(:getpgrp).and_return(pid)
- allow(Sidekiq).to receive(:options).and_return(timeout: 9)
- end
-
- it 'return true when everything is within limit' do
- expect(memory_killer).to receive(:get_rss).and_return(100)
- expect(memory_killer).to receive(:soft_limit_rss).and_return(200)
- expect(memory_killer).to receive(:hard_limit_rss).and_return(300)
-
- expect(Gitlab::Metrics::System).to receive(:monotonic_time).and_call_original
- expect(memory_killer).not_to receive(:log_rss_out_of_range)
-
- expect(subject).to be true
- end
-
- it 'return false when rss exceeds hard_limit_rss' do
- expect(memory_killer).to receive(:get_rss).and_return(400)
- expect(memory_killer).to receive(:soft_limit_rss).at_least(:once).and_return(200)
- expect(memory_killer).to receive(:hard_limit_rss).at_least(:once).and_return(300)
-
- expect(Gitlab::Metrics::System).to receive(:monotonic_time).and_call_original
-
- expect(memory_killer).to receive(:log_rss_out_of_range).with(400, 300, 200)
-
- expect(subject).to be false
- end
-
- it 'return false when rss exceed hard_limit_rss after a while' do
- expect(memory_killer).to receive(:get_rss).and_return(250, 400)
- expect(memory_killer).to receive(:soft_limit_rss).at_least(:once).and_return(200)
- expect(memory_killer).to receive(:hard_limit_rss).at_least(:once).and_return(300)
-
- expect(Gitlab::Metrics::System).to receive(:monotonic_time).twice.and_call_original
- expect(memory_killer).to receive(:sleep).with(check_interval_seconds)
-
- expect(memory_killer).to receive(:log_rss_out_of_range).with(400, 300, 200)
-
- expect(subject).to be false
- end
-
- it 'return true when rss below soft_limit_rss after a while within GRACE_BALLOON_SECONDS' do
- expect(memory_killer).to receive(:get_rss).and_return(250, 100)
- expect(memory_killer).to receive(:soft_limit_rss).and_return(200, 200)
- expect(memory_killer).to receive(:hard_limit_rss).and_return(300, 300)
-
- expect(Gitlab::Metrics::System).to receive(:monotonic_time).twice.and_call_original
- expect(memory_killer).to receive(:sleep).with(check_interval_seconds)
-
- expect(memory_killer).not_to receive(:log_rss_out_of_range)
-
- expect(subject).to be true
- end
-
- it 'return false when rss exceed soft_limit_rss longer than GRACE_BALLOON_SECONDS' do
- expect(memory_killer).to receive(:get_rss).exactly(4).times.and_return(250)
- expect(memory_killer).to receive(:soft_limit_rss).exactly(5).times.and_return(200)
- expect(memory_killer).to receive(:hard_limit_rss).exactly(5).times.and_return(300)
-
- expect(Gitlab::Metrics::System).to receive(:monotonic_time).exactly(5).times.and_call_original
- expect(memory_killer).to receive(:sleep).exactly(3).times.with(check_interval_seconds).and_call_original
-
- expect(memory_killer).to receive(:log_rss_out_of_range).with(250, 300, 200)
-
- expect(subject).to be false
- end
- end
-
- describe '#restart_sidekiq' do
- let(:shutdown_timeout_seconds) { 7 }
-
- subject { memory_killer.send(:restart_sidekiq) }
-
- before do
- stub_const("#{described_class}::SHUTDOWN_TIMEOUT_SECONDS", shutdown_timeout_seconds)
- allow(Sidekiq).to receive(:options).and_return(timeout: 9)
- end
-
- it 'send signal' do
- expect(memory_killer).to receive(:signal_and_wait).with(shutdown_timeout_seconds, 'SIGTSTP', 'stop fetching new jobs').ordered
- expect(memory_killer).to receive(:signal_and_wait).with(11, 'SIGTERM', 'gracefully shut down').ordered
- expect(memory_killer).to receive(:signal_pgroup).with('SIGKILL', 'die').ordered
-
- subject
- end
- end
-
- describe '#signal_and_wait' do
- let(:time) { 7 }
- let(:signal) { 'my-signal' }
- let(:explanation) { 'my-explanation' }
- let(:check_interval_seconds) { 2 }
-
- subject { memory_killer.send(:signal_and_wait, time, signal, explanation) }
-
- before do
- stub_const("#{described_class}::CHECK_INTERVAL_SECONDS", check_interval_seconds)
- end
-
- it 'send signal and return when all jobs finished' do
- expect(Process).to receive(:kill).with(signal, pid).ordered
- expect(Gitlab::Metrics::System).to receive(:monotonic_time).and_call_original
-
- expect(memory_killer).to receive(:enabled?).and_return(true)
- expect(memory_killer).to receive(:any_jobs?).and_return(false)
-
- expect(memory_killer).not_to receive(:sleep)
-
- subject
- end
-
- it 'send signal and wait till deadline if any job not finished' do
- expect(Process).to receive(:kill).with(signal, pid).ordered
- expect(Gitlab::Metrics::System).to receive(:monotonic_time).and_call_original.at_least(:once)
-
- expect(memory_killer).to receive(:enabled?).and_return(true).at_least(:once)
- expect(memory_killer).to receive(:any_jobs?).and_return(true).at_least(:once)
-
- expect(memory_killer).to receive(:sleep).and_call_original.exactly(4).times
-
- subject
- end
- end
-
- describe '#signal_pgroup' do
- let(:signal) { 'my-signal' }
- let(:explanation) { 'my-explanation' }
-
- subject { memory_killer.send(:signal_pgroup, signal, explanation) }
-
- it 'send signal to this proces if it is not group leader' do
- expect(Process).to receive(:getpgrp).and_return(pid + 1)
-
- expect(Sidekiq.logger).to receive(:warn).once
- .with(
- class: described_class.to_s,
- signal: signal,
- pid: pid,
- message: "sending Sidekiq worker PID-#{pid} #{signal} (#{explanation})")
- expect(Process).to receive(:kill).with(signal, pid).ordered
-
- subject
- end
-
- it 'send signal to whole process group as group leader' do
- expect(Process).to receive(:getpgrp).and_return(pid)
-
- expect(Sidekiq.logger).to receive(:warn).once
- .with(
- class: described_class.to_s,
- signal: signal,
- pid: pid,
- message: "sending Sidekiq worker PGRP-#{pid} #{signal} (#{explanation})")
- expect(Process).to receive(:kill).with(signal, 0).ordered
-
- subject
- end
- end
-
- describe '#log_rss_out_of_range' do
- let(:current_rss) { 100 }
- let(:soft_limit_rss) { 200 }
- let(:hard_limit_rss) { 300 }
- let(:reason) { 'rss out of range reason description' }
-
- subject { memory_killer.send(:log_rss_out_of_range, current_rss, hard_limit_rss, soft_limit_rss) }
-
- it 'invoke sidekiq logger warn' do
- expect(memory_killer).to receive(:out_of_range_description).with(current_rss, hard_limit_rss, soft_limit_rss).and_return(reason)
- expect(Sidekiq.logger).to receive(:warn)
- .with(
- class: described_class.to_s,
- pid: pid,
- message: 'Sidekiq worker RSS out of range',
- current_rss: current_rss,
- hard_limit_rss: hard_limit_rss,
- soft_limit_rss: soft_limit_rss,
- reason: reason)
-
- subject
- end
- end
-
- describe '#out_of_range_description' do
- let(:hard_limit) { 300 }
- let(:soft_limit) { 200 }
- let(:grace_balloon_seconds) { 12 }
-
- subject { memory_killer.send(:out_of_range_description, rss, hard_limit, soft_limit) }
-
- context 'when rss > hard_limit' do
- let(:rss) { 400 }
-
- it 'tells reason' do
- expect(subject).to eq("current_rss(#{rss}) > hard_limit_rss(#{hard_limit})")
- end
- end
-
- context 'when rss <= hard_limit' do
- let(:rss) { 300 }
-
- it 'tells reason' do
- stub_const("#{described_class}::GRACE_BALLOON_SECONDS", grace_balloon_seconds)
- expect(subject).to eq("current_rss(#{rss}) > soft_limit_rss(#{soft_limit}) longer than GRACE_BALLOON_SECONDS(#{grace_balloon_seconds})")
- end
- end
- end
-
- describe '#rss_increase_by_jobs' do
- let(:running_jobs) { { id1: 'job1', id2: 'job2' } }
-
- subject { memory_killer.send(:rss_increase_by_jobs) }
-
- it 'adds up individual rss_increase_by_job' do
- expect(Gitlab::SidekiqDaemon::Monitor).to receive_message_chain(:instance, :jobs).and_return(running_jobs)
- expect(memory_killer).to receive(:rss_increase_by_job).and_return(11, 22)
- expect(subject).to eq(33)
- end
-
- it 'return 0 if no job' do
- expect(Gitlab::SidekiqDaemon::Monitor).to receive_message_chain(:instance, :jobs).and_return({})
- expect(subject).to eq(0)
- end
- end
-
- describe '#rss_increase_by_job' do
- let(:worker_class) { Chaos::SleepWorker }
- let(:job) { { worker_class: worker_class, started_at: 321 } }
- let(:max_memory_kb) { 100000 }
-
- subject { memory_killer.send(:rss_increase_by_job, job) }
-
- before do
- stub_const("#{described_class}::DEFAULT_MAX_MEMORY_GROWTH_KB", max_memory_kb)
- end
-
- it 'return 0 if memory_growth_kb return 0' do
- expect(memory_killer).to receive(:get_job_options).with(job, 'memory_killer_memory_growth_kb', 0).and_return(0)
- expect(memory_killer).to receive(:get_job_options).with(job, 'memory_killer_max_memory_growth_kb', max_memory_kb).and_return(0)
-
- expect(Time).not_to receive(:now)
- expect(subject).to eq(0)
- end
-
- it 'return time factored growth value when it does not exceed max growth limit for whilited job' do
- expect(memory_killer).to receive(:get_job_options).with(job, 'memory_killer_memory_growth_kb', 0).and_return(10)
- expect(memory_killer).to receive(:get_job_options).with(job, 'memory_killer_max_memory_growth_kb', max_memory_kb).and_return(100)
-
- expect(Gitlab::Metrics::System).to receive(:monotonic_time).and_return(323)
- expect(subject).to eq(20)
- end
-
- it 'return max growth limit when time factored growth value exceed max growth limit for whilited job' do
- expect(memory_killer).to receive(:get_job_options).with(job, 'memory_killer_memory_growth_kb', 0).and_return(10)
- expect(memory_killer).to receive(:get_job_options).with(job, 'memory_killer_max_memory_growth_kb', max_memory_kb).and_return(100)
-
- expect(Gitlab::Metrics::System).to receive(:monotonic_time).and_return(332)
- expect(subject).to eq(100)
- end
- end
-
- describe '#get_job_options' do
- let(:worker_class) { Chaos::SleepWorker }
- let(:job) { { worker_class: worker_class, started_at: 321 } }
- let(:key) { 'my-key' }
- let(:default) { 'my-default' }
-
- subject { memory_killer.send(:get_job_options, job, key, default) }
-
- it 'return default if key is not defined' do
- expect(worker_class).to receive(:sidekiq_options).and_return({ "retry" => 5 })
-
- expect(subject).to eq(default)
- end
-
- it 'return default if get StandardError when retrieve sidekiq_options' do
- expect(worker_class).to receive(:sidekiq_options).and_raise(StandardError)
-
- expect(subject).to eq(default)
- end
-
- it 'return right value if sidekiq_options has the key' do
- expect(worker_class).to receive(:sidekiq_options).and_return({ key => 10 })
-
- expect(subject).to eq(10)
- end
- end
-end
diff --git a/spec/lib/gitlab/sidekiq_daemon/monitor_spec.rb b/spec/lib/gitlab/sidekiq_daemon/monitor_spec.rb
index 397098ed5a4..acbb09e3542 100644
--- a/spec/lib/gitlab/sidekiq_daemon/monitor_spec.rb
+++ b/spec/lib/gitlab/sidekiq_daemon/monitor_spec.rb
@@ -8,12 +8,12 @@ describe Gitlab::SidekiqDaemon::Monitor do
describe '#within_job' do
it 'tracks thread' do
blk = proc do
- expect(monitor.jobs.dig('jid', :thread)).not_to be_nil
+ expect(monitor.jobs_thread['jid']).not_to be_nil
"OK"
end
- expect(monitor.within_job('worker_class', 'jid', 'queue', &blk)).to eq("OK")
+ expect(monitor.within_job('jid', 'queue', &blk)).to eq("OK")
end
context 'when job is canceled' do
@@ -25,34 +25,19 @@ describe Gitlab::SidekiqDaemon::Monitor do
it 'does not execute a block' do
expect do |blk|
- monitor.within_job('worker_class', jid, 'queue', &blk)
+ monitor.within_job(jid, 'queue', &blk)
rescue described_class::CancelledError
end.not_to yield_control
end
it 'raises exception' do
- expect { monitor.within_job('worker_class', jid, 'queue') }.to raise_error(
+ expect { monitor.within_job(jid, 'queue') }.to raise_error(
described_class::CancelledError)
end
end
end
- describe '#start_working when notification channel not enabled' do
- subject { monitor.send(:start_working) }
-
- it 'return directly' do
- allow(monitor).to receive(:notification_channel_enabled?).and_return(nil)
-
- expect(Sidekiq.logger).not_to receive(:info)
- expect(Sidekiq.logger).not_to receive(:warn)
- expect(monitor).not_to receive(:enabled?)
- expect(monitor).not_to receive(:process_messages)
-
- subject
- end
- end
-
- describe '#start_working when notification channel enabled' do
+ describe '#start_working' do
subject { monitor.send(:start_working) }
before do
@@ -60,7 +45,6 @@ describe Gitlab::SidekiqDaemon::Monitor do
# we toggle `enabled?` flag after the first call
stub_const('Gitlab::SidekiqDaemon::Monitor::RECONNECT_TIME', 0)
allow(monitor).to receive(:enabled?).and_return(true, false)
- allow(monitor).to receive(:notification_channel_enabled?).and_return(1)
allow(Sidekiq.logger).to receive(:info)
allow(Sidekiq.logger).to receive(:warn)
@@ -220,7 +204,7 @@ describe Gitlab::SidekiqDaemon::Monitor do
let(:thread) { Thread.new { sleep 1000 } }
before do
- monitor.jobs[jid] = { worker_class: 'worker_class', thread: thread, started_at: Time.now.to_i }
+ monitor.jobs_thread[jid] = thread
end
after do
@@ -274,24 +258,4 @@ describe Gitlab::SidekiqDaemon::Monitor do
subject
end
end
-
- describe '#notification_channel_enabled?' do
- subject { monitor.send(:notification_channel_enabled?) }
-
- it 'return nil when SIDEKIQ_MONITOR_WORKER is not set' do
- expect(subject).to be nil
- end
-
- it 'return nil when SIDEKIQ_MONITOR_WORKER set to 0' do
- allow(ENV).to receive(:fetch).with('SIDEKIQ_MONITOR_WORKER', 0).and_return("0")
-
- expect(subject).to be nil
- end
-
- it 'return 1 when SIDEKIQ_MONITOR_WORKER set to 1' do
- allow(ENV).to receive(:fetch).with('SIDEKIQ_MONITOR_WORKER', 0).and_return("1")
-
- expect(subject).to be 1
- end
- end
end
diff --git a/spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb b/spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb
index 398144025ea..023df1a6391 100644
--- a/spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb
+++ b/spec/lib/gitlab/sidekiq_middleware/monitor_spec.rb
@@ -12,7 +12,7 @@ describe Gitlab::SidekiqMiddleware::Monitor do
it 'calls Gitlab::SidekiqDaemon::Monitor' do
expect(Gitlab::SidekiqDaemon::Monitor.instance).to receive(:within_job)
- .with(anything, 'job-id', 'my-queue')
+ .with('job-id', 'my-queue')
.and_call_original
expect { |blk| monitor.call(worker, job, queue, &blk) }.to yield_control
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb
index 842dc4d511c..62787c5abaf 100644
--- a/spec/lib/gitlab/usage_data_spec.rb
+++ b/spec/lib/gitlab/usage_data_spec.rb
@@ -55,7 +55,6 @@ describe Gitlab::UsageData do
omniauth_enabled
reply_by_email_enabled
container_registry_enabled
- dependency_proxy_enabled
gitlab_shared_runners_enabled
gitlab_pages
git
@@ -235,7 +234,6 @@ describe Gitlab::UsageData do
expect(subject[:omniauth_enabled]).to eq(Gitlab::Auth.omniauth_enabled?)
expect(subject[:reply_by_email_enabled]).to eq(Gitlab::IncomingEmail.enabled?)
expect(subject[:container_registry_enabled]).to eq(Gitlab.config.registry.enabled)
- expect(subject[:dependency_proxy_enabled]).to eq(Gitlab.config.dependency_proxy.enabled)
expect(subject[:gitlab_shared_runners_enabled]).to eq(Gitlab.config.gitlab_ci.shared_runners_enabled)
end
end
diff --git a/spec/migrations/sync_issuables_state_id_spec.rb b/spec/migrations/sync_issuables_state_id_spec.rb
deleted file mode 100644
index 8d1f8a36ac3..00000000000
--- a/spec/migrations/sync_issuables_state_id_spec.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-require Rails.root.join('db', 'post_migrate', '20190911251732_sync_issuables_state_id')
-
-describe SyncIssuablesStateId, :migration, :sidekiq do
- let(:migration) { described_class.new }
-
- describe '#up' do
- let(:issues) { table(:issues) }
- let(:namespaces) { table(:namespaces) }
- let(:projects) { table(:projects) }
- let(:merge_requests) { table(:merge_requests) }
- let(:group) { namespaces.create!(name: 'gitlab', path: 'gitlab') }
- let(:project) { projects.create!(namespace_id: group.id) }
- # These state_ids should be the same defined on Issue/MergeRequest models
- let(:state_ids) { { opened: 1, closed: 2, merged: 3, locked: 4 } }
-
- it 'migrates state column to state_id as integer' do
- opened_issue = issues.create!(description: 'first', state: 'opened')
- closed_issue = issues.create!(description: 'second', state: 'closed')
- opened_merge_request = merge_requests.create!(state: 'opened', target_project_id: project.id, target_branch: 'feature1', source_branch: 'master')
- closed_merge_request = merge_requests.create!(state: 'closed', target_project_id: project.id, target_branch: 'feature2', source_branch: 'master')
- merged_merge_request = merge_requests.create!(state: 'merged', target_project_id: project.id, target_branch: 'feature3', source_branch: 'master')
- locked_merge_request = merge_requests.create!(state: 'locked', target_project_id: project.id, target_branch: 'feature4', source_branch: 'master')
-
- migrate!
-
- expect(opened_issue.reload.state_id).to eq(state_ids[:opened])
- expect(closed_issue.reload.state_id).to eq(state_ids[:closed])
- expect(opened_merge_request.reload.state_id).to eq(state_ids[:opened])
- expect(closed_merge_request.reload.state_id).to eq(state_ids[:closed])
- expect(merged_merge_request.reload.state_id).to eq(state_ids[:merged])
- expect(locked_merge_request.reload.state_id).to eq(state_ids[:locked])
- end
- end
-end
diff --git a/spec/models/clusters/cluster_spec.rb b/spec/models/clusters/cluster_spec.rb
index b8a6fd6f914..9afbe6328ca 100644
--- a/spec/models/clusters/cluster_spec.rb
+++ b/spec/models/clusters/cluster_spec.rb
@@ -38,15 +38,6 @@ describe Clusters::Cluster, :use_clean_rails_memory_store_caching do
it { is_expected.to respond_to :project }
- describe 'applications have inverse_of: :cluster option' do
- let(:cluster) { create(:cluster) }
- let!(:helm) { create(:clusters_applications_helm, cluster: cluster) }
-
- it 'does not do a third query when referencing cluster again' do
- expect { cluster.application_helm.cluster }.not_to exceed_query_limit(2)
- end
- end
-
describe '.enabled' do
subject { described_class.enabled }
diff --git a/spec/models/project_services/jira_service_spec.rb b/spec/models/project_services/jira_service_spec.rb
index 39c1176f238..b86ab8959a2 100644
--- a/spec/models/project_services/jira_service_spec.rb
+++ b/spec/models/project_services/jira_service_spec.rb
@@ -650,7 +650,7 @@ describe JiraService do
end
end
- describe 'favicon urls' do
+ describe 'favicon urls', :request_store do
it 'includes the standard favicon' do
props = described_class.new.send(:build_remote_link_props, url: 'http://example.com', title: 'title')
expect(props[:object][:icon][:url16x16]).to match %r{^http://localhost/assets/favicon(?:-\h+).png$}
diff --git a/spec/models/release_spec.rb b/spec/models/release_spec.rb
index e7a8d27a036..8714c67f29d 100644
--- a/spec/models/release_spec.rb
+++ b/spec/models/release_spec.rb
@@ -20,6 +20,7 @@ RSpec.describe Release do
describe 'validation' do
it { is_expected.to validate_presence_of(:project) }
it { is_expected.to validate_presence_of(:description) }
+ it { is_expected.to validate_presence_of(:name) }
context 'when a release exists in the database without a name' do
it 'does not require name' do
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index 011b46c7f1a..6dc47e0e501 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -279,7 +279,7 @@ describe Repository do
describe '#commits' do
context 'when neither the all flag nor a ref are specified' do
it 'returns every commit from default branch' do
- expect(repository.commits(nil, limit: 60).size).to eq(37)
+ expect(repository.commits(limit: 60).size).to eq(37)
end
end
@@ -320,7 +320,7 @@ describe Repository do
context "when 'all' flag is set" do
it 'returns every commit from the repository' do
- expect(repository.commits(nil, all: true, limit: 60).size).to eq(60)
+ expect(repository.commits(all: true, limit: 60).size).to eq(60)
end
end
end
diff --git a/spec/presenters/project_presenter_spec.rb b/spec/presenters/project_presenter_spec.rb
index 2a00548c2c3..5bf80f6e318 100644
--- a/spec/presenters/project_presenter_spec.rb
+++ b/spec/presenters/project_presenter_spec.rb
@@ -430,26 +430,4 @@ describe ProjectPresenter do
)
end
end
-
- describe '#empty_repo_statistics_buttons' do
- let(:project) { create(:project, :repository) }
- let(:presenter) { described_class.new(project, current_user: user) }
-
- subject(:empty_repo_statistics_buttons) { presenter.empty_repo_statistics_buttons }
-
- before do
- project.add_developer(user)
- allow(project).to receive(:auto_devops_enabled?).and_return(false)
- end
-
- it 'orders the items correctly in an empty project' do
- expect(empty_repo_statistics_buttons.map(&:label)).to start_with(
- a_string_including('New'),
- a_string_including('README'),
- a_string_including('CHANGELOG'),
- a_string_including('CONTRIBUTING'),
- a_string_including('CI/CD')
- )
- end
- end
end
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb
index 90ff1d12bf1..5e6ff40e8cf 100644
--- a/spec/requests/api/commits_spec.rb
+++ b/spec/requests/api/commits_spec.rb
@@ -169,18 +169,6 @@ describe API::Commits do
end
end
- context 'first_parent optional parameter' do
- it 'returns all first_parent commits' do
- commit_count = project.repository.count_commits(ref: SeedRepo::Commit::ID, first_parent: true)
-
- get api("/projects/#{project_id}/repository/commits", user), params: { ref_name: SeedRepo::Commit::ID, first_parent: 'true' }
-
- expect(response).to include_pagination_headers
- expect(commit_count).to eq(12)
- expect(response.headers['X-Total']).to eq(commit_count.to_s)
- end
- end
-
context 'with_stats optional parameter' do
let(:project) { create(:project, :public, :repository) }
diff --git a/spec/requests/api/project_container_repositories_spec.rb b/spec/requests/api/project_container_repositories_spec.rb
index 3ac7ff7656b..f1dc4e6f0b2 100644
--- a/spec/requests/api/project_container_repositories_spec.rb
+++ b/spec/requests/api/project_container_repositories_spec.rb
@@ -150,7 +150,7 @@ describe API::ProjectContainerRepositories do
expect(response).to have_gitlab_http_status(:accepted)
end
- context 'called multiple times in one hour', :clean_gitlab_redis_shared_state do
+ context 'called multiple times in one hour' do
it 'returns 400 with an error message' do
stub_exclusive_lease_taken(lease_key, timeout: 1.hour)
subject
@@ -202,8 +202,6 @@ describe API::ProjectContainerRepositories do
end
describe 'DELETE /projects/:id/registry/repositories/:repository_id/tags/:tag_name' do
- let(:service) { double('service') }
-
subject { delete api("/projects/#{project.id}/registry/repositories/#{root_repository.id}/tags/rootA", api_user) }
it_behaves_like 'rejected container repository access', :reporter, :forbidden
@@ -212,34 +210,18 @@ describe API::ProjectContainerRepositories do
context 'for developer' do
let(:api_user) { developer }
- context 'when there are multiple tags' do
- before do
- stub_container_registry_tags(repository: root_repository.path, tags: %w(rootA rootB), with_manifest: true)
- end
-
- it 'properly removes tag' do
- expect(service).to receive(:execute).with(root_repository) { { status: :success } }
- expect(Projects::ContainerRepository::DeleteTagsService).to receive(:new).with(root_repository.project, api_user, tags: %w[rootA]) { service }
-
- subject
-
- expect(response).to have_gitlab_http_status(:ok)
- end
+ before do
+ stub_container_registry_tags(repository: root_repository.path, tags: %w(rootA), with_manifest: true)
end
- context 'when there\'s only one tag' do
- before do
- stub_container_registry_tags(repository: root_repository.path, tags: %w(rootA), with_manifest: true)
- end
-
- it 'properly removes tag' do
- expect(service).to receive(:execute).with(root_repository) { { status: :success } }
- expect(Projects::ContainerRepository::DeleteTagsService).to receive(:new).with(root_repository.project, api_user, tags: %w[rootA]) { service }
+ it 'properly removes tag' do
+ expect_any_instance_of(ContainerRegistry::Client)
+ .to receive(:delete_repository_tag).with(root_repository.path,
+ 'sha256:4c8e63ca4cb663ce6c688cb06f1c372b088dac5b6d7ad7d49cd620d85cf72a15')
- subject
+ subject
- expect(response).to have_gitlab_http_status(:ok)
- end
+ expect(response).to have_gitlab_http_status(:ok)
end
end
end
diff --git a/spec/requests/api/project_export_spec.rb b/spec/requests/api/project_export_spec.rb
index 7de8935097a..1d2f81a397d 100644
--- a/spec/requests/api/project_export_spec.rb
+++ b/spec/requests/api/project_export_spec.rb
@@ -30,7 +30,7 @@ describe API::ProjectExport do
FileUtils.mkdir_p File.join(project_started.export_path, 'securerandom-hex')
# simulate in after export action
- FileUtils.touch File.join(project_after_export.import_export_shared.lock_files_path, SecureRandom.hex)
+ FileUtils.touch Gitlab::ImportExport::AfterExportStrategies::BaseAfterExportStrategy.lock_file_path(project_after_export)
end
after do
diff --git a/spec/requests/api/project_import_spec.rb b/spec/requests/api/project_import_spec.rb
index d2b1fb063b8..594b42bb6c0 100644
--- a/spec/requests/api/project_import_spec.rb
+++ b/spec/requests/api/project_import_spec.rb
@@ -33,53 +33,6 @@ describe API::ProjectImport do
expect(response).to have_gitlab_http_status(201)
end
- context 'when a name is explicitly set' do
- let(:expected_name) { 'test project import' }
-
- it 'schedules an import using a namespace and a different name' do
- stub_import(namespace)
-
- post api('/projects/import', user), params: { path: 'test-import', file: fixture_file_upload(file), namespace: namespace.id, name: expected_name }
-
- expect(response).to have_gitlab_http_status(201)
- end
-
- it 'schedules an import using the namespace path and a different name' do
- stub_import(namespace)
-
- post api('/projects/import', user), params: { path: 'test-import', file: fixture_file_upload(file), namespace: namespace.full_path, name: expected_name }
-
- expect(response).to have_gitlab_http_status(201)
- end
-
- it 'sets name correctly' do
- stub_import(namespace)
-
- post api('/projects/import', user), params: { path: 'test-import', file: fixture_file_upload(file), namespace: namespace.full_path, name: expected_name }
-
- project = Project.find(json_response['id'])
- expect(project.name).to eq(expected_name)
- end
-
- it 'sets name correctly with an overwrite' do
- stub_import(namespace)
-
- post api('/projects/import', user), params: { path: 'test-import', file: fixture_file_upload(file), namespace: namespace.full_path, name: 'new project name', overwrite: true }
-
- project = Project.find(json_response['id'])
- expect(project.name).to eq('new project name')
- end
-
- it 'schedules an import using the path and name explicitly set to nil' do
- stub_import(namespace)
-
- post api('/projects/import', user), params: { path: 'test-import', file: fixture_file_upload(file), namespace: namespace.full_path, name: nil }
-
- project = Project.find(json_response['id'])
- expect(project.name).to eq('test-import')
- end
- end
-
it 'schedules an import at the user namespace level' do
stub_import(user.namespace)
diff --git a/spec/services/projects/container_repository/delete_tags_service_spec.rb b/spec/services/projects/container_repository/delete_tags_service_spec.rb
deleted file mode 100644
index 2ec5850c69e..00000000000
--- a/spec/services/projects/container_repository/delete_tags_service_spec.rb
+++ /dev/null
@@ -1,120 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Projects::ContainerRepository::DeleteTagsService do
- set(:user) { create(:user) }
- set(:project) { create(:project, :private) }
- set(:repository) { create(:container_repository, :root, project: project) }
-
- let(:params) { { tags: tags } }
- let(:service) { described_class.new(project, user, params) }
-
- before do
- stub_container_registry_config(enabled: true,
- api_url: 'http://registry.gitlab',
- host_port: 'registry.gitlab')
-
- stub_container_registry_tags(
- repository: repository.path,
- tags: %w(latest A Ba Bb C D E))
-
- stub_tag_digest('latest', 'sha256:configA')
- stub_tag_digest('A', 'sha256:configA')
- stub_tag_digest('Ba', 'sha256:configB')
- end
-
- describe '#execute' do
- let(:tags) { %w[A] }
- subject { service.execute(repository) }
-
- context 'without permissions' do
- it { is_expected.to include(status: :error) }
- end
-
- context 'with permissions' do
- before do
- project.add_developer(user)
- end
-
- context 'when no params are specified' do
- let(:params) { {} }
-
- it 'does not remove anything' do
- expect_any_instance_of(ContainerRegistry::Client).not_to receive(:delete_repository_tag)
-
- is_expected.to include(status: :error)
- end
- end
-
- context 'with empty tags' do
- let(:tags) { [] }
-
- it 'does not remove anything' do
- expect_any_instance_of(ContainerRegistry::Client).not_to receive(:delete_repository_tag)
-
- is_expected.to include(status: :error)
- end
- end
-
- context 'with dummy tags disabled' do
- let(:tags) { %w[A Ba] }
-
- before do
- stub_feature_flags(container_registry_smart_delete: false)
- end
-
- it 'deletes tags one by one' do
- expect_delete_tag('sha256:configA')
- expect_delete_tag('sha256:configB')
- is_expected.to include(status: :success)
- end
- end
-
- context 'with dummy tags enabled' do
- let(:tags) { %w[A Ba] }
-
- it 'deletes the tags using a dummy image' do
- stub_upload("{\n \"config\": {\n }\n}", 'sha256:4435000728ee66e6a80e55637fc22725c256b61de344a2ecdeaac6bdb36e8bc3')
-
- stub_request(:put, "http://registry.gitlab/v2/#{repository.path}/manifests/A")
- .to_return(status: 200, body: "", headers: { 'docker-content-digest' => 'sha256:dummy' })
-
- stub_request(:put, "http://registry.gitlab/v2/#{repository.path}/manifests/Ba")
- .to_return(status: 200, body: "", headers: { 'docker-content-digest' => 'sha256:dummy' })
-
- expect_delete_tag('sha256:dummy')
-
- is_expected.to include(status: :success)
- end
- end
- end
- end
-
- private
-
- def stub_tag_digest(tag, digest)
- stub_request(:head, "http://registry.gitlab/v2/#{repository.path}/manifests/#{tag}")
- .to_return(status: 200, body: "", headers: { 'docker-content-digest' => digest })
- end
-
- def stub_digest_config(digest, created_at)
- allow_any_instance_of(ContainerRegistry::Client)
- .to receive(:blob)
- .with(repository.path, digest, nil) do
- { 'created' => created_at.to_datetime.rfc3339 }.to_json if created_at
- end
- end
-
- def stub_upload(content, digest)
- expect_any_instance_of(ContainerRegistry::Client)
- .to receive(:upload_blob)
- .with(repository.path, content, digest) { double(success?: true ) }
- end
-
- def expect_delete_tag(digest)
- expect_any_instance_of(ContainerRegistry::Client)
- .to receive(:delete_repository_tag)
- .with(repository.path, digest) { true }
- end
-end
diff --git a/spec/services/quick_actions/interpret_service_spec.rb b/spec/services/quick_actions/interpret_service_spec.rb
index ec68e1a8cf9..b65ee16c189 100644
--- a/spec/services/quick_actions/interpret_service_spec.rb
+++ b/spec/services/quick_actions/interpret_service_spec.rb
@@ -586,22 +586,6 @@ describe QuickActions::InterpretService do
expect(message).to eq('Made this issue confidential.')
end
-
- context 'when issuable is already confidential' do
- before do
- issuable.update(confidential: true)
- end
-
- it 'does not return the success message' do
- _, _, message = service.execute(content, issuable)
-
- expect(message).to be_empty
- end
-
- it 'is not part of the available commands' do
- expect(service.available_commands(issuable)).not_to include(a_hash_including(name: :confidential))
- end
- end
end
shared_examples 'shrug command' do
diff --git a/spec/support/controllers/githubish_import_controller_shared_examples.rb b/spec/support/controllers/githubish_import_controller_shared_examples.rb
index f23812e7149..718d9857b18 100644
--- a/spec/support/controllers/githubish_import_controller_shared_examples.rb
+++ b/spec/support/controllers/githubish_import_controller_shared_examples.rb
@@ -139,38 +139,6 @@ shared_examples 'a GitHub-ish import controller: GET status' do
expect { get :status, format: :json }
.not_to exceed_all_query_limit(control_count)
end
-
- context 'when filtering' do
- let(:repo_2) { OpenStruct.new(login: 'emacs', full_name: 'asd/emacs', name: 'emacs', owner: { login: 'owner' }) }
- let(:project) { create(:project, import_type: provider, namespace: user.namespace, import_status: :finished, import_source: 'example/repo') }
- let(:group) { create(:group) }
-
- before do
- group.add_owner(user)
- stub_client(repos: [repo, repo_2, org_repo], orgs: [org], org_repos: [org_repo])
- end
-
- it 'filters list of repositories by name' do
- get :status, params: { filter: 'emacs' }, format: :json
-
- expect(response).to have_gitlab_http_status(200)
- expect(json_response.dig("imported_projects").count).to eq(0)
- expect(json_response.dig("provider_repos").count).to eq(1)
- expect(json_response.dig("provider_repos", 0, "id")).to eq(repo_2.id)
- expect(json_response.dig("namespaces", 0, "id")).to eq(group.id)
- end
-
- context 'when user input contains html' do
- let(:expected_filter) { 'test' }
- let(:filter) { "<html>#{expected_filter}</html>" }
-
- it 'sanitizes user input' do
- get :status, params: { filter: filter }, format: :json
-
- expect(assigns(:filter)).to eq(expected_filter)
- end
- end
- end
end
shared_examples 'a GitHub-ish import controller: POST create' do
diff --git a/spec/support/helpers/wait_for_requests.rb b/spec/support/helpers/wait_for_requests.rb
index d5483d0b0a7..30dff1063b5 100644
--- a/spec/support/helpers/wait_for_requests.rb
+++ b/spec/support/helpers/wait_for_requests.rb
@@ -49,11 +49,11 @@ module WaitForRequests
return true unless javascript_test?
finished_all_ajax_requests? &&
- finished_all_axios_requests?
+ finished_all_vue_resource_requests?
end
- def finished_all_axios_requests?
- Capybara.page.evaluate_script('window.pendingRequests || 0').zero?
+ def finished_all_vue_resource_requests?
+ Capybara.page.evaluate_script('window.activeVueResources || 0').zero?
end
def finished_all_ajax_requests?
diff --git a/spec/support/shared_examples/cycle_analytics_event_shared_examples.rb b/spec/support/shared_examples/cycle_analytics_event_shared_examples.rb
deleted file mode 100644
index dce1dbe1cd1..00000000000
--- a/spec/support/shared_examples/cycle_analytics_event_shared_examples.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-shared_examples_for 'cycle analytics event' do
- let(:instance) { described_class.new({}) }
-
- it { expect(described_class.name).to be_a_kind_of(String) }
- it { expect(described_class.identifier).to be_a_kind_of(Symbol) }
- it { expect(instance.object_type.ancestors).to include(ApplicationRecord) }
- it { expect(instance).to respond_to(:timestamp_projection) }
-
- describe '#apply_query_customization' do
- it 'expects an ActiveRecord::Relation object as argument and returns a modified version of it' do
- input_query = instance.object_type.all
-
- output_query = instance.apply_query_customization(input_query)
- expect(output_query).to be_a_kind_of(ActiveRecord::Relation)
- end
- end
-end
diff --git a/spec/support/shared_examples/snippet_visibility_shared_examples.rb b/spec/support/shared_examples/snippet_visibility_shared_examples.rb
index e2089ee623a..b5321c6db34 100644
--- a/spec/support/shared_examples/snippet_visibility_shared_examples.rb
+++ b/spec/support/shared_examples/snippet_visibility_shared_examples.rb
@@ -11,21 +11,13 @@ RSpec.shared_examples 'snippet visibility' do
set(:author) { create(:user) }
set(:member) { create(:user) }
set(:external) { create(:user, :external) }
- set(:non_member) { create(:user) }
-
- set(:project) do
- create(:project).tap do |project|
- project.add_developer(author)
- project.add_developer(member)
- end
- end
context "For project snippets" do
let!(:users) do
{
unauthenticated: nil,
external: external,
- non_member: non_member,
+ non_member: create(:user),
member: member,
author: author
}
@@ -219,18 +211,14 @@ RSpec.shared_examples 'snippet visibility' do
end
with_them do
- let!(:project_visibility) { project.update_column(:visibility_level, Gitlab::VisibilityLevel.level_value(project_type.to_s)) }
+ let!(:project) { create(:project, visibility_level: Gitlab::VisibilityLevel.level_value(project_type.to_s)) }
let!(:project_feature) { project.project_feature.update_column(:snippets_access_level, feature_visibility) }
let!(:user) { users[user_type] }
let!(:snippet) { create(:project_snippet, visibility_level: snippet_type, project: project, author: author) }
- let!(:external_member) do
- member = project.project_member(external)
-
- if project.private?
- project.add_developer(external) unless member
- else
- member.delete if member
- end
+ let!(:members) do
+ project.add_developer(author)
+ project.add_developer(member)
+ project.add_developer(external) if project.private?
end
context "For #{params[:project_type]} project and #{params[:user_type]} users" do
@@ -268,7 +256,7 @@ RSpec.shared_examples 'snippet visibility' do
{
unauthenticated: nil,
external: external,
- non_member: non_member,
+ non_member: create(:user),
author: author
}
end
diff --git a/spec/tasks/gitlab/artifacts/migrate_rake_spec.rb b/spec/tasks/gitlab/artifacts/migrate_rake_spec.rb
index afa9ff50146..be69c10d7c8 100644
--- a/spec/tasks/gitlab/artifacts/migrate_rake_spec.rb
+++ b/spec/tasks/gitlab/artifacts/migrate_rake_spec.rb
@@ -11,11 +11,10 @@ describe 'gitlab:artifacts namespace rake task' do
stub_artifacts_object_storage(enabled: object_storage_enabled)
end
- describe 'gitlab:artifacts:migrate' do
- subject { run_rake_task('gitlab:artifacts:migrate') }
+ subject { run_rake_task('gitlab:artifacts:migrate') }
+ context 'job artifacts' do
let!(:artifact) { create(:ci_job_artifact, :archive, file_store: store) }
- let!(:job_trace) { create(:ci_job_artifact, :trace, file_store: store) }
context 'when local storage is used' do
let(:store) { ObjectStorage::Store::LOCAL }
@@ -28,7 +27,6 @@ describe 'gitlab:artifacts namespace rake task' do
subject
expect(artifact.reload.file_store).to eq(ObjectStorage::Store::REMOTE)
- expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::REMOTE)
end
end
@@ -39,7 +37,6 @@ describe 'gitlab:artifacts namespace rake task' do
subject
expect(artifact.reload.file_store).to eq(ObjectStorage::Store::REMOTE)
- expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::REMOTE)
end
end
@@ -48,7 +45,6 @@ describe 'gitlab:artifacts namespace rake task' do
subject
expect(artifact.reload.file_store).to eq(ObjectStorage::Store::LOCAL)
- expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::LOCAL)
end
end
end
@@ -61,40 +57,6 @@ describe 'gitlab:artifacts namespace rake task' do
subject
expect(artifact.reload.file_store).to eq(ObjectStorage::Store::REMOTE)
- expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::REMOTE)
- end
- end
- end
-
- describe 'gitlab:artifacts:migrate_to_local' do
- let(:object_storage_enabled) { true }
-
- subject { run_rake_task('gitlab:artifacts:migrate_to_local') }
-
- let!(:artifact) { create(:ci_job_artifact, :archive, file_store: store) }
- let!(:job_trace) { create(:ci_job_artifact, :trace, file_store: store) }
-
- context 'when remote storage is used' do
- let(:store) { ObjectStorage::Store::REMOTE }
-
- context 'and job has remote file store defined' do
- it "migrates file to local storage" do
- subject
-
- expect(artifact.reload.file_store).to eq(ObjectStorage::Store::LOCAL)
- expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::LOCAL)
- end
- end
- end
-
- context 'when local storage is used' do
- let(:store) { ObjectStorage::Store::LOCAL }
-
- it 'file stays on local storage' do
- subject
-
- expect(artifact.reload.file_store).to eq(ObjectStorage::Store::LOCAL)
- expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::LOCAL)
end
end
end
diff --git a/spec/tasks/gitlab/lfs/migrate_rake_spec.rb b/spec/tasks/gitlab/lfs/migrate_rake_spec.rb
index a85a0031a6c..66d1a192a96 100644
--- a/spec/tasks/gitlab/lfs/migrate_rake_spec.rb
+++ b/spec/tasks/gitlab/lfs/migrate_rake_spec.rb
@@ -5,49 +5,32 @@ describe 'gitlab:lfs namespace rake task' do
Rake.application.rake_require 'tasks/gitlab/lfs/migrate'
end
- context 'migration tasks' do
+ describe 'migrate' do
let(:local) { ObjectStorage::Store::LOCAL }
let(:remote) { ObjectStorage::Store::REMOTE }
+ let!(:lfs_object) { create(:lfs_object, :with_file, file_store: local) }
- before do
- stub_lfs_object_storage(background_upload: false, direct_upload: false)
+ def lfs_migrate
+ run_rake_task('gitlab:lfs:migrate')
end
- describe 'migrate' do
- subject { run_rake_task('gitlab:lfs:migrate') }
-
- let!(:lfs_object) { create(:lfs_object, :with_file) }
-
- context 'object storage disabled' do
- before do
- stub_lfs_object_storage(enabled: false)
- end
-
- it "doesn't migrate files" do
- expect { subject }.not_to change { lfs_object.reload.file_store }
- end
+ context 'object storage disabled' do
+ before do
+ stub_lfs_object_storage(enabled: false)
end
- context 'object storage enabled' do
- it 'migrates local file to object storage' do
- expect { subject }.to change { lfs_object.reload.file_store }.from(local).to(remote)
- end
+ it "doesn't migrate files" do
+ expect { lfs_migrate }.not_to change { lfs_object.reload.file_store }
end
end
- describe 'migrate_to_local' do
- subject { run_rake_task('gitlab:lfs:migrate_to_local') }
-
- let(:lfs_object) { create(:lfs_object, :with_file, :object_storage) }
-
+ context 'object storage enabled' do
before do
- stub_lfs_object_storage(background_upload: false, direct_upload: true)
+ stub_lfs_object_storage
end
- context 'object storage enabled' do
- it 'migrates remote files to local storage' do
- expect { subject }.to change { lfs_object.reload.file_store }.from(remote).to(local)
- end
+ it 'migrates local file to object storage' do
+ expect { lfs_migrate }.to change { lfs_object.reload.file_store }.from(local).to(remote)
end
end
end
diff --git a/spec/tasks/gitlab/traces_rake_spec.rb b/spec/tasks/gitlab/traces_rake_spec.rb
new file mode 100644
index 00000000000..aaf0d7242dd
--- /dev/null
+++ b/spec/tasks/gitlab/traces_rake_spec.rb
@@ -0,0 +1,113 @@
+require 'rake_helper'
+
+describe 'gitlab:traces rake tasks' do
+ before do
+ Rake.application.rake_require 'tasks/gitlab/traces'
+ end
+
+ describe 'gitlab:traces:archive' do
+ shared_examples 'passes the job id to worker' do
+ it do
+ expect(ArchiveTraceWorker).to receive(:bulk_perform_async).with([[job.id]])
+
+ run_rake_task('gitlab:traces:archive')
+ end
+ end
+
+ shared_examples 'does not pass the job id to worker' do
+ it do
+ expect(ArchiveTraceWorker).not_to receive(:bulk_perform_async)
+
+ run_rake_task('gitlab:traces:archive')
+ end
+ end
+
+ context 'when trace file stored in default path' do
+ let!(:job) { create(:ci_build, :success, :trace_live) }
+
+ it_behaves_like 'passes the job id to worker'
+ end
+
+ context 'when trace is stored in database' do
+ let!(:job) { create(:ci_build, :success) }
+
+ before do
+ job.update_column(:trace, 'trace in db')
+ end
+
+ it_behaves_like 'passes the job id to worker'
+ end
+
+ context 'when job has trace artifact' do
+ let!(:job) { create(:ci_build, :success) }
+
+ before do
+ create(:ci_job_artifact, :trace, job: job)
+ end
+
+ it_behaves_like 'does not pass the job id to worker'
+ end
+
+ context 'when job is not finished yet' do
+ let!(:build) { create(:ci_build, :running, :trace_live) }
+
+ it_behaves_like 'does not pass the job id to worker'
+ end
+ end
+
+ describe 'gitlab:traces:migrate' do
+ let(:object_storage_enabled) { false }
+
+ before do
+ stub_artifacts_object_storage(enabled: object_storage_enabled)
+ end
+
+ subject { run_rake_task('gitlab:traces:migrate') }
+
+ let!(:job_trace) { create(:ci_job_artifact, :trace, file_store: store) }
+
+ context 'when local storage is used' do
+ let(:store) { ObjectStorage::Store::LOCAL }
+
+ context 'and job does not have file store defined' do
+ let(:object_storage_enabled) { true }
+ let(:store) { nil }
+
+ it "migrates file to remote storage" do
+ subject
+
+ expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::REMOTE)
+ end
+ end
+
+ context 'and remote storage is defined' do
+ let(:object_storage_enabled) { true }
+
+ it "migrates file to remote storage" do
+ subject
+
+ expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::REMOTE)
+ end
+ end
+
+ context 'and remote storage is not defined' do
+ it "fails to migrate to remote storage" do
+ subject
+
+ expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::LOCAL)
+ end
+ end
+ end
+
+ context 'when remote storage is used' do
+ let(:object_storage_enabled) { true }
+ let(:store) { ObjectStorage::Store::REMOTE }
+
+ it "file stays on remote storage" do
+ subject
+
+ expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::REMOTE)
+ end
+ end
+ end
+end
diff --git a/spec/tasks/gitlab/uploads/migrate_rake_spec.rb b/spec/tasks/gitlab/uploads/migrate_rake_spec.rb
index 8d1e355a7d3..9588e8be5dc 100644
--- a/spec/tasks/gitlab/uploads/migrate_rake_spec.rb
+++ b/spec/tasks/gitlab/uploads/migrate_rake_spec.rb
@@ -1,42 +1,31 @@
require 'rake_helper'
-describe 'gitlab:uploads:migrate and migrate_to_local rake tasks' do
+describe 'gitlab:uploads:migrate rake tasks' do
let(:model_class) { nil }
let(:uploader_class) { nil }
let(:mounted_as) { nil }
let(:batch_size) { 3 }
before do
- stub_env('MIGRATION_BATCH_SIZE', batch_size.to_s)
+ stub_env('BATCH', batch_size.to_s)
stub_uploads_object_storage(uploader_class)
Rake.application.rake_require 'tasks/gitlab/uploads/migrate'
allow(ObjectStorage::MigrateUploadsWorker).to receive(:perform_async)
end
- def run(task)
+ def run
args = [uploader_class.to_s, model_class.to_s, mounted_as].compact
- run_rake_task(task, *args)
+ run_rake_task("gitlab:uploads:migrate", *args)
end
shared_examples 'enqueue jobs in batch' do |batch:|
- it 'migrates local storage to remote object storage' do
+ it do
expect(ObjectStorage::MigrateUploadsWorker)
.to receive(:perform_async).exactly(batch).times
- .and_return("A fake job.")
+ .and_return("A fake job.")
- run('gitlab:uploads:migrate')
- end
-
- it 'migrates remote object storage to local storage' do
- expect(Upload).to receive(:where).exactly(batch + 1).times { Upload.all }
- expect(ObjectStorage::MigrateUploadsWorker)
- .to receive(:perform_async)
- .with(anything, model_class.name, mounted_as, ObjectStorage::Store::LOCAL)
- .exactly(batch).times
- .and_return("A fake job.")
-
- run('gitlab:uploads:migrate_to_local')
+ run
end
end
diff --git a/spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb b/spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb
index 6c2544d2efd..da490cb02af 100644
--- a/spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb
+++ b/spec/uploaders/workers/object_storage/migrate_uploads_worker_spec.rb
@@ -11,8 +11,8 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
let(:uploads) { Upload.all }
let(:to_store) { ObjectStorage::Store::REMOTE }
- def perform(uploads, store = nil)
- described_class.new.perform(uploads.ids, model_class.to_s, mounted_as, store || to_store)
+ def perform(uploads)
+ described_class.new.perform(uploads.ids, model_class.to_s, mounted_as, to_store)
rescue ObjectStorage::MigrateUploadsWorker::Report::MigrationFailures
# swallow
end
@@ -97,28 +97,12 @@ describe ObjectStorage::MigrateUploadsWorker, :sidekiq do
it_behaves_like 'outputs correctly', success: 10
- it 'migrates files to remote storage' do
+ it 'migrates files' do
perform(uploads)
expect(Upload.where(store: ObjectStorage::Store::LOCAL).count).to eq(0)
end
- context 'reversed' do
- let(:to_store) { ObjectStorage::Store::LOCAL }
-
- before do
- perform(uploads, ObjectStorage::Store::REMOTE)
- end
-
- it 'migrates files to local storage' do
- expect(Upload.where(store: ObjectStorage::Store::REMOTE).count).to eq(10)
-
- perform(uploads)
-
- expect(Upload.where(store: ObjectStorage::Store::LOCAL).count).to eq(10)
- end
- end
-
context 'migration is unsuccessful' do
before do
allow_any_instance_of(ObjectStorage::Concern)
diff --git a/spec/workers/object_pool/destroy_worker_spec.rb b/spec/workers/object_pool/destroy_worker_spec.rb
index 52d457b4b71..ef74f0ba87c 100644
--- a/spec/workers/object_pool/destroy_worker_spec.rb
+++ b/spec/workers/object_pool/destroy_worker_spec.rb
@@ -16,9 +16,7 @@ describe ObjectPool::DestroyWorker do
subject { described_class.new }
it 'requests Gitaly to remove the object pool' do
- expect(Gitlab::GitalyClient).to receive(:call)
- .with(pool.shard_name, :object_pool_service, :delete_object_pool,
- Object, timeout: Gitlab::GitalyClient.long_timeout)
+ expect(Gitlab::GitalyClient).to receive(:call).with(pool.shard_name, :object_pool_service, :delete_object_pool, Object)
subject.perform(pool.id)
end
diff --git a/vendor/licenses.csv b/vendor/licenses.csv
index c8b305d767d..41dd9eb5256 100644
--- a/vendor/licenses.csv
+++ b/vendor/licenses.csv
@@ -1131,6 +1131,7 @@ vue-apollo,3.0.0-beta.25,ISC
vue-functional-data-merge,2.0.6,MIT
vue-hot-reload-api,2.3.0,MIT
vue-loader,15.4.2,MIT
+vue-resource,1.5.0,MIT
vue-router,3.0.1,MIT
vue-style-loader,4.1.0,MIT
vue-template-compiler,2.5.17,MIT
diff --git a/yarn.lock b/yarn.lock
index 8e6fd5b1a2e..0186f8aad61 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -991,15 +991,15 @@
dependencies:
vue-eslint-parser "^6.0.4"
-"@gitlab/svgs@^1.74.0":
- version "1.74.0"
- resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.74.0.tgz#2883c47c476a08e8c9c3621117a544204f4c13a3"
- integrity sha512-L/Jga3EzGgOWF1rdQrH8wNm4dBFXcAVPZnFOEvBoe5OoWZgR3Ac/5Bgz4fYXYyPEKYUSorO7eyE6OVSvjKoM7g==
+"@gitlab/svgs@^1.73.0":
+ version "1.73.0"
+ resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.73.0.tgz#e44b347e4be77b94474c80cf5c2ee26ca0325c2f"
+ integrity sha512-4on+l5CS8Ae8OOcrnxwkO5s2zq1kHl/YjnOrHaX7megr6jsTYsVzKGaEMe0ViMSIPXA2+QnGD6vElKMkeD2+YQ==
-"@gitlab/ui@5.26.0":
- version "5.26.0"
- resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-5.26.0.tgz#303dcb339947b04bd04378828bd6b6ee1509ea9e"
- integrity sha512-F8zjN6oiXUy787/4xD+vApuqRxiNe5ZhWg96gT23cUk5SL1Oj4NyMETpAh0v9R9J/i70ETmBYW011EGogjlAVA==
+"@gitlab/ui@5.25.2":
+ version "5.25.2"
+ resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-5.25.2.tgz#599954fefcc228d31a398dbe3c1e2287a0fcdb3e"
+ integrity sha512-mwwvEhVTomnZQjG0dADD+9Kg1UHZXAIb4s5QwQxwpgTkemILYIb1r96oKWfmPe8Pl/xrzAoMUtGEPT3XbxDqYQ==
dependencies:
"@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.2.1"
@@ -1013,10 +1013,10 @@
vue "^2.6.10"
vue-loader "^15.4.2"
-"@gitlab/visual-review-tools@1.0.2":
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/@gitlab/visual-review-tools/-/visual-review-tools-1.0.2.tgz#d7b410d962cf32e6b6159207917134f7e6a90c68"
- integrity sha512-U6cw/y/Hf9gYhpV9zBPv4SoIXf1hKye2Xrynj+1Yt2ZmJJG/+QnJfvS6MEuFcNcJRL42p1VDG98uzYMp3rJ7ww==
+"@gitlab/visual-review-tools@1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@gitlab/visual-review-tools/-/visual-review-tools-1.0.1.tgz#7e588328ed018d91560633d56865d65b72c3a11b"
+ integrity sha512-vNqpui0khtPi3crrrFtfuT+nw0SdD/nMyb+aurbJzc3RXuVJGCdgYwosvTLPcJkdMOVfTijizV5+ys75s8INBw==
"@gitlab/vue-toasted@^1.2.1":
version "1.2.1"
@@ -1191,6 +1191,11 @@
consola "^2.3.0"
node-fetch "^2.3.0"
+"@sindresorhus/is@^0.7.0":
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"
+ integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==
+
"@types/anymatch@*":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.0.tgz#d1d55958d1fccc5527d4aba29fc9c4b942f563ff"
@@ -2512,6 +2517,19 @@ cache-loader@^2.0.1:
normalize-path "^3.0.0"
schema-utils "^1.0.0"
+cacheable-request@^2.1.1:
+ version "2.1.4"
+ resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d"
+ integrity sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=
+ dependencies:
+ clone-response "1.0.2"
+ get-stream "3.0.0"
+ http-cache-semantics "3.8.1"
+ keyv "3.0.0"
+ lowercase-keys "1.0.0"
+ normalize-url "2.0.1"
+ responselike "1.0.2"
+
cached-path-relative@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.2.tgz#a13df4196d26776220cc3356eb147a52dba2c6db"
@@ -2877,6 +2895,13 @@ clone-regexp@^2.1.0:
dependencies:
is-regexp "^2.0.0"
+clone-response@1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
+ integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
+ dependencies:
+ mimic-response "^1.0.0"
+
clone-stats@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
@@ -3869,6 +3894,13 @@ decode-uri-component@^0.2.0:
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
+decompress-response@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
+ integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
+ dependencies:
+ mimic-response "^1.0.0"
+
deep-equal@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
@@ -4624,11 +4656,6 @@ eslint-plugin-jest@^22.3.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.3.0.tgz#a10f10dedfc92def774ec9bb5bfbd2fb8e1c96d2"
integrity sha512-P1mYVRNlOEoO5T9yTqOfucjOYf1ktmJ26NjwjH8sxpCFQa6IhBGr5TpKl3hcAAT29hOsRJVuMWmTsHoUVo9FoA==
-eslint-plugin-no-jquery@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-2.1.0.tgz#d03b74224c5cfbc7fc0bdd12ce4eb400d09e0c0b"
- integrity sha512-5sr5tOJRfuRviyAvFTe/mr80TXWxTteD/JHRuJtDN8q/bxAh16eSKoKLAevLC7wZCRN2iwnEfhQPQV4rp/gYtg==
-
eslint-plugin-promise@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.1.1.tgz#1e08cb68b5b2cd8839f8d5864c796f56d82746db"
@@ -5279,7 +5306,7 @@ fresh@0.5.2:
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
-from2@^2.1.0:
+from2@^2.1.0, from2@^2.1.1:
version "2.3.0"
resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af"
integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=
@@ -5415,7 +5442,7 @@ get-stdin@~5.0.1:
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398"
integrity sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=
-get-stream@^3.0.0:
+get-stream@3.0.0, get-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=
@@ -5695,6 +5722,29 @@ got@^6.7.1:
unzip-response "^2.0.1"
url-parse-lax "^1.0.0"
+got@^8.0.3:
+ version "8.3.0"
+ resolved "https://registry.yarnpkg.com/got/-/got-8.3.0.tgz#6ba26e75f8a6cc4c6b3eb1fe7ce4fec7abac8533"
+ integrity sha512-kBNy/S2CGwrYgDSec5KTWGKUvupwkkTVAjIsVFF2shXO13xpZdFP4d4kxa//CLX2tN/rV0aYwK8vY6UKWGn2vQ==
+ dependencies:
+ "@sindresorhus/is" "^0.7.0"
+ cacheable-request "^2.1.1"
+ decompress-response "^3.3.0"
+ duplexer3 "^0.1.4"
+ get-stream "^3.0.0"
+ into-stream "^3.1.0"
+ is-retry-allowed "^1.1.0"
+ isurl "^1.0.0-alpha5"
+ lowercase-keys "^1.0.0"
+ mimic-response "^1.0.0"
+ p-cancelable "^0.4.0"
+ p-timeout "^2.0.1"
+ pify "^3.0.0"
+ safe-buffer "^5.1.1"
+ timed-out "^4.0.1"
+ url-parse-lax "^3.0.0"
+ url-to-options "^1.0.1"
+
graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
version "4.2.0"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b"
@@ -5790,11 +5840,23 @@ has-flag@^3.0.0:
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
+has-symbol-support-x@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.3.0.tgz#588bd6927eaa0e296afae24160659167fc2be4f8"
+ integrity sha512-kLtS+N9qwz+Buc6TUfcW5iGb59hLLr5qfxTACi/0uGpH1u5NMNWsdU57KoYRBywvPykeRmu5qfB5x0chpDSWlg==
+
has-symbols@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44"
integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=
+has-to-string-tag-x@^1.2.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.3.0.tgz#78e3d98c3c0ec9413e970eb8d766249a1e13058f"
+ integrity sha512-Fu9Nwv8/VNJMvKjkldzXHO+yeX+TCelwUQ9dGW2LrAfHfHi6zVqQt+Qjilf0qGHvpl6Fap6o8aDhWhMt5hY/1g==
+ dependencies:
+ has-symbol-support-x "^1.3.0"
+
has-unicode@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
@@ -5997,6 +6059,11 @@ htmlparser2@^3.10.0, htmlparser2@^3.9.0:
inherits "^2.0.1"
readable-stream "^3.0.6"
+http-cache-semantics@3.8.1:
+ version "3.8.1"
+ resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2"
+ integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==
+
http-deceiver@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87"
@@ -6236,6 +6303,14 @@ interpret@^1.0.0, interpret@^1.1.0:
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
integrity sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=
+into-stream@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6"
+ integrity sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=
+ dependencies:
+ from2 "^2.1.1"
+ p-is-promise "^1.1.0"
+
invariant@^2.2.2, invariant@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
@@ -6503,6 +6578,11 @@ is-obj@^1.0.0:
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"
integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8=
+is-object@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470"
+ integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA=
+
is-path-cwd@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
@@ -6573,7 +6653,7 @@ is-resolvable@^1.1.0:
resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==
-is-retry-allowed@^1.0.0:
+is-retry-allowed@^1.0.0, is-retry-allowed@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34"
integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=
@@ -6756,6 +6836,14 @@ istextorbinary@^2.2.1:
editions "^1.3.3"
textextensions "2"
+isurl@^1.0.0-alpha5:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67"
+ integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==
+ dependencies:
+ has-to-string-tag-x "^1.2.0"
+ is-object "^1.0.1"
+
iterall@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.2.2.tgz#92d70deb8028e0c39ff3164fdbf4d8b088130cd7"
@@ -7298,6 +7386,11 @@ jsesc@~0.5.0:
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=
+json-buffer@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
+ integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
+
json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
@@ -7476,6 +7569,13 @@ katex@^0.10.0:
dependencies:
commander "^2.16.0"
+keyv@3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373"
+ integrity sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==
+ dependencies:
+ json-buffer "3.0.0"
+
killable@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b"
@@ -7785,7 +7885,7 @@ lower-case@^1.1.1:
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac"
integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw=
-lowercase-keys@^1.0.0:
+lowercase-keys@1.0.0, lowercase-keys@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306"
integrity sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=
@@ -8185,6 +8285,11 @@ mimic-fn@^2.0.0:
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
+mimic-response@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.0.tgz#df3d3652a73fded6b9b0b24146e6fd052353458e"
+ integrity sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=
+
minify@^4.1.1:
version "4.1.2"
resolved "https://registry.yarnpkg.com/minify/-/minify-4.1.2.tgz#88755f4faa5f7ab6d0c64fdd659aa34ea658f180"
@@ -8628,6 +8733,15 @@ normalize-selector@^0.2.0:
resolved "https://registry.yarnpkg.com/normalize-selector/-/normalize-selector-0.2.0.tgz#d0b145eb691189c63a78d201dc4fdb1293ef0c03"
integrity sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=
+normalize-url@2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6"
+ integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==
+ dependencies:
+ prepend-http "^2.0.0"
+ query-string "^5.0.1"
+ sort-keys "^2.0.0"
+
normalize-url@^1.9.1:
version "1.9.1"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
@@ -8889,6 +9003,11 @@ osenv@0, osenv@^0.1.4:
os-homedir "^1.0.0"
os-tmpdir "^1.0.0"
+p-cancelable@^0.4.0:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0"
+ integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==
+
p-defer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c"
@@ -8906,6 +9025,11 @@ p-finally@^1.0.0:
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
+p-is-promise@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e"
+ integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=
+
p-is-promise@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e"
@@ -8949,6 +9073,13 @@ p-reduce@^1.0.0:
resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa"
integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=
+p-timeout@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-2.0.1.tgz#d8dd1979595d2dc0139e1fe46b8b646cb3cdf038"
+ integrity sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==
+ dependencies:
+ p-finally "^1.0.0"
+
p-try@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3"
@@ -9488,6 +9619,11 @@ prepend-http@^1.0.0, prepend-http@^1.0.1:
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=
+prepend-http@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
+ integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
+
prettier@1.16.3:
version "1.16.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.3.tgz#8c62168453badef702f34b45b6ee899574a6a65d"
@@ -9788,6 +9924,15 @@ query-string@^4.1.0:
object-assign "^4.1.0"
strict-uri-encode "^1.0.0"
+query-string@^5.0.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb"
+ integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==
+ dependencies:
+ decode-uri-component "^0.2.0"
+ object-assign "^4.1.0"
+ strict-uri-encode "^1.0.0"
+
querystring-es3@^0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
@@ -10453,6 +10598,13 @@ resolve@1.x, resolve@^1.1.3, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.4.0, re
dependencies:
path-parse "^1.0.6"
+responselike@1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
+ integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
+ dependencies:
+ lowercase-keys "^1.0.0"
+
restore-cursor@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
@@ -10963,11 +11115,23 @@ sort-keys@^1.0.0:
dependencies:
is-plain-obj "^1.0.0"
-sortablejs@^1.10.0, sortablejs@^1.9.0:
+sort-keys@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128"
+ integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=
+ dependencies:
+ is-plain-obj "^1.0.0"
+
+sortablejs@^1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/sortablejs/-/sortablejs-1.10.0.tgz#0ebc054acff2486569194a2f975b2b145dd5e7d6"
integrity sha512-+e0YakK1BxgEZpf9l9UiFaiQ8ZOBn1p/4qkkXr8QDVmYyCrUDTyDRRGm0AgW4E4cD0wtgxJ6yzIRkSPUwqhuhg==
+sortablejs@^1.9.0:
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/sortablejs/-/sortablejs-1.9.0.tgz#2d1e74ae6bac2cb4ad0622908f340848969eb88d"
+ integrity sha512-Ot6bYJ6PoqPmpsqQYXjn1+RKrY2NWQvQt/o4jfd/UYwVWndyO5EPO8YHbnm5HIykf8ENsm4JUrdAvolPT86yYA==
+
source-list-map@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085"
@@ -11661,7 +11825,7 @@ timeago.js@^3.0.2:
dependencies:
"@types/jquery" "^2.0.40"
-timed-out@^4.0.0:
+timed-out@^4.0.0, timed-out@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"
integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=
@@ -12272,6 +12436,13 @@ url-parse-lax@^1.0.0:
dependencies:
prepend-http "^1.0.1"
+url-parse-lax@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
+ integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=
+ dependencies:
+ prepend-http "^2.0.0"
+
url-parse@^1.4.3:
version "1.4.4"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.4.tgz#cac1556e95faa0303691fec5cf9d5a1bc34648f8"
@@ -12285,6 +12456,11 @@ url-search-params-polyfill@^5.0.0:
resolved "https://registry.yarnpkg.com/url-search-params-polyfill/-/url-search-params-polyfill-5.0.0.tgz#09b98337c89dcf6c6a6a0bfeb096f6ba83b7526b"
integrity sha512-+SCD22QJp4UnqPOI5UTTR0Ljuh8cHbjEf1lIiZrZ8nHTlTixqwVsVQTSfk5vrmDz7N09/Y+ka5jQr0ff35FnQQ==
+url-to-options@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9"
+ integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=
+
url@0.10.3:
version "0.10.3"
resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64"
@@ -12579,6 +12755,13 @@ vue-loader@^15.4.2, vue-loader@^15.7.0:
vue-hot-reload-api "^2.3.0"
vue-style-loader "^4.1.0"
+vue-resource@^1.5.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/vue-resource/-/vue-resource-1.5.1.tgz#0f3d685e3254d21800bebd966edcf56c34b3b6e4"
+ integrity sha512-o6V4wNgeqP+9v9b2bPXrr20CGNQPEXjpbUWdZWq9GJhqVeAGcYoeTtn/D4q059ZiyN0DIrDv/ADrQUmlUQcsmg==
+ dependencies:
+ got "^8.0.3"
+
vue-router@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.2.tgz#dedc67afe6c4e2bc25682c8b1c2a8c0d7c7e56be"