Skip to content

Commit 6918db8

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 051d825 commit 6918db8

File tree

25 files changed

+232
-242
lines changed

25 files changed

+232
-242
lines changed

app/assets/javascripts/ci/mixins/pipeline_variables_permissions_mixin.js

-62
This file was deleted.

app/assets/javascripts/ci/pipeline_new/components/pipeline_new_form.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { createAlert } from '~/alert';
77
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
88
import SafeHtml from '~/vue_shared/directives/safe_html';
99
import PipelineInputsForm from '~/ci/common/pipeline_inputs/pipeline_inputs_form.vue';
10-
import PipelineVariablesPermissionsMixin from '~/ci/mixins/pipeline_variables_permissions_mixin';
1110
import createPipelineMutation from '../graphql/mutations/create_pipeline.mutation.graphql';
1211
import RefsDropdown from './refs_dropdown.vue';
1312
import PipelineVariablesForm from './pipeline_variables_form.vue';
@@ -38,9 +37,10 @@ export default {
3837
import('ee_component/vue_shared/components/pipeline_account_verification_alert.vue'),
3938
},
4039
directives: { SafeHtml },
41-
mixins: [glFeatureFlagsMixin(), PipelineVariablesPermissionsMixin],
40+
mixins: [glFeatureFlagsMixin()],
4241
inject: [
4342
'canViewPipelineEditor',
43+
'canSetPipelineVariables',
4444
'pipelineEditorPath',
4545
'pipelinesPath',
4646
'projectPath',
@@ -266,7 +266,7 @@ export default {
266266
@update-inputs="handleInputsUpdated"
267267
/>
268268
<pipeline-variables-form
269-
v-if="canViewPipelineVariables"
269+
v-if="canSetPipelineVariables"
270270
:file-params="fileParams"
271271
:is-maintainer="isMaintainer"
272272
:project-path="projectPath"

app/assets/javascripts/ci/pipeline_new/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const mountPipelineNewForm = (el) => {
1414
projectPath,
1515
projectRefsEndpoint,
1616
userRole,
17+
canSetPipelineVariables,
1718

1819
// props
1920
defaultBranch,
@@ -39,6 +40,7 @@ const mountPipelineNewForm = (el) => {
3940
apolloProvider,
4041
provide: {
4142
canViewPipelineEditor: parseBoolean(canViewPipelineEditor),
43+
canSetPipelineVariables: parseBoolean(canSetPipelineVariables),
4244
identityVerificationPath,
4345
// Normally this will have a value from a helper. In this case, this is
4446
// set to true because the alert that uses this field is dynamically

app/helpers/ci/pipelines_helper.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ def new_pipeline_data(project)
9090
project_refs_endpoint: refs_project_path(project, sort: 'updated_desc'),
9191
settings_link: project_settings_ci_cd_path(project),
9292
max_warnings: ::Gitlab::Ci::Warnings::MAX_LIMIT,
93-
user_role: project.team.human_max_access(current_user&.id)
93+
user_role: project.team.human_max_access(current_user&.id),
94+
can_set_pipeline_variables: Ability.allowed?(current_user, :set_pipeline_variables, project).to_s
9495
}
9596
end
9697

app/models/ci/resource_group.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ class ResourceGroup < Ci::ApplicationRecord
1717
enum process_mode: {
1818
unordered: 0,
1919
oldest_first: 1,
20-
newest_first: 2
20+
newest_first: 2,
21+
newest_ready_first: 3
2122
}
2223

2324
##
@@ -53,6 +54,9 @@ def upcoming_processables
5354
elsif newest_first?
5455
processables.waiting_for_resource_or_upcoming
5556
.order(Arel.sql("commit_id DESC, #{sort_by_job_status}"))
57+
elsif newest_ready_first?
58+
processables.waiting_for_resource
59+
.order(Arel.sql("commit_id DESC, #{sort_by_job_status}"))
5660
else
5761
Ci::Processable.none
5862
end

db/docs/batched_background_migrations/backfill_issue_email_participants_namespace_id.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ feature_category: service_desk
55
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/174506
66
milestone: '17.7'
77
queued_migration_version: 20241203075620
8-
finalized_by: # version of the migration that finalized this BBM
8+
finalized_by: '20250421231526'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# frozen_string_literal: true
2+
3+
class FinalizeHkBackfillIssueEmailParticipantsNamespaceId < Gitlab::Database::Migration[2.2]
4+
milestone '18.0'
5+
6+
disable_ddl_transaction!
7+
8+
restrict_gitlab_migration gitlab_schema: :gitlab_main_cell
9+
10+
def up
11+
ensure_batched_background_migration_is_finished(
12+
job_class_name: 'BackfillIssueEmailParticipantsNamespaceId',
13+
table_name: :issue_email_participants,
14+
column_name: :id,
15+
job_arguments: [:namespace_id, :issues, :namespace_id, :issue_id],
16+
finalize: true
17+
)
18+
end
19+
20+
def down; end
21+
end

db/schema_migrations/20250421231526

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ea58f13a7a8e80d42684aeec2795ee912687951bd58580658a720255564f7c78

doc/administration/settings/slack_app.md

+20
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,26 @@ To enable the GitLab for Slack app functionality, your network must allow inboun
136136
- For [Slack notifications](../../user/project/integrations/gitlab_slack_application.md#slack-notifications), the GitLab instance must be able to send requests to `https://slack.com`.
137137
- For [Slash commands](../../user/project/integrations/gitlab_slack_application.md#slash-commands) and other features, the GitLab instance must be able to receive requests from `https://slack.com`.
138138

139+
## Enable support for multiple workspaces
140+
141+
By default, you can [install the GitLab for Slack app](../../user/project/integrations/gitlab_slack_application.md#install-the-gitlab-for-slack-app) in only one Slack workspace.
142+
An administrator selects this workspace when they [create a GitLab for Slack app](#create-a-gitlab-for-slack-app).
143+
144+
To enable support for multiple Slack workspaces, you must configure the GitLab for Slack app
145+
as an [unlisted distributed app](https://api.slack.com/distribution#unlisted-distributed-apps).
146+
An unlisted distributed app:
147+
148+
- Is not published in the Slack App Directory.
149+
- Can only be used with your GitLab instance and not by other sites.
150+
151+
To configure the GitLab for Slack app as an unlisted distributed app:
152+
153+
1. Go to the [**Your Apps**](https://api.slack.com/apps) page on Slack and select your GitLab for Slack app.
154+
1. Select **Manage Distribution**.
155+
1. In the **Share Your App with Other Workspaces** section, expand **Remove Hard Coded Information**.
156+
1. Select the **I've reviewed and removed any hard-coded information** checkbox.
157+
1. Select **Activate Public Distribution**.
158+
139159
## Troubleshooting
140160

141161
When administering the GitLab for Slack app, you might encounter the following issues.

doc/api/openapi/openapi_v2.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -49771,6 +49771,7 @@ definitions:
4977149771
- unordered
4977249772
- oldest_first
4977349773
- newest_first
49774+
- newest_ready_first
4977449775
description: Edit an existing resource group
4977549776
postApiV4ProjectsIdRunners:
4977649777
type: object

doc/api/resource_groups.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ PUT /projects/:id/resource_groups/:key
178178
| --------------- | ------- | --------------------------------- | ------------------------------- |
179179
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/_index.md#namespaced-paths) |
180180
| `key` | string | yes |The URL-encoded key of the resource group. For example, use `resource%5Fa` instead of `resource_a`. |
181-
| `process_mode` | string | no | The process mode of the resource group. One of `unordered`, `oldest_first` or `newest_first`. Read [process modes](../ci/resource_groups/_index.md#process-modes) for more information. |
181+
| `process_mode` | string | no | The process mode of the resource group. One of `unordered`, `oldest_first`, `newest_first`, or `newest_ready_first`. Read [process modes](../ci/resource_groups/_index.md#process-modes) for more information. |
182182

183183
```shell
184184
curl --request PUT --data "process_mode=oldest_first" \

doc/ci/resource_groups/_index.md

+10
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ The following modes are supported:
9090
prevent all of the old deploy jobs with the [prevent outdated deployment jobs](../environments/deployment_safety.md#prevent-outdated-deployment-jobs) feature.
9191
This is the most efficient option in terms of the pipeline efficiency, but you must ensure that each deployment job is idempotent.
9292

93+
- **Newest ready first:** This process mode limits concurrency on jobs, but less than plain newest_first.
94+
When a resource is free, it picks the first job from the list of upcoming jobs that are waiting on this resource.
95+
This list of jobs is sorted by pipeline ID in descending order like above.
96+
97+
This mode is best for those who might want to continuously deploy, but deploy merge often enough that
98+
newest_first can lead to situations when no deploys between merges. It can be faster than newest_first, but
99+
carries with it a risk that a job that might be skipped in newest_first would be run, so ensuring
100+
deploys are idempotent is of even greater importance.
101+
93102
### Change the process mode
94103

95104
To change the process mode of a resource group, you must use the API and
@@ -99,6 +108,7 @@ by specifying the `process_mode`:
99108
- `unordered`
100109
- `oldest_first`
101110
- `newest_first`
111+
- `newest_ready_first`
102112

103113
### An example of difference between the process modes
104114

doc/development/ai_features/duo_chat.md

+86
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,30 @@ adding new tools can expand the capabilities of the Chat feature.
206206

207207
There are available short [videos](https://www.youtube.com/playlist?list=PL05JrBw4t0KoOK-bm_bwfHaOv-1cveh8i) covering this topic.
208208

209+
### Working with multi-thread conversation
210+
211+
If you're building features that interact with Duo Chat conversations, you need to understand how threads work.
212+
213+
Duo Chat supports multiple conversations. Each conversation is represented by a thread, which contains multiple messages. The important attributes of a thread are:
214+
215+
- `id`: The `id` is required when replying to a thread.
216+
- `conversation_type`: This allows for distinguishing between the different available Duo Chat conversation types. See the [thread conversation types list](../../api/graphql/reference/_index.md#aiconversationsthreadsconversationtype).
217+
- If your feature needs its own conversation type, please contact the Duo Chat team.
218+
219+
If your feature requires calling GraphQL API directly, the following queries and mutations are available, for which you **must** specify the `conversation_type`.
220+
221+
- [Query.aiConversationThreads](../../api/graphql/reference/_index.md#queryaiconversationthreads): lists threads
222+
- [Query.aiMessages](../../api/graphql/reference/_index.md#queryaimessages): lists one thread's messages. **Must** specify `threadId`.
223+
- [Mutation.aiAction](../../api/graphql/reference/_index.md#mutationaiaction): creates one message. If `threadId` is specified the message is appended into that thread.
224+
225+
All chat conversations have a retention period, controlled by the admin. The default retention period is 30 days after last reply.
226+
227+
- [Configure Duo Chat Conversation Expiration](../../user/gitlab_duo_chat/_index.md#configure-chat-conversation-expiration)
228+
229+
### Developer Resources
230+
231+
- [Example GraphQL Queries](#duo-chat-conversation-threads-graphql-queries) - See examples below in this document
232+
209233
## Debugging
210234

211235
To gather more insights about the full request, use the `Gitlab::Llm::Logger` file to debug logs.
@@ -432,6 +456,68 @@ If you can't fetch the response, check `graphql_json.log`,
432456
`sidekiq_json.log`, `llm.log` or `modelgateway_debug.log` if it contains error
433457
information.
434458
459+
### Duo Chat Conversation Threads GraphQL queries
460+
461+
#### Querying messages in a conversation thread
462+
463+
To retrieve messages from a specific thread, use the `aiMessages` query with a thread ID:
464+
465+
```graphql
466+
query {
467+
aiMessages(threadId: "gid://gitlab/Ai::Conversation::Thread/1") {
468+
nodes {
469+
requestId
470+
content
471+
role
472+
timestamp
473+
chunkId
474+
errors
475+
}
476+
}
477+
}
478+
```
479+
480+
#### Starting a new conversation thread
481+
482+
If you don't include a threadId in your aiAction mutation, a new thread will be created:
483+
484+
```graphql
485+
mutation {
486+
aiAction(input: {
487+
chat: {
488+
content: "This will create a new conversation thread"
489+
},
490+
conversationType: DUO_CHAT
491+
})
492+
{
493+
requestId
494+
errors
495+
threadId # This will contain the ID of the newly created thread
496+
}
497+
}
498+
```
499+
500+
#### Creating a new message in an existing conversation thread
501+
502+
To add a message to an existing thread, include the threadId in your aiAction mutation:
503+
504+
```graphql
505+
mutation {
506+
aiAction(input: {
507+
chat: {
508+
content: "this is another message in the same thread"
509+
},
510+
conversationType: DUO_CHAT,
511+
threadId: "gid://gitlab/Ai::Conversation::Thread/1",
512+
})
513+
{
514+
requestId
515+
errors
516+
threadId
517+
}
518+
}
519+
```
520+
435521
## Testing GitLab Duo Chat in production-like environments
436522
437523
GitLab Duo Chat is enabled in the [Staging](https://staging.gitlab.com/users/sign_in) and

doc/integration/exact_code_search/zoekt.md

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ title: Zoekt
2525

2626
This feature is in [beta](../../policy/development_stages_support.md#beta) and subject to change without notice.
2727
For more information, see [epic 9404](https://gitlab.com/groups/gitlab-org/-/epics/9404).
28+
To provide feedback on this feature, leave a comment on
29+
[issue 420920](https://gitlab.com/gitlab-org/gitlab/-/issues/420920).
2830

2931
{{< /alert >}}
3032

doc/integration/jira/connect-app.md

+21
Original file line numberDiff line numberDiff line change
@@ -341,3 +341,24 @@ A `403 Forbidden` is returned if the user information cannot be fetched from Jir
341341

342342
To resolve this issue, ensure you meet certain
343343
[Jira user requirements](../../administration/settings/jira_cloud_app.md#jira-user-requirements).
344+
345+
### Jira Code does not work after linking to a GitLab group
346+
347+
[Jira Code](https://support.atlassian.com/jira-software-cloud/docs/enable-code/) might not work after you
348+
[link the GitLab for Jira Cloud app to a GitLab group](#configure-the-gitlab-for-jira-cloud-app).
349+
To resolve this issue, you must configure both Bitbucket and Jira.
350+
351+
In Bitbucket:
352+
353+
1. Sign in to your Atlassian account.
354+
1. Create and enter a name for your workspace.
355+
356+
In Jira:
357+
358+
1. In **Projects**, select your project.
359+
1. Select **Development > Code**.
360+
1. Select **Connect Bitbucket > Link Bitbucket Cloud workspace**.
361+
1. Select the workspace you created in Bitbucket.
362+
1. Select **Grant access**.
363+
364+
Your repositories should now appear in Jira Code.

doc/user/compliance/compliance_center/compliance_status_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ title: Compliance status report
1414

1515
{{< history >}}
1616

17-
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/186525) in GitLab 17.11 [with a flag](../../../administration/feature_flags.md) named `enable_standards_adherence_dashboard_v2`. Disabled by default.
17+
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/186525) in GitLab 17.11 [with a flag](../../../administration/feature_flags.md) named `enable_standards_adherence_dashboard_v2`. Enabled by default.
1818

1919
{{< /history >}}
2020

0 commit comments

Comments
 (0)