diff --git a/doc/ci/jobs/ci_job_token.md b/doc/ci/jobs/ci_job_token.md index 9602786f1bdea6f7316241005ade4f9c7e9fe5d2..f1aa834a03851f9230b61844c79fcdb1e27f23dc 100644 --- a/doc/ci/jobs/ci_job_token.md +++ b/doc/ci/jobs/ci_job_token.md @@ -255,7 +255,7 @@ While troubleshooting CI/CD job token authentication issues, be aware that: - A [GraphQL example mutation](../../api/graphql/getting_started.md#update-project-settings) is available to toggle the scope settings per project. - [This comment](https://gitlab.com/gitlab-org/gitlab/-/issues/351740#note_1335673157) - demonstrates how to use graphQL with Bash and cURL to: + demonstrates how to use GraphQL with Bash and cURL to: - Enable the inbound token access scope. - Give access to project B from project A, or add B to A's allowlist. - To remove project access. diff --git a/doc/ci/runners/saas/linux_saas_runner.md b/doc/ci/runners/saas/linux_saas_runner.md index dd5381f3cd644a3c3f6290ff18f77fc674f516cb..c026ccf3d22d823a151c68c7a4695ff0b0bab5d5 100644 --- a/doc/ci/runners/saas/linux_saas_runner.md +++ b/doc/ci/runners/saas/linux_saas_runner.md @@ -29,7 +29,7 @@ The `small` machine type is set as default. If no [tag](../../yaml/index.md#tags the jobs will run on this default runner. All SaaS runners on Linux currently run on -[`n2d-standard`](https://cloud.google.com/compute/docs/general-purpose-machines#n2d_machines) gerneral-purpose compute from GCP. +[`n2d-standard`](https://cloud.google.com/compute/docs/general-purpose-machines#n2d_machines) general-purpose compute from GCP. The machine type and underlying processor type can change. Jobs optimized for a specific processor design could behave inconsistently. ## Container images diff --git a/doc/ci/troubleshooting.md b/doc/ci/troubleshooting.md index 3d5bcc6488972e9a7732dca1b3eb6eb2f14adaa7..e0b8c6213defdf38500881e448771c356ea2c333 100644 --- a/doc/ci/troubleshooting.md +++ b/doc/ci/troubleshooting.md @@ -210,6 +210,42 @@ To illustrate its life cycle: 1. The runner fetches the persistent pipeline ref and gets source code from the checkout-SHA. 1. When the pipeline finishes, its persistent ref is cleaned up in a background process. +### `get_sources` job section fails because of an HTTP/2 problem + +Sometimes, jobs fail with the following cURL error: + +```plaintext +++ git -c 'http.userAgent=gitlab-runner <version>' fetch origin +refs/pipelines/<id>:refs/pipelines/<id> ... +error: RPC failed; curl 16 HTTP/2 send again with decreased length +fatal: ... +``` + +You can work around this problem by configuring Git and `libcurl` to +[use HTTP/1.1](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpversion). +The configuration can be added to: + +- A job's [`pre_get_sources_script`](yaml/index.md#hookspre_get_sources_script): + + ```yaml + job_name: + hooks: + pre_get_sources_script: + - git config --local http.version "HTTP/1.1" + ``` + +- The [runner's `config.toml`](https://docs.gitlab.com/runner/configuration/advanced-configuration.html) + with [Git configuration environment variables](https://git-scm.com/docs/git-config#ENVIRONMENT): + + ```toml + [[runners]] + ... + environment = [ + "GIT_CONFIG_COUNT=1", + "GIT_CONFIG_KEY_1=http.version", + "GIT_CONFIG_VALUE_1=HTTP/1.1" + ] + ``` + ### Merge request pipeline messages The merge request pipeline widget shows information about the pipeline status in @@ -440,9 +476,9 @@ This flag reduces system resource usage on the `jobs/request` endpoint. When enabled, jobs created in the last hour can run in projects which are out of quota. Earlier jobs are already canceled by a periodic background worker (`StuckCiJobsWorker`). -## CI/CD troubleshooting rails console commands +## CI/CD troubleshooting Rails console commands -The following commands are run in the [rails console](../administration/operations/rails_console.md#starting-a-rails-console-session). +The following commands are run in the [Rails console](../administration/operations/rails_console.md#starting-a-rails-console-session). WARNING: Any command that changes data directly could be damaging if not run correctly, or under the right conditions. diff --git a/doc/ci/yaml/artifacts_reports.md b/doc/ci/yaml/artifacts_reports.md index 920a60ca12cd89eb1168169338774e8bea4aa9d7..e931a8b3b4efb23404e11f451498b9b398ed2076 100644 --- a/doc/ci/yaml/artifacts_reports.md +++ b/doc/ci/yaml/artifacts_reports.md @@ -374,6 +374,6 @@ The `terraform` report obtains a Terraform `tfplan.json` file. [JQ processing re The collected Terraform plan report uploads to GitLab as an artifact. GitLab can display the results of one or more reports in the merge request -[terraform widget](../../user/infrastructure/iac/mr_integration.md#output-terraform-plan-information-into-a-merge-request). +[Terraform widget](../../user/infrastructure/iac/mr_integration.md#output-terraform-plan-information-into-a-merge-request). For more information, see [Output `terraform plan` information into a merge request](../../user/infrastructure/iac/mr_integration.md). diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md index c4789311818701cfe5493fb6d18215d8baa7ab80..ed30c746ffb05026c56fcd44960ba5461a00f901 100644 --- a/doc/ci/yaml/index.md +++ b/doc/ci/yaml/index.md @@ -2004,12 +2004,19 @@ at certain stages of job execution, like before retrieving the Git repository. > - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/381840) in GitLab 15.10. Feature flag `ci_hooks_pre_get_sources_script` removed. Use `hooks:pre_get_sources_script` to specify a list of commands to execute on the runner -before retrieving the Git repository and any submodules. You can use it -to adjust the Git client configuration first, for example. +before cloning the Git repository and any submodules. +You can use it for example to: -**Related topics**: +- Adjust the [Git configuration](../troubleshooting.md#get_sources-job-section-fails-because-of-an-http2-problem). +- Export [tracing variables](../../topics/git/useful_git_commands.md). -- [GitLab Runner configuration](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section) +**Possible inputs**: An array including: + +- Single line commands. +- Long commands [split over multiple lines](script.md#split-long-commands). +- [YAML anchors](yaml_optimization.md#yaml-anchors-for-scripts). + +CI/CD variables [are supported](../variables/where_variables_can_be_used.md#gitlab-ciyml-file). **Example of `hooks:pre_get_sources_script`**: @@ -2021,6 +2028,10 @@ job1: script: echo 'hello job1 script' ``` +**Related topics**: + +- [GitLab Runner configuration](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section) + ### `id_tokens` > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/356986) in GitLab 15.7.