From 74cddf1b7c2e4b19ff5741ac9cf67dd7d113cea3 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 30 Aug 2021 18:10:36 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../issue_board_filtered_search.vue | 47 +- .../javascripts/groups/components/app.vue | 2 +- .../javascripts/groups/components/groups.vue | 8 +- .../filtered_search_bar/constants.js | 19 +- .../tokens/milestone_token.vue | 12 +- .../runner_aws_deployments_modal.vue | 8 +- doc/administration/auth/ldap/index.md | 12 +- doc/api/container_registry.md | 2 + doc/api/metrics_dashboard_annotations.md | 2 +- doc/api/metrics_user_starred_dashboards.md | 2 +- doc/api/runners.md | 2 - doc/api/services.md | 2 +- doc/api/usage_data.md | 2 +- doc/ci/secrets/index.md | 2 +- doc/ci/yaml/index.md | 4 +- .../database/multiple_databases.md | 90 +++- .../documentation/feature_flags.md | 16 +- doc/development/service_ping/implement.md | 4 +- doc/development/sidekiq_style_guide.md | 2 +- doc/operations/metrics/alerts.md | 2 +- doc/topics/autodevops/prepare_deployment.md | 2 +- .../admin_area/analytics/dev_ops_report.md | 2 +- doc/user/admin_area/analytics/index.md | 2 +- doc/user/admin_area/moderate_users.md | 2 +- .../settings/instance_template_repository.md | 2 +- .../settings/sign_in_restrictions.md | 2 +- .../admin_area/settings/usage_statistics.md | 5 +- doc/user/analytics/issue_analytics.md | 7 +- doc/user/analytics/merge_request_analytics.md | 9 +- .../application_security/api_fuzzing/index.md | 2 +- .../application_security/dast_api/index.md | 2 +- doc/user/clusters/applications.md | 12 +- doc/user/group/issues_analytics/index.md | 2 +- .../group/repositories_analytics/index.md | 6 +- doc/user/group/settings/import_export.md | 2 +- .../elasticstack.md | 4 +- .../prometheus.md | 4 +- .../management_project_applications/sentry.md | 4 +- .../img/terraform_list_view_v13_8.png | Bin .../img/terraform_plan_log_v13_0.png | Bin .../img/terraform_plan_widget_v13_2.png | Bin doc/user/infrastructure/iac/index.md | 4 +- doc/user/infrastructure/iac/mr_integration.md | 210 +++++++++ .../infrastructure/iac/terraform_state.md | 431 +++++++++++++++++ doc/user/infrastructure/index.md | 4 +- doc/user/infrastructure/mr_integration.md | 211 +-------- doc/user/infrastructure/terraform_state.md | 432 +----------------- doc/user/packages/container_registry/index.md | 2 + .../terraform_module_registry/index.md | 2 +- doc/user/project/merge_requests/index.md | 2 +- .../merge_requests/reviews/suggestions.md | 2 +- doc/user/project/wiki/index.md | 10 +- .../import_export/project/import_export.yml | 2 +- package.json | 2 +- qa/qa/support/matchers/eventually_matcher.rb | 7 +- scripts/rspec_helpers.sh | 2 +- spec/frontend/boards/mock_data.js | 47 +- spec/frontend/groups/components/app_spec.js | 7 +- .../frontend/groups/components/groups_spec.js | 13 +- .../tokens/milestone_token_spec.js | 22 +- .../runner_aws_deployments_modal_spec.js | 1 + yarn.lock | 72 +-- 62 files changed, 971 insertions(+), 825 deletions(-) rename doc/user/infrastructure/{ => iac}/img/terraform_list_view_v13_8.png (100%) rename doc/user/infrastructure/{ => iac}/img/terraform_plan_log_v13_0.png (100%) rename doc/user/infrastructure/{ => iac}/img/terraform_plan_widget_v13_2.png (100%) create mode 100644 doc/user/infrastructure/iac/mr_integration.md create mode 100644 doc/user/infrastructure/iac/terraform_state.md diff --git a/app/assets/javascripts/boards/components/issue_board_filtered_search.vue b/app/assets/javascripts/boards/components/issue_board_filtered_search.vue index 5206db05410..b6c5ef955c6 100644 --- a/app/assets/javascripts/boards/components/issue_board_filtered_search.vue +++ b/app/assets/javascripts/boards/components/issue_board_filtered_search.vue @@ -6,6 +6,7 @@ import issueBoardFilters from '~/boards/issue_board_filters'; import { TYPE_USER } from '~/graphql_shared/constants'; import { convertToGraphQLId } from '~/graphql_shared/utils'; import { __ } from '~/locale'; +import { DEFAULT_MILESTONES_GRAPHQL } from '~/vue_shared/components/filtered_search_bar/constants'; import AuthorToken from '~/vue_shared/components/filtered_search_bar/tokens/author_token.vue'; import LabelToken from '~/vue_shared/components/filtered_search_bar/tokens/label_token.vue'; import MilestoneToken from '~/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue'; @@ -63,17 +64,17 @@ export default { return [ { - icon: 'labels', - title: label, - type: 'label_name', + icon: 'user', + title: assignee, + type: 'assignee_username', operators: [ { value: '=', description: is }, { value: '!=', description: isNot }, ], - token: LabelToken, - unique: false, - symbol: '~', - fetchLabels, + token: AuthorToken, + unique: true, + fetchAuthors, + preloadedAuthors: this.preloadedAuthors(), }, { icon: 'pencil', @@ -90,17 +91,27 @@ export default { preloadedAuthors: this.preloadedAuthors(), }, { - icon: 'user', - title: assignee, - type: 'assignee_username', + icon: 'labels', + title: label, + type: 'label_name', operators: [ { value: '=', description: is }, { value: '!=', description: isNot }, ], - token: AuthorToken, + token: LabelToken, + unique: false, + symbol: '~', + fetchLabels, + }, + { + type: 'milestone_title', + title: milestone, + icon: 'clock', + symbol: '%', + token: MilestoneToken, unique: true, - fetchAuthors, - preloadedAuthors: this.preloadedAuthors(), + defaultMilestones: DEFAULT_MILESTONES_GRAPHQL, + fetchMilestones: this.fetchMilestones, }, { icon: 'issues', @@ -114,16 +125,6 @@ export default { { icon: 'issue-type-incident', value: types.INCIDENT, title: incident }, ], }, - { - type: 'milestone_title', - title: milestone, - icon: 'clock', - symbol: '%', - token: MilestoneToken, - unique: true, - defaultMilestones: [], // todo: https://gitlab.com/gitlab-org/gitlab/-/issues/337044#note_640010094 - fetchMilestones: this.fetchMilestones, - }, { type: 'weight', title: weight, diff --git a/app/assets/javascripts/groups/components/app.vue b/app/assets/javascripts/groups/components/app.vue index 2a95b242510..a1ec5942d64 100644 --- a/app/assets/javascripts/groups/components/app.vue +++ b/app/assets/javascripts/groups/components/app.vue @@ -136,7 +136,7 @@ export default { this.updateGroups(res, Boolean(filterGroupsBy)); }); }, - fetchPage(page, filterGroupsBy, sortBy, archived) { + fetchPage({ page, filterGroupsBy, sortBy, archived }) { this.isLoading = true; return this.fetchGroups({ diff --git a/app/assets/javascripts/groups/components/groups.vue b/app/assets/javascripts/groups/components/groups.vue index 59a37b2a1d5..18a6d487703 100644 --- a/app/assets/javascripts/groups/components/groups.vue +++ b/app/assets/javascripts/groups/components/groups.vue @@ -32,10 +32,10 @@ export default { }, methods: { change(page) { - const filterGroupsParam = getParameterByName('filter'); - const sortParam = getParameterByName('sort'); - const archivedParam = getParameterByName('archived'); - eventHub.$emit(`${this.action}fetchPage`, page, filterGroupsParam, sortParam, archivedParam); + const filterGroupsBy = getParameterByName('filter'); + const sortBy = getParameterByName('sort'); + const archived = getParameterByName('archived'); + eventHub.$emit(`${this.action}fetchPage`, { page, filterGroupsBy, sortBy, archived }); }, }, }; diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js b/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js index 2e9634819a0..898147681d5 100644 --- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js +++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js @@ -20,8 +20,12 @@ export const OPERATOR_IS_ONLY = [{ value: OPERATOR_IS, description: OPERATOR_IS_ export const OPERATOR_IS_NOT_ONLY = [{ value: OPERATOR_IS_NOT, description: OPERATOR_IS_NOT_TEXT }]; export const OPERATOR_IS_AND_IS_NOT = [...OPERATOR_IS_ONLY, ...OPERATOR_IS_NOT_ONLY]; -export const DEFAULT_LABEL_NONE = { value: FILTER_NONE, text: __(FILTER_NONE) }; -export const DEFAULT_LABEL_ANY = { value: FILTER_ANY, text: __(FILTER_ANY) }; +export const DEFAULT_LABEL_NONE = { + value: FILTER_NONE, + text: __(FILTER_NONE), + title: __(FILTER_NONE), +}; +export const DEFAULT_LABEL_ANY = { value: FILTER_ANY, text: __(FILTER_ANY), title: __(FILTER_ANY) }; export const DEFAULT_NONE_ANY = [DEFAULT_LABEL_NONE, DEFAULT_LABEL_ANY]; export const DEFAULT_ITERATIONS = DEFAULT_NONE_ANY.concat([ @@ -29,10 +33,17 @@ export const DEFAULT_ITERATIONS = DEFAULT_NONE_ANY.concat([ ]); export const DEFAULT_MILESTONES = DEFAULT_NONE_ANY.concat([ - { value: FILTER_UPCOMING, text: __(FILTER_UPCOMING) }, - { value: FILTER_STARTED, text: __(FILTER_STARTED) }, + { value: FILTER_UPCOMING, text: __(FILTER_UPCOMING), title: __(FILTER_UPCOMING) }, + { value: FILTER_STARTED, text: __(FILTER_STARTED), title: __(FILTER_STARTED) }, ]); +export const DEFAULT_MILESTONES_GRAPHQL = [ + { value: 'any', text: __(FILTER_ANY), title: __(FILTER_ANY) }, + { value: 'none', text: __(FILTER_NONE), title: __(FILTER_NONE) }, + { value: '#upcoming', text: __(FILTER_UPCOMING), title: __(FILTER_UPCOMING) }, + { value: '#started', text: __(FILTER_STARTED), title: __(FILTER_STARTED) }, +]; + export const SortDirection = { descending: 'descending', ascending: 'ascending', diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue index 4b9ad6d8f91..523438f459c 100644 --- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue +++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue @@ -39,8 +39,16 @@ export default { }, methods: { getActiveMilestone(milestones, data) { - return milestones.find( - (milestone) => milestone.title.toLowerCase() === stripQuotes(data).toLowerCase(), + /* We need to check default milestones against the value not the + * title because there is a discrepancy between the value graphql + * accepts and the title. + * https://gitlab.com/gitlab-org/gitlab/-/issues/337687#note_648058797 + */ + + return ( + milestones.find( + (milestone) => milestone.title.toLowerCase() === stripQuotes(data).toLowerCase(), + ) || this.defaultMilestones.find(({ value }) => value === data) ); }, fetchMilestones(searchTerm) { diff --git a/app/assets/javascripts/vue_shared/components/runner_aws_deployments/runner_aws_deployments_modal.vue b/app/assets/javascripts/vue_shared/components/runner_aws_deployments/runner_aws_deployments_modal.vue index f21dea468cb..57cc25caa25 100644 --- a/app/assets/javascripts/vue_shared/components/runner_aws_deployments/runner_aws_deployments_modal.vue +++ b/app/assets/javascripts/vue_shared/components/runner_aws_deployments/runner_aws_deployments_modal.vue @@ -1,5 +1,6 @@