From 856e2c64ee69b055b31a8ebbeee616f13a46505e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 4 May 2022 15:09:12 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- app/assets/javascripts/editor/schema/ci.json | 4 +- .../components/shared_runners_form.vue | 148 +++++++-------- .../javascripts/group_settings/constants.js | 3 - .../group_settings/mount_shared_runners.js | 20 +- .../pages/projects/wikis/edit/index.js | 3 - .../javascripts/pages/projects/wikis/index.js | 3 + .../pages/projects/wikis/show/index.js | 2 - .../file_nav/pipeline_editor_file_nav.vue | 4 + .../components/pipeline_editor_tabs.vue | 2 +- .../components/popovers/file_tree_popover.vue | 53 ++++++ .../{ => popovers}/walkthrough_popover.vue | 0 .../javascripts/pipeline_editor/constants.js | 3 + .../pipeline_editor/pipeline_editor_app.vue | 2 +- .../pipeline_editor/pipeline_editor_home.vue | 6 +- app/controllers/groups_controller.rb | 2 + app/controllers/projects_controller.rb | 2 + app/helpers/ci/runners_helper.rb | 10 +- app/models/packages/cleanup.rb | 8 + app/models/packages/cleanup/policy.rb | 32 ++++ app/models/project.rb | 5 + app/views/projects/pages/_destroy.haml | 2 +- app/views/projects/pages/_list.html.haml | 2 +- .../pages_domains/_certificate.html.haml | 3 +- ...51580551_groups_controller_show_render.yml | 21 +++ ...581659_projects_controller_show_render.yml | 21 +++ ...cation-vulnerability-report-state-sort.yml | 19 ++ db/docs/packages_cleanup_policies.yml | 9 + ...120604_create_packages_cleanup_policies.rb | 22 +++ db/schema_migrations/20220425120604 | 1 + db/structure.sql | 15 ++ .../geo/disaster_recovery/index.md | 8 +- .../runbooks/planned_failover_multi_node.md | 2 +- .../runbooks/planned_failover_single_node.md | 2 +- .../operations/fast_ssh_key_lookup.md | 75 ++++---- doc/administration/raketasks/storage.md | 96 ++++++++++ doc/ci/environments/index.md | 2 +- doc/ci/yaml/index.md | 3 +- doc/development/feature_flags/index.md | 18 +- .../specification_guide/index.md | 8 +- doc/subscriptions/gitlab_dedicated/index.md | 10 +- doc/subscriptions/index.md | 1 + doc/update/deprecations.md | 9 + doc/update/index.md | 28 ++- lib/gitlab/ci/config/entry/environment.rb | 2 +- lib/gitlab/database/gitlab_schemas.yml | 1 + locale/gitlab.pot | 12 +- qa/qa/page/project/pipeline_editor/show.rb | 19 ++ spec/controllers/groups_controller_spec.rb | 22 +++ spec/controllers/projects_controller_spec.rb | 29 +++ spec/factories/packages/cleanup/policies.rb | 16 ++ spec/features/groups/settings/ci_cd_spec.rb | 12 +- spec/features/projects/ci/editor_spec.rb | 30 ++- .../components/shared_runners_form_spec.js | 171 ++++++++++-------- .../file-nav/pipeline_editor_file_nav_spec.js | 26 ++- .../components/pipeline_editor_tabs_spec.js | 2 +- .../popovers/file_tree_popover_spec.js | 44 +++++ .../walkthrough_popover_spec.js | 2 +- .../pipeline_editor_home_spec.js | 88 ++++++--- spec/helpers/ci/runners_helper_spec.rb | 14 +- .../ci/config/entry/environment_spec.rb | 37 +--- .../ci/pipeline/seed/deployment_spec.rb | 46 ++--- spec/lib/gitlab/import_export/all_models.yml | 1 + spec/models/concerns/schedulable_spec.rb | 10 + spec/models/packages/cleanup/policy_spec.rb | 28 +++ spec/models/project_spec.rb | 1 + .../user_creates_wiki_page_shared_examples.rb | 17 ++ 66 files changed, 977 insertions(+), 342 deletions(-) delete mode 100644 app/assets/javascripts/pages/projects/wikis/edit/index.js create mode 100644 app/assets/javascripts/pipeline_editor/components/popovers/file_tree_popover.vue rename app/assets/javascripts/pipeline_editor/components/{ => popovers}/walkthrough_popover.vue (100%) create mode 100644 app/models/packages/cleanup.rb create mode 100644 app/models/packages/cleanup/policy.rb create mode 100644 config/events/1651580551_groups_controller_show_render.yml create mode 100644 config/events/1651581659_projects_controller_show_render.yml create mode 100644 data/deprecations/15-2-deprecation-vulnerability-report-state-sort.yml create mode 100644 db/docs/packages_cleanup_policies.yml create mode 100644 db/migrate/20220425120604_create_packages_cleanup_policies.rb create mode 100644 db/schema_migrations/20220425120604 create mode 100644 spec/factories/packages/cleanup/policies.rb create mode 100644 spec/frontend/pipeline_editor/components/popovers/file_tree_popover_spec.js rename spec/frontend/pipeline_editor/components/{ => popovers}/walkthrough_popover_spec.js (88%) create mode 100644 spec/models/packages/cleanup/policy_spec.rb diff --git a/app/assets/javascripts/editor/schema/ci.json b/app/assets/javascripts/editor/schema/ci.json index 620edf3adc7..eaf31a2b396 100644 --- a/app/assets/javascripts/editor/schema/ci.json +++ b/app/assets/javascripts/editor/schema/ci.json @@ -1093,8 +1093,8 @@ "description": "The name of a job to execute when the environment is about to be stopped." }, "action": { - "enum": ["start", "prepare", "stop", "verify"], - "description": "Specifies what this job will do. 'start' (default) indicates the job will start the deployment. 'prepare'/'verify' indicates this will not affect the deployment. 'stop' indicates this will stop the deployment.", + "enum": ["start", "prepare", "stop", "verify", "access"], + "description": "Specifies what this job will do. 'start' (default) indicates the job will start the deployment. 'prepare'/'verify'/'access' indicates this will not affect the deployment. 'stop' indicates this will stop the deployment.", "default": "start" }, "auto_stop_in": { diff --git a/app/assets/javascripts/group_settings/components/shared_runners_form.vue b/app/assets/javascripts/group_settings/components/shared_runners_form.vue index dcac337c6ef..3365f4aa76c 100644 --- a/app/assets/javascripts/group_settings/components/shared_runners_form.vue +++ b/app/assets/javascripts/group_settings/components/shared_runners_form.vue @@ -1,73 +1,64 @@ diff --git a/app/assets/javascripts/group_settings/constants.js b/app/assets/javascripts/group_settings/constants.js index 4067b6b52a3..ab5c0db45ba 100644 --- a/app/assets/javascripts/group_settings/constants.js +++ b/app/assets/javascripts/group_settings/constants.js @@ -1,6 +1,3 @@ import { __ } from '~/locale'; -// Debounce delay in milliseconds -export const DEBOUNCE_TOGGLE_DELAY = 1000; - export const ERROR_MESSAGE = __('Refresh the page and try again.'); diff --git a/app/assets/javascripts/group_settings/mount_shared_runners.js b/app/assets/javascripts/group_settings/mount_shared_runners.js index 21a2373e2b1..aeb6d57a11a 100644 --- a/app/assets/javascripts/group_settings/mount_shared_runners.js +++ b/app/assets/javascripts/group_settings/mount_shared_runners.js @@ -6,22 +6,22 @@ export default (containerId = 'update-shared-runners-form') => { const { updatePath, - sharedRunnersAvailability, - parentSharedRunnersAvailability, - runnerEnabled, - runnerDisabled, - runnerAllowOverride, + sharedRunnersSetting, + parentSharedRunnersSetting, + runnerEnabledValue, + runnerDisabledValue, + runnerAllowOverrideValue, } = containerEl.dataset; return new Vue({ el: containerEl, provide: { updatePath, - sharedRunnersAvailability, - parentSharedRunnersAvailability, - runnerEnabled, - runnerDisabled, - runnerAllowOverride, + sharedRunnersSetting, + parentSharedRunnersSetting, + runnerEnabledValue, + runnerDisabledValue, + runnerAllowOverrideValue, }, render(createElement) { return createElement(UpdateSharedRunnersForm); diff --git a/app/assets/javascripts/pages/projects/wikis/edit/index.js b/app/assets/javascripts/pages/projects/wikis/edit/index.js deleted file mode 100644 index b2288c2655c..00000000000 --- a/app/assets/javascripts/pages/projects/wikis/edit/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import { mountApplications } from '~/pages/shared/wikis/edit'; - -mountApplications(); diff --git a/app/assets/javascripts/pages/projects/wikis/index.js b/app/assets/javascripts/pages/projects/wikis/index.js index 83fcd348ddf..692baee383b 100644 --- a/app/assets/javascripts/pages/projects/wikis/index.js +++ b/app/assets/javascripts/pages/projects/wikis/index.js @@ -1,3 +1,6 @@ import Wikis from '~/pages/shared/wikis/wikis'; +import { mountApplications } from '~/pages/shared/wikis/async_edit'; + +mountApplications(); export default new Wikis(); diff --git a/app/assets/javascripts/pages/projects/wikis/show/index.js b/app/assets/javascripts/pages/projects/wikis/show/index.js index 7ca5f6964cd..288f6b616cc 100644 --- a/app/assets/javascripts/pages/projects/wikis/show/index.js +++ b/app/assets/javascripts/pages/projects/wikis/show/index.js @@ -1,5 +1,3 @@ import { mountApplications } from '~/pages/shared/wikis/show'; -import { mountApplications as mountEditApplications } from '~/pages/shared/wikis/async_edit'; mountApplications(); -mountEditApplications(); diff --git a/app/assets/javascripts/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue b/app/assets/javascripts/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue index 4ac28b3b9c0..998db653e0c 100644 --- a/app/assets/javascripts/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue +++ b/app/assets/javascripts/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue @@ -3,11 +3,13 @@ import { GlButton } from '@gitlab/ui'; import getAppStatus from '~/pipeline_editor/graphql/queries/client/app_status.query.graphql'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { EDITOR_APP_STATUS_EMPTY } from '../../constants'; +import FileTreePopover from '../popovers/file_tree_popover.vue'; import BranchSwitcher from './branch_switcher.vue'; export default { components: { BranchSwitcher, + FileTreePopover, GlButton, }, mixins: [glFeatureFlagMixin()], @@ -56,11 +58,13 @@ export default {
+ +import { GlPopover, GlOutsideDirective as Outside } from '@gitlab/ui'; +import { s__, __ } from '~/locale'; +import { FILE_TREE_POPOVER_DISMISSED_KEY } from '../../constants'; + +export default { + name: 'PipelineEditorFileTreePopover', + directives: { Outside }, + i18n: { + description: s__( + 'pipelineEditorWalkthrough|You can use the file tree to view your pipeline configuration files.', + ), + learnMore: __('Learn more'), + }, + components: { + GlPopover, + }, + data() { + return { + showPopover: false, + }; + }, + mounted() { + this.showPopover = localStorage.getItem(FILE_TREE_POPOVER_DISMISSED_KEY) !== 'true'; + }, + methods: { + closePopover() { + this.showPopover = false; + }, + dismissPermanently() { + this.closePopover(); + localStorage.setItem(FILE_TREE_POPOVER_DISMISSED_KEY, 'true'); + }, + }, +}; + + + diff --git a/app/assets/javascripts/pipeline_editor/components/walkthrough_popover.vue b/app/assets/javascripts/pipeline_editor/components/popovers/walkthrough_popover.vue similarity index 100% rename from app/assets/javascripts/pipeline_editor/components/walkthrough_popover.vue rename to app/assets/javascripts/pipeline_editor/components/popovers/walkthrough_popover.vue diff --git a/app/assets/javascripts/pipeline_editor/constants.js b/app/assets/javascripts/pipeline_editor/constants.js index 9b4732b26d2..0484da8641d 100644 --- a/app/assets/javascripts/pipeline_editor/constants.js +++ b/app/assets/javascripts/pipeline_editor/constants.js @@ -49,6 +49,9 @@ export const BRANCH_PAGINATION_LIMIT = 20; export const BRANCH_SEARCH_DEBOUNCE = '500'; export const SOURCE_EDITOR_DEBOUNCE = 500; +export const FILE_TREE_DISPLAY_KEY = 'pipeline_editor_file_tree_display'; +export const FILE_TREE_POPOVER_DISMISSED_KEY = 'pipeline_editor_file_tree_popover_dismissed'; + export const STARTER_TEMPLATE_NAME = 'Getting-Started'; export const pipelineEditorTrackingOptions = { diff --git a/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue b/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue index 3c6d5b1d3ad..3fd31edec2c 100644 --- a/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue +++ b/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue @@ -382,7 +382,7 @@ export default {