From 012f9a4b9ec4a78d9593d882b38f95e376c2cfe2 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 8 Mar 2023 12:11:30 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .gitlab/CODEOWNERS | 71 ++++---- .../add_context_commits_modal_wrapper.vue | 2 +- .../add_context_commits_modal/store/actions.js | 2 +- app/assets/javascripts/blob_edit/blob_bundle.js | 2 +- app/assets/javascripts/blob_edit/edit_blob.js | 2 +- .../admin_register_runner_app.vue | 28 +++- .../components/registration/platforms_drawer.vue | 131 +++++++++++++++ .../registration/registration_instructions.vue | 10 +- .../registration_token_reset_dropdown_item.vue | 2 +- .../registration/scripts/linux/install.sh | 12 ++ .../components/registration/scripts/osx/install.sh | 11 ++ .../registration/scripts/windows/install.ps1 | 13 ++ .../ci/runner/components/registration/utils.js | 39 ++++- .../ci/runner/components/runner_bulk_delete.vue | 2 +- .../ci/runner/components/runner_delete_button.vue | 2 +- .../ci/runner/components/runner_jobs.vue | 2 +- .../ci/runner/components/runner_pause_button.vue | 2 +- .../ci/runner/components/runner_projects.vue | 2 +- .../ci/runner/components/runner_update_form.vue | 2 +- .../runner/components/search_tokens/tag_token.vue | 2 +- app/assets/javascripts/ci/runner/constants.js | 49 ++++++ .../show_alert_from_local_storage.js | 2 +- .../content_editor/components/content_editor.vue | 2 +- .../content_editor/extensions/paste_markdown.js | 2 +- .../javascripts/content_editor/extensions/table.js | 2 +- .../content_editor/services/upload_helpers.js | 2 +- .../javascripts/graphql_shared/possible_types.json | 3 +- .../utils/trigger_successful_invite_alert.js | 2 +- app/assets/javascripts/merge_request.js | 2 +- app/assets/javascripts/merge_request_tabs.js | 2 +- .../components/approvals/approvals.vue | 19 +-- .../metrics/dashboard/annotations/create.rb | 2 +- .../metrics/dashboard/annotations/delete.rb | 2 +- app/graphql/resolvers/work_items_resolver.rb | 3 +- app/graphql/types/work_items/widget_interface.rb | 5 +- .../types/work_items/widgets/notifications_type.rb | 26 +++ app/models/concerns/subscribable.rb | 13 +- app/models/work_items/widget_definition.rb | 3 +- app/models/work_items/widgets/notifications.rb | 9 ++ app/policies/group_policy.rb | 4 +- app/policies/project_policy.rb | 13 +- .../dashboard/annotations/create_service.rb | 4 +- .../dashboard/annotations/delete_service.rb | 2 +- .../clusters/clusters/_integrations.html.haml | 2 +- config/webpack.config.js | 1 - db/docs/work_item_types.yml | 1 + db/docs/work_item_widget_definitions.yml | 1 + ...228142350_add_notifications_work_item_widget.rb | 57 +++++++ db/schema_migrations/20230228142350 | 1 + doc/administration/terraform_state.md | 20 ++- doc/api/graphql/reference/index.md | 13 ++ jest.config.base.js | 2 +- lib/api/metrics/dashboard/annotations.rb | 2 +- .../database/background_migration/batched_job.rb | 2 - .../background_migration/batched_migration.rb | 2 - .../work_items/base_type_importer.rb | 24 ++- lib/tasks/gitlab/tw/codeowners.rake | 3 - locale/gitlab.pot | 51 ++++-- qa/Gemfile.lock | 18 +-- scripts/trigger-build.rb | 1 + .../components/blob_header_viewer_switcher_spec.js | 53 +++--- .../admin_register_runner_app_spec.js | 64 +++++++- .../registration/__snapshots__/utils_spec.js.snap | 178 ++++++++++++++++++--- .../registration/platforms_drawer_spec.js | 92 +++++++++++ .../registration/registration_instructions_spec.js | 27 +++- .../runner/components/registration/utils_spec.js | 73 +++++++-- .../components/variables/text_field_spec.js | 6 +- .../show/components/issuable_title_spec.js | 26 ++- .../types/work_items/widget_interface_spec.rb | 11 +- .../work_items/widgets/notifications_type_spec.rb | 12 ++ .../projects/menus/infrastructure_menu_spec.rb | 16 ++ ...2350_add_notifications_work_item_widget_spec.rb | 27 ++++ spec/models/concerns/subscribable_spec.rb | 26 +++ spec/models/work_items/widget_definition_spec.rb | 3 +- .../work_items/widgets/notifications_spec.rb | 19 +++ .../metrics/dashboard/annotation_policy_spec.rb | 16 +- spec/policies/project_policy_spec.rb | 31 ++++ .../metrics/dashboard/annotations/create_spec.rb | 2 +- .../metrics/dashboard/annotations/delete_spec.rb | 2 +- .../api/graphql/project/work_items_spec.rb | 28 ++++ spec/requests/api/graphql/work_item_spec.rb | 26 +++ spec/requests/api/terraform/state_spec.rb | 8 + spec/requests/api/terraform/state_version_spec.rb | 8 + .../policies/group_policy_shared_context.rb | 4 +- .../policies/project_policy_shared_context.rb | 11 +- .../shared_contexts/rack_attack_shared_context.rb | 3 +- .../api/terraform_state_enabled_shared_examples.rb | 29 ++++ 87 files changed, 1254 insertions(+), 260 deletions(-) create mode 100644 app/assets/javascripts/ci/runner/components/registration/platforms_drawer.vue create mode 100644 app/assets/javascripts/ci/runner/components/registration/scripts/linux/install.sh create mode 100644 app/assets/javascripts/ci/runner/components/registration/scripts/osx/install.sh create mode 100644 app/assets/javascripts/ci/runner/components/registration/scripts/windows/install.ps1 create mode 100644 app/graphql/types/work_items/widgets/notifications_type.rb create mode 100644 app/models/work_items/widgets/notifications.rb create mode 100644 db/migrate/20230228142350_add_notifications_work_item_widget.rb create mode 100644 db/schema_migrations/20230228142350 create mode 100644 spec/frontend/ci/runner/components/registration/platforms_drawer_spec.js create mode 100644 spec/graphql/types/work_items/widgets/notifications_type_spec.rb create mode 100644 spec/migrations/20230228142350_add_notifications_work_item_widget_spec.rb create mode 100644 spec/models/work_items/widgets/notifications_spec.rb create mode 100644 spec/support/shared_examples/lib/api/terraform_state_enabled_shared_examples.rb diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index b852df49c24..5b8c4f201ca 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -509,23 +509,23 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/custom_attributes.md @msedlakjakubowski /doc/api/dependencies.md @rdickenson /doc/api/dependency_proxy.md @marcel.amirault -/doc/api/deploy_keys.md @rdickenson -/doc/api/deploy_tokens.md @rdickenson -/doc/api/deployments.md @rdickenson +/doc/api/deploy_keys.md @phillipwells +/doc/api/deploy_tokens.md @phillipwells +/doc/api/deployments.md @phillipwells /doc/api/discussions.md @aqualls /doc/api/dora/ @lciutacu /doc/api/draft_notes.md @aqualls -/doc/api/environments.md @rdickenson +/doc/api/environments.md @phillipwells /doc/api/epic_issues.md @msedlakjakubowski /doc/api/epic_links.md @msedlakjakubowski /doc/api/epics.md @msedlakjakubowski /doc/api/error_tracking.md @drcatherinepope /doc/api/events.md @eread /doc/api/experiments.md @phillipwells -/doc/api/feature_flag_user_lists.md @rdickenson -/doc/api/feature_flags.md @rdickenson -/doc/api/features.md @rdickenson -/doc/api/freeze_periods.md @rdickenson +/doc/api/feature_flag_user_lists.md @phillipwells +/doc/api/feature_flags.md @phillipwells +/doc/api/features.md @phillipwells +/doc/api/freeze_periods.md @phillipwells /doc/api/geo_nodes.md @axil /doc/api/graphql/audit_report.md @eread /doc/api/graphql/branch_rules.md @aqualls @@ -547,9 +547,10 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/group_labels.md @msedlakjakubowski /doc/api/group_level_variables.md @marcel.amirault /doc/api/group_milestones.md @msedlakjakubowski -/doc/api/group_protected_environments.md @rdickenson +/doc/api/group_protected_branches.md @aqualls +/doc/api/group_protected_environments.md @phillipwells /doc/api/group_relations_export.md @eread -/doc/api/group_releases.md @rdickenson +/doc/api/group_releases.md @phillipwells /doc/api/group_repository_storage_moves.md @ashrafkhamis /doc/api/group_wikis.md @ashrafkhamis /doc/api/groups.md @lciutacu @@ -611,14 +612,14 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/project_vulnerabilities.md @aqualls /doc/api/projects.md @lciutacu /doc/api/protected_branches.md @aqualls -/doc/api/protected_environments.md @rdickenson +/doc/api/protected_environments.md @phillipwells /doc/api/protected_tags.md @aqualls -/doc/api/releases/ @rdickenson +/doc/api/releases/ @phillipwells /doc/api/remote_mirrors.md @aqualls /doc/api/repositories.md @aqualls /doc/api/repository_files.md @aqualls /doc/api/repository_submodules.md @aqualls -/doc/api/resource_groups.md @rdickenson +/doc/api/resource_groups.md @phillipwells /doc/api/resource_iteration_events.md @msedlakjakubowski /doc/api/resource_label_events.md @eread /doc/api/resource_milestone_events.md @msedlakjakubowski @@ -649,22 +650,22 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/api/users.md @jglassman1 /doc/api/version.md @phillipwells /doc/api/visual_review_discussions.md @drcatherinepope -/doc/api/vulnerabilities.md @dianalogan -/doc/api/vulnerability_exports.md @dianalogan -/doc/api/vulnerability_findings.md @dianalogan +/doc/api/vulnerabilities.md @rdickenson +/doc/api/vulnerability_exports.md @rdickenson +/doc/api/vulnerability_findings.md @rdickenson /doc/api/wikis.md @ashrafkhamis /doc/architecture/blueprints/database/scalability/patterns/ @aqualls /doc/architecture/blueprints/database_scaling/ @aqualls /doc/ci/ @drcatherinepope /doc/ci/caching/ @marcel.amirault /doc/ci/chatops/ @phillipwells -/doc/ci/cloud_deployment/ @rdickenson +/doc/ci/cloud_deployment/ @phillipwells /doc/ci/cloud_services/ @marcel.amirault /doc/ci/directed_acyclic_graph/ @marcel.amirault /doc/ci/docker/using_docker_images.md @fneill -/doc/ci/environments/ @rdickenson +/doc/ci/environments/ @phillipwells /doc/ci/examples/authenticating-with-hashicorp-vault/ @marcel.amirault -/doc/ci/examples/deployment/ @rdickenson +/doc/ci/examples/deployment/ @phillipwells /doc/ci/examples/semantic-release.md @marcel.amirault /doc/ci/interactive_web_terminal/ @fneill /doc/ci/introduction/ @marcel.amirault @@ -679,7 +680,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/ci/pipelines/pipeline_architectures.md @marcel.amirault /doc/ci/pipelines/pipeline_artifacts.md @marcel.amirault /doc/ci/quick_start/ @marcel.amirault -/doc/ci/resource_groups/ @rdickenson +/doc/ci/resource_groups/ @phillipwells /doc/ci/runners/ @fneill /doc/ci/secrets/ @marcel.amirault /doc/ci/secure_files/ @marcel.amirault @@ -692,6 +693,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/ci/variables/ @marcel.amirault /doc/ci/yaml/ @marcel.amirault /doc/ci/yaml/artifacts_reports.md @drcatherinepope +/doc/development/advanced_search.md @ashrafkhamis /doc/development/application_limits.md @axil /doc/development/audit_event_guide/ @eread /doc/development/auto_devops.md @phillipwells @@ -714,8 +716,6 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/development/development_processes.md @sselhorn /doc/development/distributed_tracing.md @msedlakjakubowski /doc/development/documentation/ @sselhorn -/doc/development/elasticsearch.md @ashrafkhamis -/doc/development/search/advanced_search_migration_styleguide.md @ashrafkhamis /doc/development/experiment_guide/ @phillipwells /doc/development/export_csv.md @eread /doc/development/fe_guide/content_editor.md @ashrafkhamis @@ -749,6 +749,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/development/issuable-like-models.md @msedlakjakubowski /doc/development/issue_types.md @msedlakjakubowski /doc/development/kubernetes.md @phillipwells +/doc/development/labels/ @sselhorn /doc/development/lfs.md @aqualls /doc/development/logging.md @msedlakjakubowski /doc/development/maintenance_mode.md @axil @@ -765,8 +766,8 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/development/prometheus_metrics.md @msedlakjakubowski /doc/development/real_time.md @msedlakjakubowski /doc/development/rubocop_development_guide.md @sselhorn +/doc/development/search/ @ashrafkhamis /doc/development/sec/ @rdickenson -/doc/development/sec/security_report_ingestion_overview.md @dianalogan /doc/development/secure_coding_guidelines.md @sselhorn /doc/development/service_ping/ @lciutacu /doc/development/snowplow/ @lciutacu @@ -806,11 +807,10 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/integration/trello_power_up.md @ashrafkhamis /doc/integration/vault.md @phillipwells /doc/operations/error_tracking.md @drcatherinepope -/doc/operations/feature_flags.md @rdickenson +/doc/operations/feature_flags.md @phillipwells /doc/operations/incident_management/ @msedlakjakubowski /doc/operations/index.md @msedlakjakubowski /doc/operations/metrics/ @msedlakjakubowski -/doc/operations/quickstart-guide.md @drcatherinepope /doc/policy/ @axil /doc/raketasks/ @axil /doc/raketasks/generate_sample_prometheus_data.md @msedlakjakubowski @@ -873,21 +873,18 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/admin_area/settings/usage_statistics.md @lciutacu /doc/user/admin_area/settings/visibility_and_access_controls.md @aqualls /doc/user/analytics/ @lciutacu -/doc/user/analytics/ci_cd_analytics.md @rdickenson +/doc/user/analytics/ci_cd_analytics.md @phillipwells /doc/user/application_security/ @rdickenson -/doc/user/application_security/cve_id_request.md @dianalogan -/doc/user/application_security/generate_test_vulnerabilities/ @dianalogan /doc/user/application_security/policies/ @dianalogan -/doc/user/application_security/security_dashboard/ @dianalogan -/doc/user/application_security/vulnerabilities/ @dianalogan -/doc/user/application_security/vulnerability_report/ @dianalogan /doc/user/asciidoc.md @aqualls /doc/user/award_emojis.md @msedlakjakubowski /doc/user/clusters/ @phillipwells -/doc/user/compliance/ @dianalogan /doc/user/compliance/compliance_report/ @eread /doc/user/compliance/index.md @eread +/doc/user/compliance/license_approval_policies.md @dianalogan +/doc/user/compliance/license_check_rules.md @dianalogan /doc/user/compliance/license_compliance/ @rdickenson +/doc/user/compliance/license_list.md @rdickenson /doc/user/compliance/license_scanning_of_cyclonedx_files/ @rdickenson /doc/user/crm/ @msedlakjakubowski /doc/user/discussions/ @aqualls @@ -913,7 +910,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/markdown.md @msedlakjakubowski /doc/user/namespace/ @lciutacu /doc/user/okrs.md @msedlakjakubowski -/doc/user/operations_dashboard/ @rdickenson +/doc/user/operations_dashboard/ @phillipwells /doc/user/packages/ @marcel.amirault /doc/user/permissions.md @jglassman1 /doc/user/product_analytics/ @lciutacu @@ -926,9 +923,9 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/project/clusters/ @phillipwells /doc/user/project/code_intelligence.md @aqualls /doc/user/project/code_owners.md @aqualls -/doc/user/project/deploy_boards.md @rdickenson -/doc/user/project/deploy_keys/ @rdickenson -/doc/user/project/deploy_tokens/ @rdickenson +/doc/user/project/deploy_boards.md @phillipwells +/doc/user/project/deploy_keys/ @phillipwells +/doc/user/project/deploy_tokens/ @phillipwells /doc/user/project/description_templates.md @msedlakjakubowski /doc/user/project/file_lock.md @aqualls /doc/user/project/git_attributes.md @aqualls @@ -955,7 +952,7 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab /doc/user/project/protected_tags.md @aqualls /doc/user/project/push_options.md @aqualls /doc/user/project/quick_actions.md @msedlakjakubowski -/doc/user/project/releases/ @rdickenson +/doc/user/project/releases/ @phillipwells /doc/user/project/remote_development/ @ashrafkhamis /doc/user/project/repository/ @aqualls /doc/user/project/repository/file_finder.md @ashrafkhamis diff --git a/app/assets/javascripts/add_context_commits_modal/components/add_context_commits_modal_wrapper.vue b/app/assets/javascripts/add_context_commits_modal/components/add_context_commits_modal_wrapper.vue index a41ff42df20..c66b595ffdc 100644 --- a/app/assets/javascripts/add_context_commits_modal/components/add_context_commits_modal_wrapper.vue +++ b/app/assets/javascripts/add_context_commits_modal/components/add_context_commits_modal_wrapper.vue @@ -2,7 +2,7 @@ import { GlModal, GlTabs, GlTab, GlSearchBoxByType, GlSprintf, GlBadge } from '@gitlab/ui'; import { mapState, mapActions } from 'vuex'; import ReviewTabContainer from '~/add_context_commits_modal/components/review_tab_container.vue'; -import { createAlert } from '~/flash'; +import { createAlert } from '~/alert'; import { BV_SHOW_MODAL } from '~/lib/utils/constants'; import { s__ } from '~/locale'; import eventHub from '../event_hub'; diff --git a/app/assets/javascripts/add_context_commits_modal/store/actions.js b/app/assets/javascripts/add_context_commits_modal/store/actions.js index d4c9db2fa33..de9c7488ace 100644 --- a/app/assets/javascripts/add_context_commits_modal/store/actions.js +++ b/app/assets/javascripts/add_context_commits_modal/store/actions.js @@ -1,6 +1,6 @@ import _ from 'lodash'; import Api from '~/api'; -import { createAlert } from '~/flash'; +import { createAlert } from '~/alert'; import axios from '~/lib/utils/axios_utils'; import { s__ } from '~/locale'; import * as types from './mutation_types'; diff --git a/app/assets/javascripts/blob_edit/blob_bundle.js b/app/assets/javascripts/blob_edit/blob_bundle.js index 509d399273d..01d35a0980f 100644 --- a/app/assets/javascripts/blob_edit/blob_bundle.js +++ b/app/assets/javascripts/blob_edit/blob_bundle.js @@ -2,7 +2,7 @@ import $ from 'jquery'; import initPopover from '~/blob/suggest_gitlab_ci_yml'; -import { createAlert } from '~/flash'; +import { createAlert } from '~/alert'; import { setCookie } from '~/lib/utils/common_utils'; import Tracking from '~/tracking'; import NewCommitForm from '../new_commit_form'; diff --git a/app/assets/javascripts/blob_edit/edit_blob.js b/app/assets/javascripts/blob_edit/edit_blob.js index db47b11cca1..f021553ae98 100644 --- a/app/assets/javascripts/blob_edit/edit_blob.js +++ b/app/assets/javascripts/blob_edit/edit_blob.js @@ -4,7 +4,7 @@ import { SourceEditorExtension } from '~/editor/extensions/source_editor_extensi import { FileTemplateExtension } from '~/editor/extensions/source_editor_file_template_ext'; import { ToolbarExtension } from '~/editor/extensions/source_editor_toolbar_ext'; import SourceEditor from '~/editor/source_editor'; -import { createAlert } from '~/flash'; +import { createAlert } from '~/alert'; import axios from '~/lib/utils/axios_utils'; import { addEditorMarkdownListeners } from '~/lib/utils/text_markdown'; import { insertFinalNewline } from '~/lib/utils/text_utility'; diff --git a/app/assets/javascripts/ci/runner/admin_register_runner/admin_register_runner_app.vue b/app/assets/javascripts/ci/runner/admin_register_runner/admin_register_runner_app.vue index b291be41203..1ae119da959 100644 --- a/app/assets/javascripts/ci/runner/admin_register_runner/admin_register_runner_app.vue +++ b/app/assets/javascripts/ci/runner/admin_register_runner/admin_register_runner_app.vue @@ -2,12 +2,13 @@ import { GlButton } from '@gitlab/ui'; import { s__, sprintf } from '~/locale'; import { createAlert } from '~/flash'; -import { getParameterByName } from '~/lib/utils/url_utility'; +import { getParameterByName, updateHistory, mergeUrlParams } from '~/lib/utils/url_utility'; import { convertToGraphQLId } from '~/graphql_shared/utils'; import { TYPENAME_CI_RUNNER } from '~/graphql_shared/constants'; import runnerForRegistrationQuery from '../graphql/register/runner_for_registration.query.graphql'; import { I18N_FETCH_ERROR, PARAM_KEY_PLATFORM, DEFAULT_PLATFORM } from '../constants'; import RegistrationInstructions from '../components/registration/registration_instructions.vue'; +import PlatformsDrawer from '../components/registration/platforms_drawer.vue'; import { captureException } from '../sentry_utils'; export default { @@ -15,6 +16,7 @@ export default { components: { GlButton, RegistrationInstructions, + PlatformsDrawer, }, props: { runnerId: { @@ -30,6 +32,7 @@ export default { return { platform: getParameterByName(PARAM_KEY_PLATFORM) || DEFAULT_PLATFORM, runner: null, + isDrawerOpen: false, }; }, apollo: { @@ -62,6 +65,21 @@ export default { return this.runner?.ephemeralAuthenticationToken; }, }, + watch: { + platform(platform) { + updateHistory({ + url: mergeUrlParams({ [PARAM_KEY_PLATFORM]: platform }, window.location.href), + }); + }, + }, + methods: { + onSelectPlatform(platform) { + this.platform = platform; + }, + onToggleDrawer(val = !this.isDrawerOpen) { + this.isDrawerOpen = val; + }, + }, };