diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-21 09:09:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-21 09:09:23 +0300 |
commit | afffba24729a46372c32fe5e9a1b35ce8b42e427 (patch) | |
tree | e7aa58a726c9c0087a629a2249460595c1a90c1f | |
parent | 86cfee4c706697d7fd045cb97ca756dcb7199b40 (diff) |
Add latest changes from gitlab-org/gitlab@master
-rw-r--r-- | app/assets/javascripts/issues/list/components/issues_list_app.vue | 23 | ||||
-rw-r--r-- | app/assets/javascripts/issues/list/constants.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/issues/list/index.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/issuable/list/components/issuable_list_root.vue | 1 | ||||
-rw-r--r-- | app/assets/javascripts/work_items/constants.js | 5 | ||||
-rw-r--r-- | db/migrate/20220824082427_remove_tmp_idx_vulnerability_occurrences_on_id_and_scanner_id.rb | 20 | ||||
-rw-r--r-- | db/schema_migrations/20220824082427 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 | ||||
-rw-r--r-- | doc/user/application_security/index.md | 4 | ||||
-rw-r--r-- | lib/gitlab/ci/runner_instructions.rb | 3 | ||||
-rw-r--r-- | locale/gitlab.pot | 3 | ||||
-rw-r--r-- | qa/Gemfile | 2 | ||||
-rw-r--r-- | qa/Gemfile.lock | 4 | ||||
-rw-r--r-- | qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb | 9 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/runner_instructions_spec.rb | 1 |
15 files changed, 69 insertions, 16 deletions
diff --git a/app/assets/javascripts/issues/list/components/issues_list_app.vue b/app/assets/javascripts/issues/list/components/issues_list_app.vue index 938095a434c..ce1af75d671 100644 --- a/app/assets/javascripts/issues/list/components/issues_list_app.vue +++ b/app/assets/javascripts/issues/list/components/issues_list_app.vue @@ -163,6 +163,16 @@ export default { required: false, default: () => [], }, + eeTypeTokenOptions: { + type: Array, + required: false, + default: () => [], + }, + eeWorkItemTypes: { + type: Array, + required: false, + default: () => [], + }, }, data() { return { @@ -239,14 +249,17 @@ export default { state: this.state, ...this.pageParams, ...this.apiFilterParams, - types: this.apiFilterParams.types || defaultWorkItemTypes, + types: this.apiFilterParams.types || this.defaultWorkItemTypes, }; }, namespace() { return this.isProject ? ITEM_TYPE.PROJECT : ITEM_TYPE.GROUP; }, + defaultWorkItemTypes() { + return [...defaultWorkItemTypes, ...this.eeWorkItemTypes]; + }, typeTokenOptions() { - return defaultTypeTokenOptions.concat(TYPE_TOKEN_TASK_OPTION); + return [...defaultTypeTokenOptions, TYPE_TOKEN_TASK_OPTION, ...this.eeTypeTokenOptions]; }, hasOrFeature() { return this.glFeatures.orIssuableQueries; @@ -872,7 +885,7 @@ export default { <gl-icon name="thumb-down" /> {{ issuable.downvotes }} </li> - <slot :issuable="issuable"></slot> + <slot name="blocking-count" :issuable="issuable"></slot> </template> <template #empty-state> @@ -908,6 +921,10 @@ export default { :svg-path="emptyStateSvgPath" /> </template> + + <template #list-body> + <slot name="list-body"></slot> + </template> </issuable-list> <template v-else-if="isSignedIn"> diff --git a/app/assets/javascripts/issues/list/constants.js b/app/assets/javascripts/issues/list/constants.js index 5bc9cd4ebd3..bbe69923fea 100644 --- a/app/assets/javascripts/issues/list/constants.js +++ b/app/assets/javascripts/issues/list/constants.js @@ -149,6 +149,11 @@ export const specialFilterValues = [ ]; export const TYPE_TOKEN_TASK_OPTION = { icon: 'issue-type-task', title: 'task', value: 'task' }; +export const TYPE_TOKEN_OBJECTIVE_OPTION = { + icon: 'issue-type-issue', + title: 'objective', + value: 'objective', +}; // This should be consistent with Issue::TYPES_FOR_LIST in the backend // https://gitlab.com/gitlab-org/gitlab/-/blob/1379c2d7bffe2a8d809f23ac5ef9b4114f789c07/app/models/issue.rb#L48 diff --git a/app/assets/javascripts/issues/list/index.js b/app/assets/javascripts/issues/list/index.js index 5e04dd1971c..c5845eb8e40 100644 --- a/app/assets/javascripts/issues/list/index.js +++ b/app/assets/javascripts/issues/list/index.js @@ -77,6 +77,7 @@ export function mountIssuesListApp() { hasIssueWeightsFeature, hasIterationsFeature, hasScopedLabelsFeature, + hasOkrsFeature, importCsvIssuesPath, initialEmail, initialSort, @@ -127,6 +128,7 @@ export function mountIssuesListApp() { hasIssueWeightsFeature: parseBoolean(hasIssueWeightsFeature), hasIterationsFeature: parseBoolean(hasIterationsFeature), hasScopedLabelsFeature: parseBoolean(hasScopedLabelsFeature), + hasOkrsFeature: parseBoolean(hasOkrsFeature), initialSort, isAnonymousSearchDisabled: parseBoolean(isAnonymousSearchDisabled), isIssueRepositioningDisabled: parseBoolean(isIssueRepositioningDisabled), diff --git a/app/assets/javascripts/vue_shared/issuable/list/components/issuable_list_root.vue b/app/assets/javascripts/vue_shared/issuable/list/components/issuable_list_root.vue index dd3d7c8f4d6..5b6c5bf6e03 100644 --- a/app/assets/javascripts/vue_shared/issuable/list/components/issuable_list_root.vue +++ b/app/assets/javascripts/vue_shared/issuable/list/components/issuable_list_root.vue @@ -331,6 +331,7 @@ export default { <slot name="sidebar-items" :checked-issuables="bulkEditIssuables"></slot> </template> </issuable-bulk-edit-sidebar> + <slot name="list-body"></slot> <ul v-if="issuablesLoading" class="content-list"> <li v-for="n in skeletonItemCount" :key="n" class="issue gl-px-5! gl-py-5!"> <gl-skeleton-loader /> diff --git a/app/assets/javascripts/work_items/constants.js b/app/assets/javascripts/work_items/constants.js index 7fcbb8c07fe..582532b51fd 100644 --- a/app/assets/javascripts/work_items/constants.js +++ b/app/assets/javascripts/work_items/constants.js @@ -27,7 +27,6 @@ export const WORK_ITEM_TYPE_ENUM_ISSUE = 'ISSUE'; export const WORK_ITEM_TYPE_ENUM_TASK = 'TASK'; export const WORK_ITEM_TYPE_ENUM_TEST_CASE = 'TEST_CASE'; export const WORK_ITEM_TYPE_ENUM_REQUIREMENTS = 'REQUIREMENTS'; - export const WORK_ITEM_TYPE_ENUM_OBJECTIVE = 'OBJECTIVE'; export const WORK_ITEM_TYPE_VALUE_OBJECTIVE = 'Objective'; @@ -120,6 +119,10 @@ export const WORK_ITEMS_TREE_TEXT_MAP = { export const FORM_TYPES = { create: 'create', add: 'add', + [WORK_ITEM_TYPE_ENUM_OBJECTIVE]: { + icon: `issue-type-issue`, + name: s__('WorkItem|Objective'), + }, }; export const DEFAULT_PAGE_SIZE_ASSIGNEES = 10; diff --git a/db/migrate/20220824082427_remove_tmp_idx_vulnerability_occurrences_on_id_and_scanner_id.rb b/db/migrate/20220824082427_remove_tmp_idx_vulnerability_occurrences_on_id_and_scanner_id.rb new file mode 100644 index 00000000000..ebb90df569b --- /dev/null +++ b/db/migrate/20220824082427_remove_tmp_idx_vulnerability_occurrences_on_id_and_scanner_id.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class RemoveTmpIdxVulnerabilityOccurrencesOnIdAndScannerId < Gitlab::Database::Migration[2.0] + INDEX_NAME = 'tmp_index_vulnerability_occurrences_on_id_and_scanner_id' + REPORT_TYPES = { cluster_image_scanning: 7, generic: 99 }.freeze + CLAUSE = "report_type IN (#{REPORT_TYPES.values.join(',')})" + + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME + end + + def down + add_concurrent_index :vulnerability_occurrences, + [:id, :scanner_id], + where: CLAUSE, + name: INDEX_NAME + end +end diff --git a/db/schema_migrations/20220824082427 b/db/schema_migrations/20220824082427 new file mode 100644 index 00000000000..1805c956991 --- /dev/null +++ b/db/schema_migrations/20220824082427 @@ -0,0 +1 @@ +80d083f58cc9b225542c1198c7d9d80fd8202c959c70957400d63d22435999aa
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index a6d4df68745..bc5fa176a4e 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -31412,8 +31412,6 @@ CREATE INDEX tmp_index_project_statistics_cont_registry_size ON project_statisti CREATE INDEX tmp_index_project_statistics_uploads_size ON project_statistics USING btree (project_id) WHERE (uploads_size <> 0); -CREATE INDEX tmp_index_vulnerability_occurrences_on_id_and_scanner_id ON vulnerability_occurrences USING btree (id, scanner_id) WHERE (report_type = ANY (ARRAY[7, 99])); - CREATE UNIQUE INDEX uniq_pkgs_deb_grp_architectures_on_distribution_id_and_name ON packages_debian_group_architectures USING btree (distribution_id, name); CREATE UNIQUE INDEX uniq_pkgs_deb_grp_components_on_distribution_id_and_name ON packages_debian_group_components USING btree (distribution_id, name); diff --git a/doc/user/application_security/index.md b/doc/user/application_security/index.md index 5ddfa99fc81..f92eee83c74 100644 --- a/doc/user/application_security/index.md +++ b/doc/user/application_security/index.md @@ -240,9 +240,9 @@ reports are available to download. To download a report, select ### Ultimate -A merge request contains a security widget which displays a summary of the new results. New results are determined by comparing the current findings against existing findings in the target (default) branch (if there are prior findings). +A merge request contains a security widget which displays a summary of the new results. New results are determined by comparing the findings of the merge request against the findings of the most recent completed pipeline (`success`, `failed`, `canceled` or `skipped`) for the latest commit in the target branch. -We recommend you run a scan of the `default` branch before enabling feature branch scans for your developers. Otherwise, there is no base for comparison and all feature branches display the full scan results in the merge request security widget. +If security scans have not run for the most recent completed pipeline in the target branch there is no base for comparison. The vulnerabilties from the merge request findings will be listed as new in the merge request security widget. We recommend you run a scan of the `default` (target) branch before enabling feature branch scans for your developers. The merge request security widget displays only a subset of the vulnerabilities in the generated JSON artifact because it contains both new and existing findings. diff --git a/lib/gitlab/ci/runner_instructions.rb b/lib/gitlab/ci/runner_instructions.rb index 68c911d3dbb..44f3d3403f5 100644 --- a/lib/gitlab/ci/runner_instructions.rb +++ b/lib/gitlab/ci/runner_instructions.rb @@ -22,7 +22,8 @@ module Gitlab osx: { human_readable_name: "macOS", download_locations: { - amd64: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64" + amd64: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64", + arm64: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-arm64" }, install_script_template_path: "lib/gitlab/ci/runner_instructions/templates/osx/install.sh", runner_executable: "gitlab-runner" diff --git a/locale/gitlab.pot b/locale/gitlab.pot index f0402ac0b0a..eb69a938a4a 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -46356,6 +46356,9 @@ msgstr "" msgid "WorkItem|Collapse tasks" msgstr "" +msgid "WorkItem|Create Objective" +msgstr "" + msgid "WorkItem|Create task" msgstr "" diff --git a/qa/Gemfile b/qa/Gemfile index 543d8cf82b7..c6dab3457c8 100644 --- a/qa/Gemfile +++ b/qa/Gemfile @@ -40,7 +40,7 @@ gem 'chemlab-library-www-gitlab-com', '~> 0.1', '>= 0.1.1' # dependencies for jenkins client gem 'nokogiri', '~> 1.13', '>= 1.13.9' -gem 'deprecation_toolkit', '~> 2.0.0', require: false +gem 'deprecation_toolkit', '~> 2.0.1', require: false group :development do gem 'pry-byebug', '~> 3.10.1', platform: :mri diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock index 018cd63cb6e..9dd3dde7e27 100644 --- a/qa/Gemfile.lock +++ b/qa/Gemfile.lock @@ -55,7 +55,7 @@ GEM gitlab (>= 4.17) zeitwerk (~> 2.5.1) declarative (0.0.20) - deprecation_toolkit (2.0.0) + deprecation_toolkit (2.0.1) activesupport (>= 5.2) diff-lcs (1.3) domain_name (0.5.20190701) @@ -306,7 +306,7 @@ DEPENDENCIES chemlab (~> 0.10) chemlab-library-www-gitlab-com (~> 0.1, >= 0.1.1) confiner (~> 0.3) - deprecation_toolkit (~> 2.0.0) + deprecation_toolkit (~> 2.0.1) faker (~> 3.0) faraday-retry (~> 2.0) fog-core (= 2.1.0) diff --git a/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb b/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb index c35aa403bfa..b344e5f7b1f 100644 --- a/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb @@ -1,13 +1,13 @@ # frozen_string_literal: true module QA - RSpec.describe 'Create', :gitlab_pages, :orchestrated, except: { job: 'review-qa-*', subdomain: :production } do + RSpec.describe 'Create', :gitlab_pages, :orchestrated, except: { job: 'review-qa-*' } do # TODO: Convert back to :smoke once proved to be stable. Related issue: https://gitlab.com/gitlab-org/gitlab/-/issues/300906 describe 'Pages', product_group: :editor do let!(:project) do Resource::Project.fabricate_via_api! do |project| - project.name = 'jekyll-pages-project' - project.template_name = :jekyll + project.name = 'gitlab-pages-project' + project.template_name = :plainhtml end end @@ -45,7 +45,8 @@ module QA pages.go_to_access_page Support::Waiter.wait_until(sleep_interval: 2, max_duration: 60, reload_page: page, retry_on_exception: true) do - expect(page).to have_content('Write an awesome description for your new site here.') + expect(page).to have_content( + 'This is a simple plain-HTML website on GitLab Pages, without any fancy static site generator.') end end end diff --git a/spec/lib/gitlab/ci/runner_instructions_spec.rb b/spec/lib/gitlab/ci/runner_instructions_spec.rb index f872c631a50..56f69720b87 100644 --- a/spec/lib/gitlab/ci/runner_instructions_spec.rb +++ b/spec/lib/gitlab/ci/runner_instructions_spec.rb @@ -69,6 +69,7 @@ RSpec.describe Gitlab::Ci::RunnerInstructions do 'windows' | 'amd64' 'windows' | '386' 'osx' | 'amd64' + 'osx' | 'arm64' end with_them do |