From 9297025d0b7ddf095eb618dfaaab2ff8f2018d8b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 19 Dec 2023 11:01:45 +0000 Subject: Add latest changes from gitlab-org/gitlab@16-7-stable-ee --- doc/ci/resource_groups/index.md | 48 +++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 16 deletions(-) (limited to 'doc/ci/resource_groups') diff --git a/doc/ci/resource_groups/index.md b/doc/ci/resource_groups/index.md index bf41d325ac2..b7b9c216b14 100644 --- a/doc/ci/resource_groups/index.md +++ b/doc/ci/resource_groups/index.md @@ -1,7 +1,7 @@ --- stage: Deploy group: Environments -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments description: Control the job concurrency in GitLab CI/CD --- @@ -259,33 +259,40 @@ Sometimes, a job hangs with the message `Waiting for resource: ` first check that the resource group is working correctly: 1. Go to the job details page. -1. Select **View job currently using resource**. -1. Check the job status: - - If the status is `running` or `pending`, the feature is working correctly. Wait until the job finishes and releases the resource. - - If the status is `created` and the [process mode](#process-modes) is either **Oldest first** or **Newest first**, the feature is working correctly. +1. If the resource is assigned to a job, select **View job currently using resource** and check the job status. + + - If the status is `running` or `pending`, the feature is working correctly. Wait until the job finishes and releases the resource. + - If the status is `created` and the [process mode](#process-modes) is either **Oldest first** or **Newest first**, the feature is working correctly. Visit the pipeline page of the job and check which upstream stage or job is blocking the execution. - - If none of the above conditions are met, the feature might not be working correctly. - [Open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new) with the following information: - - The job ID. - - The job status. - - How often the problem occurs. - - Steps to reproduce the problem. + - If none of the above conditions are met, the feature might not be working correctly. [Report the issue to GitLab](#report-an-issue). + +1. If **View job currently using resource** is not available, the resource is not assigned to a job. Instead, check the resource's upcoming jobs. + + 1. Get the resource's upcoming jobs with the [REST API](../../api/resource_groups.md#list-upcoming-jobs-for-a-specific-resource-group). + 1. Verify that the job's [process mode](#process-modes) is **Oldest first**. + 1. Find the first job in the list of upcoming jobs, and get the job details [with GraphQL](#get-job-details-through-graphql). + 1. If the first job's pipeline is an older pipeline, try to cancel the pipeline or the job itself. + 1. Optional. Repeat this process if the next upcoming job is still in an older pipeline that should no longer run. + 1. If the problem persists, [report the issue to GitLab](#report-an-issue). + +#### Get job details through GraphQL -You can also get job information from the GraphQL API. You should use the GraphQL API if you use [pipeline-level concurrency control with cross-project/parent-child pipelines](#pipeline-level-concurrency-control-with-cross-projectparent-child-pipelines) because the trigger jobs are not accessible from the UI. +You can get job information from the GraphQL API. You should use the GraphQL API if you use [pipeline-level concurrency control with cross-project/parent-child pipelines](#pipeline-level-concurrency-control-with-cross-projectparent-child-pipelines) because the trigger jobs are not accessible from the UI. To get job information from the GraphQL API: 1. Go to the pipeline details page. 1. Select the **Jobs** tab and find the ID of the stuck job. -1. Go to [GraphiQL explorer](../../api/graphql/index.md#graphiql). +1. Go to the [interactive GraphQL explorer](../../api/graphql/index.md#interactive-graphql-explorer). 1. Run the following query: ```graphql { project(fullPath: "") { name - job(id: "gid://gitlab/Ci::Bridge/") { + job(id: "gid://gitlab/Ci::Build/") { name + status detailedStatus { action { path @@ -305,7 +312,7 @@ To get job information from the GraphQL API: { project(fullPath: "") { name - job(id: "gid://gitlab/Ci::Bridge/") { + job(id: "gid://gitlab/Ci::Build/") { name status pipeline { @@ -316,4 +323,13 @@ To get job information from the GraphQL API: } ``` - If the status is not `running` or `pending`, [open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new) and [contact support](https://about.gitlab.com/support/#contact-support) so they can apply the correct labels to the issue. +### Report an issue + +[Open a new issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new) with the following information: + +- The ID of the affected job. +- The job status. +- How often the problem occurs. +- Steps to reproduce the problem. + + You can also [contact support](https://about.gitlab.com/support/#contact-support) for further assistance, or to get in touch with the development team. -- cgit v1.2.3