From 70fe7ce74ba4a8430c88ec6e3f4c60475a69fe21 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 1 Mar 2022 21:16:08 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab/ci/review-apps/dast.gitlab-ci.yml | 2 +- GITALY_SERVER_VERSION | 2 +- .../resolvers/concerns/resolves_pipelines.rb | 5 +- .../routing/pseudonymization_helper.rb | 6 +- .../sast_ui_schema.json | 4 +- config/initializers/1_settings.rb | 4 +- ...3705_cleanup_backfill_ci_queuing_tables.rb | 15 ++ db/schema_migrations/20220225133705 | 1 + doc/administration/cicd.md | 21 +++ doc/api/graphql/reference/index.md | 3 + doc/ci/jobs/job_control.md | 22 +++ doc/ci/migration/circleci.md | 2 +- .../pipelines/img/pipeline_schedule_play.png | Bin 11400 -> 0 bytes .../img/pipeline_schedule_variables.png | Bin 6300 -> 0 bytes .../pipelines/img/pipeline_schedules_list.png | Bin 12948 -> 0 bytes .../img/pipeline_schedules_new_form.png | Bin 20090 -> 0 bytes .../img/pipeline_schedules_ownership.png | Bin 5004 -> 0 bytes doc/ci/pipelines/schedules.md | 156 +++++------------- doc/ci/variables/index.md | 2 +- doc/ci/yaml/includes.md | 2 +- doc/development/ee_features.md | 126 +++++++------- doc/topics/cron/index.md | 3 + .../dependency_scanning/analyzers.md | 2 +- .../dependency_scanning/index.md | 10 +- doc/user/application_security/index.md | 6 +- .../offline_deployments/index.md | 2 +- .../clusters/management_project_template.md | 139 ++++++---------- .../migrating_from_gma_to_project_template.md | 2 +- .../compliance/license_compliance/index.md | 6 +- .../clusters/migrate_to_gitlab_agent.md | 2 +- .../Jobs/Dependency-Scanning.gitlab-ci.yml | 2 +- .../Jobs/License-Scanning.gitlab-ci.yml | 2 +- .../Jobs/SAST-IaC.latest.gitlab-ci.yml | 2 +- .../ci/templates/Jobs/SAST.gitlab-ci.yml | 2 +- .../Jobs/Secret-Detection.gitlab-ci.yml | 2 +- .../Security/API-Fuzzing.gitlab-ci.yml | 2 +- .../Security/API-Fuzzing.latest.gitlab-ci.yml | 2 +- .../templates/Security/DAST-API.gitlab-ci.yml | 2 +- .../Security/DAST-API.latest.gitlab-ci.yml | 2 +- .../DAST-On-Demand-API-Scan.gitlab-ci.yml | 2 +- .../DAST-On-Demand-Scan.gitlab-ci.yml | 2 +- .../ci/templates/Security/DAST.gitlab-ci.yml | 2 +- .../Security/DAST.latest.gitlab-ci.yml | 2 +- .../Security/Secure-Binaries.gitlab-ci.yml | 7 +- qa/qa.rb | 3 +- .../test/integration/object_storage_gcs.rb | 13 ++ .../test/integration/registry_with_cdn.rb | 14 ++ .../concerns/resolves_pipelines_spec.rb | 12 +- .../routing/pseudonymization_helper_spec.rb | 26 ++- .../sast_build_action_spec.rb | 8 +- .../parameter_content_spec.rb | 2 +- spec/support/helpers/ci/template_helpers.rb | 2 +- 52 files changed, 329 insertions(+), 329 deletions(-) create mode 100644 db/post_migrate/20220225133705_cleanup_backfill_ci_queuing_tables.rb create mode 100644 db/schema_migrations/20220225133705 delete mode 100644 doc/ci/pipelines/img/pipeline_schedule_play.png delete mode 100644 doc/ci/pipelines/img/pipeline_schedule_variables.png delete mode 100644 doc/ci/pipelines/img/pipeline_schedules_list.png delete mode 100644 doc/ci/pipelines/img/pipeline_schedules_new_form.png delete mode 100644 doc/ci/pipelines/img/pipeline_schedules_ownership.png create mode 100644 qa/qa/scenario/test/integration/object_storage_gcs.rb create mode 100644 qa/qa/scenario/test/integration/registry_with_cdn.rb diff --git a/.gitlab/ci/review-apps/dast.gitlab-ci.yml b/.gitlab/ci/review-apps/dast.gitlab-ci.yml index d0ad4d23a82..df8ad4c517a 100644 --- a/.gitlab/ci/review-apps/dast.gitlab-ci.yml +++ b/.gitlab/ci/review-apps/dast.gitlab-ci.yml @@ -5,7 +5,7 @@ extends: - .reports:rules:schedule-dast image: - name: "registry.gitlab.com/gitlab-org/security-products/dast:$DAST_VERSION" + name: "registry.gitlab.com/security-products/dast:$DAST_VERSION" resource_group: dast_scan variables: DAST_USERNAME_FIELD: "user[login]" diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index a8bef451267..0565b7b1a7b 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -ec28a70c49706f53a1d06612dd6f855e1b85d11c +416988ddd41d192114142a828eb039fac450d084 diff --git a/app/graphql/resolvers/concerns/resolves_pipelines.rb b/app/graphql/resolvers/concerns/resolves_pipelines.rb index 42c4c22a938..2b2a4fd926f 100644 --- a/app/graphql/resolvers/concerns/resolves_pipelines.rb +++ b/app/graphql/resolvers/concerns/resolves_pipelines.rb @@ -20,11 +20,14 @@ module ResolvesPipelines GraphQL::Types::String, required: false, description: "Filter pipelines by the sha of the commit they are run for." - argument :source, GraphQL::Types::String, required: false, description: "Filter pipelines by their source." + argument :username, + GraphQL::Types::String, + required: false, + description: "Filter pipelines by the user that triggered the pipeline." end class_methods do diff --git a/app/helpers/routing/pseudonymization_helper.rb b/app/helpers/routing/pseudonymization_helper.rb index fd9907edc37..f1fafd563ce 100644 --- a/app/helpers/routing/pseudonymization_helper.rb +++ b/app/helpers/routing/pseudonymization_helper.rb @@ -15,7 +15,7 @@ module Routing end def mask_params - return default_root_url + @request.original_fullpath unless has_maskable_params? + return @request.original_url unless has_maskable_params? masked_params = @request.path_parameters.to_h do |key, value| case key @@ -66,10 +66,6 @@ module Routing query_string_hash end - - def default_root_url - Gitlab::Routing.url_helpers.root_url(only_path: false) - end end def masked_page_url(group:, project:) diff --git a/app/validators/json_schemas/security_ci_configuration_schemas/sast_ui_schema.json b/app/validators/json_schemas/security_ci_configuration_schemas/sast_ui_schema.json index 20be49f9eae..19258ee7677 100644 --- a/app/validators/json_schemas/security_ci_configuration_schemas/sast_ui_schema.json +++ b/app/validators/json_schemas/security_ci_configuration_schemas/sast_ui_schema.json @@ -2,8 +2,8 @@ "$schema": "http://json-schema.org/draft-07/schema#", "global": [ { - "field" : "SECURE_ANALYZERS_PREFIX", - "label" : "Image prefix", + "field": "SECURE_ANALYZERS_PREFIX", + "label": "Image prefix", "type": "string", "default_value": "", "value": "", diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 272a049a302..2d68eac9972 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -629,13 +629,13 @@ Gitlab.ee do Settings.cron_jobs['active_user_count_threshold_worker']['cron'] ||= '0 12 * * *' Settings.cron_jobs['active_user_count_threshold_worker']['job_class'] = 'ActiveUserCountThresholdWorker' Settings.cron_jobs['adjourned_group_deletion_worker'] ||= Settingslogic.new({}) - Settings.cron_jobs['adjourned_group_deletion_worker']['cron'] ||= '0 3 * * *' + Settings.cron_jobs['adjourned_group_deletion_worker']['cron'] ||= '0 2 * * *' Settings.cron_jobs['adjourned_group_deletion_worker']['job_class'] = 'AdjournedGroupDeletionWorker' Settings.cron_jobs['clear_shared_runners_minutes_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['clear_shared_runners_minutes_worker']['cron'] ||= '0 0 1 * *' Settings.cron_jobs['clear_shared_runners_minutes_worker']['job_class'] = 'ClearSharedRunnersMinutesWorker' Settings.cron_jobs['adjourned_projects_deletion_cron_worker'] ||= Settingslogic.new({}) - Settings.cron_jobs['adjourned_projects_deletion_cron_worker']['cron'] ||= '0 4 * * *' + Settings.cron_jobs['adjourned_projects_deletion_cron_worker']['cron'] ||= '0 7 * * *' Settings.cron_jobs['adjourned_projects_deletion_cron_worker']['job_class'] = 'AdjournedProjectsDeletionCronWorker' Settings.cron_jobs['geo_verification_cron_worker'] ||= Settingslogic.new({}) Settings.cron_jobs['geo_verification_cron_worker']['cron'] ||= '* * * * *' diff --git a/db/post_migrate/20220225133705_cleanup_backfill_ci_queuing_tables.rb b/db/post_migrate/20220225133705_cleanup_backfill_ci_queuing_tables.rb new file mode 100644 index 00000000000..4fcf8a28727 --- /dev/null +++ b/db/post_migrate/20220225133705_cleanup_backfill_ci_queuing_tables.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class CleanupBackfillCiQueuingTables < Gitlab::Database::Migration[1.0] + MIGRATION = 'BackfillCiQueuingTables' + + disable_ddl_transaction! + + def up + finalize_background_migration(MIGRATION) + end + + def down + # no-op + end +end diff --git a/db/schema_migrations/20220225133705 b/db/schema_migrations/20220225133705 new file mode 100644 index 00000000000..97f27e748e0 --- /dev/null +++ b/db/schema_migrations/20220225133705 @@ -0,0 +1 @@ +aa9ab05f6991f06c465fbc4878e0cbc648dc09b1b7912dbbf3dd68887a9cdd1d \ No newline at end of file diff --git a/doc/administration/cicd.md b/doc/administration/cicd.md index a7bd07d5d38..5e061320c5b 100644 --- a/doc/administration/cicd.md +++ b/doc/administration/cicd.md @@ -71,6 +71,27 @@ Plan.default.actual_limits.update!(ci_needs_size_limit: 100) To disable directed acyclic graphs (DAG), set the limit to `0`. +## Change maximum scheduled pipeline frequency + +[Scheduled pipelines](../ci/pipelines/schedules.md) can be configured with any [cron value](../topics/cron/index.md), +but they do not always run exactly when scheduled. An internal process, called the +_pipeline schedule worker_, queues all the scheduled pipelines, but does not +run continuously. The worker runs on its own schedule, and scheduled pipelines that +are ready to start are only queued the next time the worker runs. Scheduled pipelines +can't run more frequently than the worker. + +The default frequency of the pipeline schedule worker is `3-59/10 * * * *` (every ten minutes, +starting with `0:03`, `0:13`, `0:23`, and so on). The default frequency for GitLab.com +is listed in the [GitLab.com settings](../user/gitlab_com/index.md#gitlab-cicd). + +To change the frequency of the pipeline schedule worker: + +1. Edit the `gitlab_rails['pipeline_schedule_worker_cron']` value in your instance's `gitlab.rb` file. +1. [Reconfigure GitLab](restart_gitlab.md#omnibus-gitlab-reconfigure) for the changes to take effect. + +For example, to set the maximum frequency of pipelines to twice a day, set `pipeline_schedule_worker_cron` +to a cron value of `0 */12 * * *` (`00:00` and `12:00` every day). +