From efd6f06bfa01dc58f5b5dd704fde890539d8000b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 8 Nov 2023 03:07:05 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../ci/runner/admin_runners/admin_runners_app.vue | 2 + .../search_tokens/version_token_config.js | 12 +++ app/assets/javascripts/ci/runner/constants.js | 2 + .../runner/graphql/list/all_runners.query.graphql | 2 + .../graphql/list/all_runners_count.query.graphql | 10 +- .../javascripts/ci/runner/runner_search_utils.js | 10 +- .../protected_tags/protected_tag_create.js | 2 +- .../protected_tags/protected_tag_edit.vue | 2 +- app/controllers/projects/jobs_controller.rb | 25 ++++- app/models/project.rb | 4 +- app/views/dashboard/_projects_head.html.haml | 5 +- app/views/projects/_errors.html.haml | 2 +- .../mirrors/_authentication_method.html.haml | 2 +- app/views/projects/mirrors/_mirror_repos.html.haml | 4 +- .../projects/mirrors/_mirror_repos_form.html.haml | 2 +- .../projects/mirrors/_mirror_repos_list.html.haml | 10 +- .../projects/mirrors/_ssh_host_keys.html.haml | 4 +- .../shared/_create_protected_tag.html.haml | 2 +- .../protected_tags/shared/_dropdown.html.haml | 2 +- .../shared/_create_protected_branch.html.haml | 2 +- app/views/shared/_project_limit.html.haml | 2 +- .../shared/_remote_mirror_update_button.html.haml | 2 +- config/routes/project.rb | 1 + .../16-6-proxy-based-dast-deprecation.yml | 9 ++ doc/administration/logs/log_parsing.md | 16 ++- doc/administration/settings/jira_cloud_app.md | 42 ++++++++ doc/api/dependency_list_export.md | 8 +- doc/api/runners.md | 62 ++++++------ doc/integration/jenkins.md | 2 +- doc/solutions/cloud/aws/gitlab_aws_integration.md | 108 +++++++++++++++++++++ doc/solutions/cloud/aws/index.md | 11 +++ doc/solutions/cloud/index.md | 13 +++ doc/solutions/index.md | 2 +- doc/update/deprecations.md | 14 +++ doc/user/profile/index.md | 3 +- lib/api/ci/runners.rb | 4 + locale/gitlab.pot | 21 ++-- .../project/settings/mirroring_repositories.rb | 58 +++++------ qa/qa/page/project/settings/protected_branches.rb | 4 +- qa/qa/page/project/settings/protected_tags.rb | 18 ++-- spec/controllers/projects/jobs_controller_spec.rb | 58 +++++++++++ spec/features/admin/admin_runners_spec.rb | 30 ++++++ .../api/schemas/job/test_report_summary.json | 34 +++++++ .../runner/admin_runners/admin_runners_app_spec.js | 5 + spec/frontend/ci/runner/mock_data.js | 17 ++++ spec/models/project_spec.rb | 4 +- spec/requests/api/ci/runners_spec.rb | 33 +++++++ spec/requests/api/graphql/ci/runners_spec.rb | 87 +++++++++++------ spec/services/projects/create_service_spec.rb | 2 +- 49 files changed, 626 insertions(+), 150 deletions(-) create mode 100644 app/assets/javascripts/ci/runner/components/search_tokens/version_token_config.js create mode 100644 data/deprecations/16-6-proxy-based-dast-deprecation.yml create mode 100644 doc/solutions/cloud/aws/gitlab_aws_integration.md create mode 100644 doc/solutions/cloud/aws/index.md create mode 100644 doc/solutions/cloud/index.md create mode 100644 spec/fixtures/api/schemas/job/test_report_summary.json diff --git a/app/assets/javascripts/ci/runner/admin_runners/admin_runners_app.vue b/app/assets/javascripts/ci/runner/admin_runners/admin_runners_app.vue index 3340bc1beb9..1431f156c0e 100644 --- a/app/assets/javascripts/ci/runner/admin_runners/admin_runners_app.vue +++ b/app/assets/javascripts/ci/runner/admin_runners/admin_runners_app.vue @@ -29,6 +29,7 @@ import RunnerJobStatusBadge from '../components/runner_job_status_badge.vue'; import { pausedTokenConfig } from '../components/search_tokens/paused_token_config'; import { statusTokenConfig } from '../components/search_tokens/status_token_config'; import { tagTokenConfig } from '../components/search_tokens/tag_token_config'; +import { versionTokenConfig } from '../components/search_tokens/version_token_config'; import { ADMIN_FILTERED_SEARCH_NAMESPACE, INSTANCE_TYPE, @@ -117,6 +118,7 @@ export default { return [ pausedTokenConfig, statusTokenConfig, + versionTokenConfig, { ...tagTokenConfig, recentSuggestionsStorageKey: `${this.$options.filteredSearchNamespace}-recent-tags`, diff --git a/app/assets/javascripts/ci/runner/components/search_tokens/version_token_config.js b/app/assets/javascripts/ci/runner/components/search_tokens/version_token_config.js new file mode 100644 index 00000000000..23f82d06f6d --- /dev/null +++ b/app/assets/javascripts/ci/runner/components/search_tokens/version_token_config.js @@ -0,0 +1,12 @@ +import { OPERATORS_IS } from '~/vue_shared/components/filtered_search_bar/constants'; +import BaseToken from '~/vue_shared/components/filtered_search_bar/tokens/base_token.vue'; +import { PARAM_KEY_VERSION, I18N_VERSION } from '../../constants'; + +export const versionTokenConfig = { + icon: 'doc-versions', + title: I18N_VERSION, + type: PARAM_KEY_VERSION, + token: BaseToken, + operators: OPERATORS_IS, + suggestionsDisabled: true, +}; diff --git a/app/assets/javascripts/ci/runner/constants.js b/app/assets/javascripts/ci/runner/constants.js index 298d2530564..d04d75b6e75 100644 --- a/app/assets/javascripts/ci/runner/constants.js +++ b/app/assets/javascripts/ci/runner/constants.js @@ -99,6 +99,7 @@ export const I18N_DELETED_TOAST = s__('Runners|Runner %{name} was deleted'); export const I18N_LOCKED_RUNNER_DESCRIPTION = s__( 'Runners|Runner is locked and available for currently assigned projects only. Only administrators can change the assigned projects.', ); +export const I18N_VERSION = s__('Runners|Version starts with'); export const I18N_VERSION_LABEL = s__('Runners|Version %{version}'); export const I18N_LAST_CONTACT_LABEL = s__('Runners|Last contact: %{timeAgo}'); @@ -157,6 +158,7 @@ export const PARAM_KEY_STATUS = 'status'; export const PARAM_KEY_PAUSED = 'paused'; export const PARAM_KEY_RUNNER_TYPE = 'runner_type'; export const PARAM_KEY_TAG = 'tag'; +export const PARAM_KEY_VERSION = 'version_prefix'; export const PARAM_KEY_SEARCH = 'search'; export const PARAM_KEY_MEMBERSHIP = 'membership'; diff --git a/app/assets/javascripts/ci/runner/graphql/list/all_runners.query.graphql b/app/assets/javascripts/ci/runner/graphql/list/all_runners.query.graphql index 15401c25c64..628ebfd2029 100644 --- a/app/assets/javascripts/ci/runner/graphql/list/all_runners.query.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/all_runners.query.graphql @@ -10,6 +10,7 @@ query getAllRunners( $type: CiRunnerType $tagList: [String!] $search: String + $versionPrefix: String $sort: CiRunnerSort ) { runners( @@ -22,6 +23,7 @@ query getAllRunners( type: $type tagList: $tagList search: $search + versionPrefix: $versionPrefix sort: $sort ) { ...AllRunnersConnection diff --git a/app/assets/javascripts/ci/runner/graphql/list/all_runners_count.query.graphql b/app/assets/javascripts/ci/runner/graphql/list/all_runners_count.query.graphql index 82591b88d3e..18f587495b0 100644 --- a/app/assets/javascripts/ci/runner/graphql/list/all_runners_count.query.graphql +++ b/app/assets/javascripts/ci/runner/graphql/list/all_runners_count.query.graphql @@ -4,8 +4,16 @@ query getAllRunnersCount( $type: CiRunnerType $tagList: [String!] $search: String + $versionPrefix: String ) { - runners(paused: $paused, status: $status, type: $type, tagList: $tagList, search: $search) { + runners( + paused: $paused + status: $status + type: $type + tagList: $tagList + search: $search + versionPrefix: $versionPrefix + ) { count } } diff --git a/app/assets/javascripts/ci/runner/runner_search_utils.js b/app/assets/javascripts/ci/runner/runner_search_utils.js index 8915198350f..e3aee15f42c 100644 --- a/app/assets/javascripts/ci/runner/runner_search_utils.js +++ b/app/assets/javascripts/ci/runner/runner_search_utils.js @@ -12,6 +12,7 @@ import { PARAM_KEY_STATUS, PARAM_KEY_RUNNER_TYPE, PARAM_KEY_TAG, + PARAM_KEY_VERSION, PARAM_KEY_SEARCH, PARAM_KEY_MEMBERSHIP, PARAM_KEY_SORT, @@ -151,7 +152,12 @@ export const fromUrlQueryToSearch = (query = window.location.search) => { membership: membership || DEFAULT_MEMBERSHIP, filters: prepareTokens( urlQueryToFilter(query, { - filterNamesAllowList: [PARAM_KEY_PAUSED, PARAM_KEY_STATUS, PARAM_KEY_TAG], + filterNamesAllowList: [ + PARAM_KEY_PAUSED, + PARAM_KEY_STATUS, + PARAM_KEY_TAG, + PARAM_KEY_VERSION, + ], filteredSearchTermKey: PARAM_KEY_SEARCH, }), ), @@ -178,6 +184,7 @@ export const fromSearchToUrl = ( [PARAM_KEY_MEMBERSHIP]: [], [PARAM_KEY_TAG]: [], [PARAM_KEY_PAUSED]: [], + [PARAM_KEY_VERSION]: [], // Current filters ...filterToQueryObject(processFilters(filters), { filteredSearchTermKey: PARAM_KEY_SEARCH, @@ -229,6 +236,7 @@ export const fromSearchToVariables = ({ [filterVariables.status] = queryObj[PARAM_KEY_STATUS] || []; filterVariables.search = queryObj[PARAM_KEY_SEARCH]; filterVariables.tagList = queryObj[PARAM_KEY_TAG]; + [filterVariables.versionPrefix] = queryObj[PARAM_KEY_VERSION] || []; if (queryObj[PARAM_KEY_PAUSED]) { filterVariables.paused = parseBoolean(queryObj[PARAM_KEY_PAUSED]); diff --git a/app/assets/javascripts/protected_tags/protected_tag_create.js b/app/assets/javascripts/protected_tags/protected_tag_create.js index b5661af352c..b3754cecce4 100644 --- a/app/assets/javascripts/protected_tags/protected_tag_create.js +++ b/app/assets/javascripts/protected_tags/protected_tag_create.js @@ -41,7 +41,7 @@ export default class ProtectedTagCreate { accessLevel: ACCESS_LEVELS.CREATE, accessLevelsData: gon.create_access_levels, searchEnabled: dropdownEl.dataset.filter !== undefined, - testId: 'allowed_to_create_dropdown', + testId: 'allowed-to-create-dropdown', }); this.protectedTagAccessDropdown.$on('select', (selected) => { diff --git a/app/assets/javascripts/protected_tags/protected_tag_edit.vue b/app/assets/javascripts/protected_tags/protected_tag_edit.vue index 82b2ecc5f5c..7fe1dc9c01a 100644 --- a/app/assets/javascripts/protected_tags/protected_tag_edit.vue +++ b/app/assets/javascripts/protected_tags/protected_tag_edit.vue @@ -101,7 +101,7 @@ export default {