diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-11 06:08:03 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-11 06:08:03 +0000 |
commit | 18b54e46b77786995acdb1026c2ec35956e33780 (patch) | |
tree | 0ed0d6bf11a0337febb5a30707ad25f426ab760b | |
parent | defc424997d8329613ef3951ab30adf6b3b94f01 (diff) | |
download | gitlab-ce-18b54e46b77786995acdb1026c2ec35956e33780.tar.gz |
Add latest changes from gitlab-org/gitlab@master
26 files changed, 218 insertions, 45 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3f495ef85b2..178311bbc95 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -199,11 +199,6 @@ Style/FormatString: Style/HashAsLastArrayItem: Enabled: false -# Offense count: 70 -# Cop supports --auto-correct. -Style/HashEachMethods: - Enabled: false - # Offense count: 64 # Cop supports --auto-correct. Style/KeywordParametersOrder: diff --git a/.rubocop_todo/style/hash_each_methods.yml b/.rubocop_todo/style/hash_each_methods.yml new file mode 100644 index 00000000000..648b6fbbe08 --- /dev/null +++ b/.rubocop_todo/style/hash_each_methods.yml @@ -0,0 +1,91 @@ +--- +# Cop supports --auto-correct. +Style/HashEachMethods: + # Offense count: 95 + # Temporarily disabled due to too many offenses + Enabled: false + Exclude: + - 'app/graphql/resolvers/concerns/caching_array_resolver.rb' + - 'app/graphql/types/alert_management/severity_enum.rb' + - 'app/graphql/types/availability_enum.rb' + - 'app/graphql/types/ci/code_quality_degradation_severity_enum.rb' + - 'app/graphql/types/ci/job_artifact_file_type_enum.rb' + - 'app/graphql/types/ci/pipeline_config_source_enum.rb' + - 'app/graphql/types/ci/runner_access_level_enum.rb' + - 'app/graphql/types/clusters/agent_token_status_enum.rb' + - 'app/graphql/types/container_repository_status_enum.rb' + - 'app/graphql/types/data_visualization_palette/color_enum.rb' + - 'app/graphql/types/data_visualization_palette/weight_enum.rb' + - 'app/graphql/types/dependency_proxy/manifest_type_enum.rb' + - 'app/graphql/types/design_management/design_collection_copy_state_enum.rb' + - 'app/graphql/types/design_management/design_version_event_enum.rb' + - 'app/graphql/types/event_action_enum.rb' + - 'app/graphql/types/issuable_severity_enum.rb' + - 'app/graphql/types/packages/conan/metadatum_file_type_enum.rb' + - 'app/graphql/types/packages/package_dependency_type_enum.rb' + - 'app/graphql/types/packages/package_status_enum.rb' + - 'app/graphql/types/packages/package_type_enum.rb' + - 'app/graphql/types/release_asset_link_type_enum.rb' + - 'app/graphql/types/user_callout_feature_name_enum.rb' + - 'app/helpers/routing/pseudonymization_helper.rb' + - 'app/models/application_setting.rb' + - 'app/services/security/merge_reports_service.rb' + - 'config/initializers/6_validations.rb' + - 'config/initializers/8_gitaly.rb' + - 'ee/app/graphql/types/compliance_management/merge_requests/compliance_violation_reason_enum.rb' + - 'ee/app/graphql/types/compliance_management/merge_requests/compliance_violation_severity_enum.rb' + - 'ee/app/graphql/types/incident_management/oncall_rotation_length_unit_enum.rb' + - 'ee/app/graphql/types/security_report_summary_type.rb' + - 'ee/app/graphql/types/vulnerabilities_count_by_day_type.rb' + - 'ee/app/graphql/types/vulnerability/external_issue_link_external_tracker_enum.rb' + - 'ee/app/graphql/types/vulnerability/external_issue_link_type_enum.rb' + - 'ee/app/graphql/types/vulnerability/issue_link_type_enum.rb' + - 'ee/app/graphql/types/vulnerability_confidence_enum.rb' + - 'ee/app/graphql/types/vulnerability_grade_enum.rb' + - 'ee/app/graphql/types/vulnerability_report_type_enum.rb' + - 'ee/app/graphql/types/vulnerability_severities_count_type.rb' + - 'ee/app/graphql/types/vulnerability_severity_enum.rb' + - 'ee/app/models/geo/secondary_usage_data.rb' + - 'ee/db/fixtures/development/32_compliance_report_violations.rb' + - 'ee/lib/gitlab/ci/reports/license_scanning/report.rb' + - 'ee/spec/factories/vulnerabilities.rb' + - 'ee/spec/factories/vulnerabilities/findings.rb' + - 'ee/spec/helpers/application_helper_spec.rb' + - 'ee/spec/lib/gitlab/geo_spec.rb' + - 'lib/api/todos.rb' + - 'lib/backup/manager.rb' + - 'lib/gitlab/changelog/release.rb' + - 'lib/gitlab/ci/parsers.rb' + - 'lib/gitlab/ci/reports/test_suite.rb' + - 'lib/gitlab/metrics/samplers/ruby_sampler.rb' + - 'lib/gitlab/metrics/subscribers/active_record.rb' + - 'lib/gitlab/metrics/subscribers/load_balancing.rb' + - 'lib/gitlab/middleware/multipart.rb' + - 'lib/gitlab/sidekiq_middleware/duplicate_jobs/duplicate_job.rb' + - 'lib/gitlab/usage_data.rb' + - 'spec/controllers/projects_controller_spec.rb' + - 'spec/factories/ci/reports/codequality_degradations.rb' + - 'spec/finders/packages/group_packages_finder_spec.rb' + - 'spec/helpers/application_helper_spec.rb' + - 'spec/lib/gitlab/ci/status/build/failed_spec.rb' + - 'spec/lib/gitlab/metrics/samplers/ruby_sampler_spec.rb' + - 'spec/lib/gitlab/template/gitlab_ci_yml_template_spec.rb' + - 'spec/lib/gitlab/usage_data_spec.rb' + - 'spec/models/ci/build_spec.rb' + - 'spec/models/ci/job_artifact_spec.rb' + - 'spec/models/ci/resource_group_spec.rb' + - 'spec/models/clusters/cluster_spec.rb' + - 'spec/models/concerns/has_user_type_spec.rb' + - 'spec/models/packages/package_spec.rb' + - 'spec/models/user_spec.rb' + - 'spec/presenters/ci/pipeline_presenter_spec.rb' + - 'spec/presenters/commit_status_presenter_spec.rb' + - 'spec/presenters/packages/npm/package_presenter_spec.rb' + - 'spec/services/system_notes/incident_service_spec.rb' + - 'spec/support/helpers/multipart_helpers.rb' + - 'spec/support/helpers/reactive_caching_helpers.rb' + - 'spec/support/import_export/project_tree_expectations.rb' + - 'spec/support/shared_examples/requests/api/npm_packages_shared_examples.rb' + - 'spec/support/shared_examples/services/packages_shared_examples.rb' + - 'spec/tasks/gitlab/packages/events_rake_spec.rb' + - 'tooling/graphql/docs/helper.rb' diff --git a/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue b/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue index acc82761e88..6ac1bce4032 100644 --- a/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue +++ b/app/assets/javascripts/analytics/shared/components/value_stream_metrics.vue @@ -1,6 +1,6 @@ <script> import { GlDeprecatedSkeletonLoading as GlSkeletonLoading } from '@gitlab/ui'; -import { flatten, isEqual } from 'lodash'; +import { flatten, isEqual, keyBy } from 'lodash'; import createFlash from '~/flash'; import { sprintf, s__ } from '~/locale'; import { METRICS_POPOVER_CONTENT } from '../constants'; @@ -30,7 +30,8 @@ const fetchMetricsData = (reqs = [], path, params) => { const extractMetricsGroupData = (keyList = [], data = []) => { if (!keyList.length || !data.length) return []; - return data.filter(({ identifier = '' }) => identifier.length && keyList.includes(identifier)); + const kv = keyBy(data, 'identifier'); + return keyList.map((id) => kv[id] || null).filter((obj) => Boolean(obj)); }; const groupRawMetrics = (groups = [], rawData = []) => { diff --git a/app/assets/javascripts/analytics/shared/constants.js b/app/assets/javascripts/analytics/shared/constants.js index 05e68bf5d9a..38d05552783 100644 --- a/app/assets/javascripts/analytics/shared/constants.js +++ b/app/assets/javascripts/analytics/shared/constants.js @@ -55,13 +55,38 @@ export const METRICS_POPOVER_CONTENT = { commits: { description: s__('ValueStreamAnalytics|Number of commits pushed to the default branch'), }, + 'time-to-restore-service': { + description: s__( + 'ValueStreamAnalytics|Median time an incident was open on a production environment in the given time period.', + ), + }, + time_to_restore_service: { + description: s__( + 'ValueStreamAnalytics|Median time an incident was open on a production environment in the given time period.', + ), + }, + 'change-failure-rate': { + description: s__( + 'ValueStreamAnalytics|Percentage of deployments that cause an incident in production.', + ), + }, + change_failure_rate: { + description: s__( + 'ValueStreamAnalytics|Percentage of deployments that cause an incident in production.', + ), + }, }; const KEY_METRICS_TITLE = s__('ValueStreamAnalytics|Key metrics'); const KEY_METRICS_KEYS = ['lead_time', 'cycle_time', 'issues', 'commits', 'deploys']; const DORA_METRICS_TITLE = s__('ValueStreamAnalytics|DORA metrics'); -const DORA_METRICS_KEYS = ['deployment_frequency', 'lead_time_for_changes']; +const DORA_METRICS_KEYS = [ + 'deployment_frequency', + 'lead_time_for_changes', + 'time_to_restore_service', + 'change_failure_rate', +]; export const VSA_METRICS_GROUPS = [ { key: 'key_metrics', title: KEY_METRICS_TITLE, keys: KEY_METRICS_KEYS }, diff --git a/app/assets/javascripts/clusters/forms/components/integration_form.vue b/app/assets/javascripts/clusters/forms/components/integration_form.vue index 3f61a1b18a7..b2a8381f937 100644 --- a/app/assets/javascripts/clusters/forms/components/integration_form.vue +++ b/app/assets/javascripts/clusters/forms/components/integration_form.vue @@ -140,7 +140,7 @@ export default { <div v-if="editable" class="form group gl-display-flex gl-justify-content-end"> <gl-button category="primary" - variant="success" + variant="confirm" type="submit" :disabled="!canSubmit" :aria-disabled="!canSubmit" diff --git a/app/assets/javascripts/pipelines/components/dag/dag.vue b/app/assets/javascripts/pipelines/components/dag/dag.vue index 16fb931ec2b..475dd3bf36e 100644 --- a/app/assets/javascripts/pipelines/components/dag/dag.vue +++ b/app/assets/javascripts/pipelines/components/dag/dag.vue @@ -238,7 +238,7 @@ export default { </div> </template> <template v-if="dagDocPath" #actions> - <gl-button :href="dagDocPath" target="__blank" variant="success"> + <gl-button :href="dagDocPath" target="_blank" variant="confirm"> {{ $options.emptyStateTexts.button }} </gl-button> </template> diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb index a58cae0ec11..c71c101b434 100644 --- a/app/controllers/graphql_controller.rb +++ b/app/controllers/graphql_controller.rb @@ -64,7 +64,7 @@ class GraphqlController < ApplicationController log_exception(exception) if Rails.env.test? || Rails.env.development? - render_error("Internal server error: #{exception.message}", raised_at: exception.backtrace.first) + render_error("Internal server error: #{exception.message}", raised_at: exception.backtrace[0..10].join(' <-- ')) else render_error("Internal server error") end diff --git a/app/views/clusters/clusters/_integrations.html.haml b/app/views/clusters/clusters/_integrations.html.haml index c670dafb947..c772df2d72c 100644 --- a/app/views/clusters/clusters/_integrations.html.haml +++ b/app/views/clusters/clusters/_integrations.html.haml @@ -13,7 +13,7 @@ = prometheus_form.gitlab_ui_checkbox_component :enabled, s_('ClusterIntegration|Enable Prometheus integration'), help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link } - = prometheus_form.submit _('Save changes'), class: 'btn gl-button btn-success' + = prometheus_form.submit _('Save changes'), class: 'btn gl-button btn-confirm' .sub-section.form-group = gitlab_ui_form_for @elastic_stack_integration, as: :integration, namespace: :elastic_stack, url: @cluster.integrations_path, method: :post, html: { class: 'js-cluster-integrations-form' } do |elastic_stack_form| @@ -24,4 +24,4 @@ = elastic_stack_form.gitlab_ui_checkbox_component :enabled, s_('ClusterIntegration|Enable Elastic Stack integration'), help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link } - = elastic_stack_form.submit _('Save changes'), class: 'btn gl-button btn-success' + = elastic_stack_form.submit _('Save changes'), class: 'btn gl-button btn-confirm' diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml index 3cd366d5bac..81f413f5143 100644 --- a/app/views/projects/merge_requests/_mr_title.html.haml +++ b/app/views/projects/merge_requests/_mr_title.html.haml @@ -2,8 +2,8 @@ - can_update_merge_request = can?(current_user, :update_merge_request, @merge_request) - can_reopen_merge_request = can?(current_user, :reopen_merge_request, @merge_request) - are_close_and_open_buttons_hidden = merge_request_button_hidden?(@merge_request, true) && merge_request_button_hidden?(@merge_request, false) -- cache_key = [@project, @merge_request, can_update_merge_request, can_reopen_merge_request, are_close_and_open_buttons_hidden, current_user&.preferred_language] -- moved_sidebar_enabled = Feature.enabled?(:updated_mr_header, @project) +- updated_mr_header_enabled = Feature.enabled?(:updated_mr_header, @project) +- cache_key = [@project, @merge_request, can_update_merge_request, can_reopen_merge_request, are_close_and_open_buttons_hidden, current_user&.preferred_language, updated_mr_header_enabled] = cache(cache_key, expires_in: 1.day) do - if @merge_request.closed_or_merged_without_fork? @@ -13,12 +13,12 @@ = c.body do = _('The source project of this merge request has been removed.') - .detail-page-header.border-bottom-0.pt-0.pb-0{ class: "#{'gl-display-block gl-md-display-flex!' if moved_sidebar_enabled}" } + .detail-page-header.border-bottom-0.pt-0.pb-0{ class: "#{'gl-display-block gl-md-display-flex!' if updated_mr_header_enabled}" } .detail-page-header-body - - unless moved_sidebar_enabled + - unless updated_mr_header_enabled = render "shared/issuable/status_box", issuable: @merge_request - .issuable-meta{ class: "#{'gl-display-flex' if moved_sidebar_enabled}" } - - if moved_sidebar_enabled + .issuable-meta{ class: "#{'gl-display-flex' if updated_mr_header_enabled}" } + - if updated_mr_header_enabled #js-issuable-header-warnings %h2.title.gl-my-0.gl-display-inline-block{ data: { qa_selector: 'title_content' } } = markdown_field(@merge_request, :title) @@ -30,7 +30,7 @@ %button.gl-button.btn.btn-default.btn-icon.float-right.d-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ type: 'button' } = sprite_icon('chevron-double-lg-left') - .detail-page-header-actions.js-issuable-actions{ class: "#{'gl-align-self-start is-merge-request' if moved_sidebar_enabled}" } + .detail-page-header-actions.js-issuable-actions{ class: "#{'gl-align-self-start is-merge-request' if updated_mr_header_enabled}" } - if @merge_request.source_project = render 'projects/merge_requests/code_dropdown' diff --git a/app/workers/concerns/git_garbage_collect_methods.rb b/app/workers/concerns/git_garbage_collect_methods.rb index fd5094b3014..5c0493c9be5 100644 --- a/app/workers/concerns/git_garbage_collect_methods.rb +++ b/app/workers/concerns/git_garbage_collect_methods.rb @@ -37,7 +37,7 @@ module GitGarbageCollectMethods # Refresh the branch cache in case garbage collection caused a ref lookup to fail flush_ref_caches(resource) if gc?(task) - update_repository_statistics(resource) if task != :pack_refs + update_repository_statistics(resource, task) # In case pack files are deleted, release libgit2 cache and open file # descriptors ASAP instead of waiting for Ruby garbage collection @@ -135,15 +135,25 @@ module GitGarbageCollectMethods resource.repository.has_visible_content? end - def update_repository_statistics(resource) + def update_repository_statistics(resource, task) + return if task == :pack_refs + resource.repository.expire_statistics_caches return if Gitlab::Database.read_only? # GitGarbageCollectWorker may be run on a Geo secondary - update_db_repository_statistics(resource) + stats_to_update = stats + + stats_to_update.delete(:repository_size) if task == :incremental_repack + + update_db_repository_statistics(resource, stats_to_update) end - def update_db_repository_statistics(resource) + def update_db_repository_statistics(resource, stats) # no-op end + + def stats + [] + end end diff --git a/app/workers/projects/git_garbage_collect_worker.rb b/app/workers/projects/git_garbage_collect_worker.rb index a70c52abde2..9ac3953e83c 100644 --- a/app/workers/projects/git_garbage_collect_worker.rb +++ b/app/workers/projects/git_garbage_collect_worker.rb @@ -44,8 +44,12 @@ module Projects end override :update_db_repository_statistics - def update_db_repository_statistics(resource) - Projects::UpdateStatisticsService.new(resource, nil, statistics: [:repository_size, :lfs_objects_size]).execute + def update_db_repository_statistics(resource, stats) + Projects::UpdateStatisticsService.new(resource, nil, statistics: stats).execute + end + + def stats + [:repository_size, :lfs_objects_size] end end end diff --git a/app/workers/wikis/git_garbage_collect_worker.rb b/app/workers/wikis/git_garbage_collect_worker.rb index b00190c6b98..977493834c9 100644 --- a/app/workers/wikis/git_garbage_collect_worker.rb +++ b/app/workers/wikis/git_garbage_collect_worker.rb @@ -19,8 +19,12 @@ module Wikis end override :update_db_repository_statistics - def update_db_repository_statistics(resource) - Projects::UpdateStatisticsService.new(resource.container, nil, statistics: [:wiki_size]).execute + def update_db_repository_statistics(resource, stats) + Projects::UpdateStatisticsService.new(resource.container, nil, statistics: stats).execute + end + + def stats + [:wiki_size] end end end diff --git a/db/docs/ci_deleted_objects.yml b/db/docs/ci_deleted_objects.yml index 7189b0a7c6c..24d19069913 100644 --- a/db/docs/ci_deleted_objects.yml +++ b/db/docs/ci_deleted_objects.yml @@ -5,5 +5,5 @@ classes: feature_categories: - build_artifacts description: TODO -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44928 +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/9bf76fe03f8edf4f67023448161af27abb8fb521 milestone: '13.5' diff --git a/db/docs/ci_unit_tests.yml b/db/docs/ci_unit_tests.yml index f80372511c4..c22ad567c12 100644 --- a/db/docs/ci_unit_tests.yml +++ b/db/docs/ci_unit_tests.yml @@ -3,7 +3,7 @@ table_name: ci_unit_tests classes: - Ci::UnitTest feature_categories: -- continuous_integration +- code_testing description: TODO introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/56137 milestone: '13.11' diff --git a/db/docs/reviews.yml b/db/docs/reviews.yml index 299574bbe23..5a9f4c03bfb 100644 --- a/db/docs/reviews.yml +++ b/db/docs/reviews.yml @@ -3,7 +3,7 @@ table_name: reviews classes: - Review feature_categories: -- review_apps +- code_review description: TODO introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/8442 milestone: '11.6' diff --git a/doc/user/clusters/agent/index.md b/doc/user/clusters/agent/index.md index 87a1d7bbe4c..d54d432f0f5 100644 --- a/doc/user/clusters/agent/index.md +++ b/doc/user/clusters/agent/index.md @@ -43,6 +43,7 @@ This workflow is considered push-based, because GitLab is pushing requests from GitLab supports the following Kubernetes versions. You can upgrade your Kubernetes version to a supported version at any time: +- 1.22 (support ends on March 22, 2023) - 1.21 (support ends on November 22, 2022) - 1.20 (support ends on July 22, 2022) diff --git a/lib/gitlab/ci/templates/Jobs/DAST-Default-Branch-Deploy.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/DAST-Default-Branch-Deploy.gitlab-ci.yml index 0cc5090f85e..2bc3285def3 100644 --- a/lib/gitlab/ci/templates/Jobs/DAST-Default-Branch-Deploy.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Jobs/DAST-Default-Branch-Deploy.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - DAST_AUTO_DEPLOY_IMAGE_VERSION: 'v2.23.0' + DAST_AUTO_DEPLOY_IMAGE_VERSION: 'v2.26.0' .dast-auto-deploy: image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:${DAST_AUTO_DEPLOY_IMAGE_VERSION}" diff --git a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml index 89eb91c981f..6bf4d3e15ee 100644 --- a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - AUTO_DEPLOY_IMAGE_VERSION: 'v2.23.0' + AUTO_DEPLOY_IMAGE_VERSION: 'v2.26.0' .auto-deploy: image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:${AUTO_DEPLOY_IMAGE_VERSION}" diff --git a/lib/gitlab/ci/templates/Jobs/Deploy.latest.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Deploy.latest.gitlab-ci.yml index 78f28b59aa5..ae5051b517c 100644 --- a/lib/gitlab/ci/templates/Jobs/Deploy.latest.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Jobs/Deploy.latest.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - AUTO_DEPLOY_IMAGE_VERSION: 'v2.23.0' + AUTO_DEPLOY_IMAGE_VERSION: 'v2.26.0' .auto-deploy: image: "registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:${AUTO_DEPLOY_IMAGE_VERSION}" diff --git a/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml b/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml index 70d61e3f382..bec269e2933 100644 --- a/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml @@ -47,10 +47,8 @@ container_scanning: - if: $CONTAINER_SCANNING_DISABLED when: never - if: $CI_COMMIT_BRANCH && - $GITLAB_FEATURES =~ /\bcontainer_scanning\b/ && $CI_GITLAB_FIPS_MODE == "true" && $CS_ANALYZER_IMAGE !~ /-(fips|ubi)\z/ variables: CS_IMAGE_SUFFIX: -fips - - if: $CI_COMMIT_BRANCH && - $GITLAB_FEATURES =~ /\bcontainer_scanning\b/ + - if: $CI_COMMIT_BRANCH diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 528d663c37d..3240edff18c 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -7104,6 +7104,9 @@ msgstr "" msgid "Certificate Subject" msgstr "" +msgid "Change Failure Rate" +msgstr "" + msgid "Change assignee" msgstr "" @@ -10966,6 +10969,9 @@ msgstr "" msgid "CycleAnalytics|Average time to completion" msgstr "" +msgid "CycleAnalytics|Change Failure Rate" +msgstr "" + msgid "CycleAnalytics|Create a custom value stream to view metrics about stages specific to your development process. Use your value stream to visualize your DevSecOps lifecycle, determine the velocity of your group, and identify inefficient processes." msgstr "" @@ -11039,6 +11045,9 @@ msgstr "" msgid "CycleAnalytics|There is no data for 'Total time' available. Adjust the current filters." msgstr "" +msgid "CycleAnalytics|Time to Restore Service" +msgstr "" + msgid "CycleAnalytics|Total time" msgstr "" @@ -13426,6 +13435,9 @@ msgstr "" msgid "Edit Pipeline Schedule" msgstr "" +msgid "Edit Profile" +msgstr "" + msgid "Edit Release" msgstr "" @@ -26043,6 +26055,9 @@ msgstr "" msgid "OnDemandScans|%{learnMoreLinkStart}Learn more about on-demand scans%{learnMoreLinkEnd}." msgstr "" +msgid "OnDemandScans|%{scannerType} profile library" +msgstr "" + msgid "OnDemandScans|Add a schedule to run this scan at a specified date and time or on a recurring basis. Scheduled scans are automatically saved to scan library." msgstr "" @@ -26118,15 +26133,24 @@ msgstr "" msgid "OnDemandScans|My daily scan" msgstr "" +msgid "OnDemandScans|New %{scannerType} profile" +msgstr "" + msgid "OnDemandScans|New on-demand DAST scan" msgstr "" msgid "OnDemandScans|New on-demand scan" msgstr "" +msgid "OnDemandScans|New profile" +msgstr "" + msgid "OnDemandScans|New scan" msgstr "" +msgid "OnDemandScans|No %{scannerType} profiles found for DAST" +msgstr "" + msgid "OnDemandScans|No profile yet. In order to create a new scan, you need to have at least one completed scanner profile." msgstr "" @@ -26184,6 +26208,9 @@ msgstr "" msgid "OnDemandScans|Site profile" msgstr "" +msgid "OnDemandScans|Start by creating a new profile. Profiles make it easy to save and reuse configuration details for GitLab’s security tools." +msgstr "" + msgid "OnDemandScans|Start time" msgstr "" @@ -34058,6 +34085,9 @@ msgstr "" msgid "Select Page" msgstr "" +msgid "Select Profile" +msgstr "" + msgid "Select a branch" msgstr "" @@ -38919,6 +38949,9 @@ msgstr "" msgid "Time spent" msgstr "" +msgid "Time to Restore Service" +msgstr "" + msgid "Time to merge" msgstr "" @@ -41206,6 +41239,9 @@ msgstr "" msgid "ValueStreamAnalytics|Key metrics" msgstr "" +msgid "ValueStreamAnalytics|Median time an incident was open on a production environment in the given time period." +msgstr "" + msgid "ValueStreamAnalytics|Median time between merge request merge and deployment to a production environment for all MRs deployed in the given time period." msgstr "" @@ -41221,6 +41257,9 @@ msgstr "" msgid "ValueStreamAnalytics|Number of new issues created." msgstr "" +msgid "ValueStreamAnalytics|Percentage of deployments that cause an incident in production." +msgstr "" + msgid "ValueStreamAnalytics|There was an error while fetching value stream analytics %{requestTypeName} data." msgstr "" diff --git a/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_project_level_spec.rb b/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_project_level_spec.rb index d734116b304..ab6896ca26f 100644 --- a/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_project_level_spec.rb +++ b/qa/qa/specs/features/browser_ui/5_package/package_registry/nuget/nuget_project_level_spec.rb @@ -1,7 +1,10 @@ # frozen_string_literal: true module QA - RSpec.describe 'Package', :orchestrated, :packages, :object_storage, :reliable do + RSpec.describe 'Package', :orchestrated, :packages, :object_storage, :reliable, quarantine: { + type: :flaky, + issue: "https://gitlab.com/gitlab-org/gitlab/-/issues/361704" + } do describe 'NuGet project level endpoint' do include Support::Helpers::MaskToken @@ -129,12 +132,12 @@ module QA file_path: 'dotnetcore.csproj', content: <<~EOF <Project Sdk="Microsoft.NET.Sdk"> - + <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net5.0</TargetFramework> </PropertyGroup> - + </Project> EOF } diff --git a/spec/requests/api/graphql/project/merge_requests_spec.rb b/spec/requests/api/graphql/project/merge_requests_spec.rb index d69f542cd18..5daec5543c0 100644 --- a/spec/requests/api/graphql/project/merge_requests_spec.rb +++ b/spec/requests/api/graphql/project/merge_requests_spec.rb @@ -96,7 +96,7 @@ RSpec.describe 'getting merge request listings nested in a project' do where(:field, :subfield, :is_connection) do nested_fields_of('MergeRequest').flat_map do |name, field| type = field_type(field) - is_connection = type.name.ends_with?('Connection') + is_connection = type.graphql_name.ends_with?('Connection') type = field_type(type.fields['nodes']) if is_connection type.fields diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index 943d70ba142..c39a76ad2fc 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -466,7 +466,7 @@ RSpec.describe Ci::CreatePipelineService do it 'pull it from Auto-DevOps' do pipeline = execute_service.payload expect(pipeline).to be_auto_devops_source - expect(pipeline.builds.map(&:name)).to match_array(%w[brakeman-sast build code_quality eslint-sast secret_detection semgrep-sast test]) + expect(pipeline.builds.map(&:name)).to match_array(%w[brakeman-sast build code_quality container_scanning eslint-sast secret_detection semgrep-sast test]) end end diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb index 34383b363d2..db8d45f61ea 100644 --- a/spec/support/helpers/graphql_helpers.rb +++ b/spec/support/helpers/graphql_helpers.rb @@ -250,10 +250,10 @@ module GraphqlHelpers mutation_field = GitlabSchema.mutation.fields[mutation_name] fields = yield if block_given? - fields ||= all_graphql_fields_for(mutation_field.type.to_graphql) + fields ||= all_graphql_fields_for(mutation_field.type.to_type_signature) query = <<~MUTATION - mutation(#{input_variable_name}: #{mutation_field.arguments['input'].type.to_graphql}) { + mutation(#{input_variable_name}: #{mutation_field.arguments['input'].type.to_type_signature}) { #{mutation_name}(input: #{input_variable_name}) { #{fields} } @@ -302,7 +302,7 @@ module GraphqlHelpers def input_variable_name_for_mutation(mutation_name) mutation_name = GraphqlHelpers.fieldnamerize(mutation_name) mutation_field = GitlabSchema.mutation.fields[mutation_name] - input_type = field_type(mutation_field.arguments['input']) + input_type = mutation_field.arguments['input'].type.unwrap.to_type_signature GraphqlHelpers.fieldnamerize(input_type) end diff --git a/spec/support/shared_examples/workers/concerns/git_garbage_collect_methods_shared_examples.rb b/spec/support/shared_examples/workers/concerns/git_garbage_collect_methods_shared_examples.rb index 4751d91efde..77c4a3431e2 100644 --- a/spec/support/shared_examples/workers/concerns/git_garbage_collect_methods_shared_examples.rb +++ b/spec/support/shared_examples/workers/concerns/git_garbage_collect_methods_shared_examples.rb @@ -202,6 +202,8 @@ RSpec.shared_examples 'can collect git garbage' do |update_statistics: true| before do expect(subject).to receive(:get_lease_uuid).and_return(lease_uuid) + + statistics_keys.delete(:repository_size) end it_behaves_like 'it calls Gitaly' |