Skip to content

Commit a676796

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent d7f87de commit a676796

File tree

54 files changed

+404
-31
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+404
-31
lines changed

Diff for: .gitlab/ci/includes/gitlab-com/danger-review.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include:
22
- project: gitlab-org/quality/pipeline-common
3-
ref: 8.5.0
3+
ref: 8.5.1
44
file:
55
- /ci/danger-review.yml
66

Diff for: AI_GATEWAY_VERSION

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

Diff for: app/assets/images/bot_avatars/security-bot.png

9.34 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_120.png

7.96 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_16.png

775 Bytes
Loading

Diff for: app/assets/images/bot_avatars/security-bot_160.png

11 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_20.png

973 Bytes
Loading

Diff for: app/assets/images/bot_avatars/security-bot_23.png

1.09 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_24.png

1.14 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_26.png

1.28 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_32.png

1.67 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_36.png

1.86 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_38.png

2.04 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_40.png

2.17 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_48.png

2.67 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_60.png

3.6 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_64.png

3.85 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_90.png

5.88 KB
Loading

Diff for: app/assets/images/bot_avatars/security-bot_96.png

6.23 KB
Loading

Diff for: app/assets/javascripts/graphql_shared/possible_types.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
"InstanceExternalAuditEventDestination"
5757
],
5858
"AuditEventStreamingDestinationInterface": [
59-
"GroupAuditEventStreamingDestination"
59+
"GroupAuditEventStreamingDestination",
60+
"InstanceAuditEventStreamingDestination"
6061
],
6162
"GoogleCloudArtifactRegistryArtifact": [
6263
"GoogleCloudArtifactRegistryDockerImage"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { initToggle } from '~/toggles';
2+
3+
/**
4+
* Uses a toggle element in combination with a hidden field
5+
* to force submit a form that updates the settings.
6+
*
7+
* Unlike other settings in this page, updating this setting uses
8+
* a full page refresh (submit). This is done to avoid adding
9+
* `allow_runner_registration_token` to any API as this setting
10+
* is discouraged.
11+
*/
12+
export const initAllowRunnerRegistrationTokenToggle = () => {
13+
const el = document.querySelector('.js-allow-runner-registration-token-toggle');
14+
const input = document.querySelector('.js-allow-runner-registration-token-input');
15+
16+
if (el && input) {
17+
const toggle = initToggle(el);
18+
19+
toggle.$on('change', (isEnabled) => {
20+
input.value = isEnabled;
21+
22+
toggle.isLoading = true;
23+
24+
toggle.$el.closest('form').requestSubmit();
25+
});
26+
return toggle;
27+
}
28+
29+
return null;
30+
};

Diff for: app/assets/javascripts/issues/dashboard/components/issues_dashboard_app.vue

-1
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,6 @@ export default {
529529
<gl-empty-state
530530
:description="emptyStateDescription"
531531
:svg-path="emptyStateSvgPath"
532-
:svg-height="150"
533532
:title="emptyStateTitle"
534533
/>
535534
</template>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import initStaleRunnerCleanupSetting from 'ee_else_ce/group_settings/stale_runner_cleanup';
2+
import { initAllowRunnerRegistrationTokenToggle } from '~/group_settings/allow_runner_registration_token_toggle';
3+
24
import initVariableList from '~/ci/ci_variable_list';
35
import initSharedRunnersForm from '~/group_settings/mount_shared_runners';
46
import initSettingsPanels from '~/settings_panels';
@@ -7,7 +9,7 @@ import initDeployTokens from '~/deploy_tokens';
79
// Initialize expandable settings panels
810
initSettingsPanels();
911
initDeployTokens();
10-
12+
initAllowRunnerRegistrationTokenToggle();
1113
initSharedRunnersForm();
1214
initStaleRunnerCleanupSetting();
1315
initVariableList();

Diff for: app/assets/javascripts/projects/settings/branch_rules/components/view/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ export default {
351351
@submitted="$apollo.queries.project.refetch()"
352352
>
353353
<template #rules>
354-
<project-rules />
354+
<project-rules :is-branch-rules-edit="true" />
355355
</template>
356356
</approval-rules-app>
357357
</template>

Diff for: app/controllers/groups/settings/ci_cd_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def update_group_service
7979
end
8080

8181
def update_group_params
82-
params.require(:group).permit(:max_artifacts_size)
82+
params.require(:group).permit(:max_artifacts_size, :allow_runner_registration_token)
8383
end
8484

8585
# Overridden in EE

Diff for: app/helpers/issues_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def dashboard_issues_list_data(current_user)
207207
dashboard_labels_path: dashboard_labels_path(format: :json, include_ancestor_groups: true),
208208
dashboard_milestones_path: dashboard_milestones_path(format: :json),
209209
empty_state_with_filter_svg_path: image_path('illustrations/empty-state/empty-issues-md.svg'),
210-
empty_state_without_filter_svg_path: image_path('illustrations/issue-dashboard_results-without-filter.svg'),
210+
empty_state_without_filter_svg_path: image_path('illustrations/empty-state/empty-search-md.svg'),
211211
has_issue_date_filter_feature: Feature.enabled?(:issue_date_filter, current_user).to_s,
212212
initial_sort: current_user&.user_preference&.issues_sort,
213213
is_public_visibility_restricted:

Diff for: app/models/concerns/avatarable.rb

+4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ def avatar_path(only_path: true, size: nil)
6161
return uncached_avatar_path(only_path: only_path, size: size)
6262
end
6363

64+
if self.try(:static_avatar_path?)
65+
return self.static_avatar_path(size)
66+
end
67+
6468
# Cache this avatar path only within the request because avatars in
6569
# object storage may be generated with time-limited, signed URLs.
6670
key = "#{self.class.name}:#{self.id}:#{only_path}:#{size}"

Diff for: app/views/groups/runners/_settings.html.haml

+10
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,13 @@
33
- if @group.licensed_feature_available?(:stale_runner_cleanup_for_namespace)
44
.gl-mb-5
55
#stale-runner-cleanup-form{ data: { group_full_path: @group.full_path, stale_timeout_secs: ::Ci::Runner::STALE_TIMEOUT.to_i } }
6+
7+
- if @group.root? && Gitlab::CurrentSettings.allow_runner_registration_token
8+
-# Only available to top-level groups when the registration token is available in the instance
9+
.gl-mb-5
10+
= gitlab_ui_form_for @group, url: group_settings_ci_cd_path(@group, anchor: 'runners-settings') do |f|
11+
= f.hidden_field :allow_runner_registration_token, class: 'js-allow-runner-registration-token-input', value: @group.allow_runner_registration_token?
12+
= render Pajamas::ToggleComponent.new(classes: 'js-allow-runner-registration-token-toggle',
13+
label: s_("GroupSettings|Allow members of projects and groups to create runners with runner registration tokens"),
14+
is_checked: @group.allow_runner_registration_token?) do
15+
= s_("GroupSettings|When disabled, members will not be able to register runners using runner registration tokens. They can instead use runner authentication tokens as a more secure runner registration method.")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
migration_job_name: FixCorruptedScannerIdsOfVulnerabilityReads
3+
description: >-
4+
There was a bug in production where the scanner_id of a
5+
vulnerability finding would be updated, yet the scanner_id of the
6+
related vulnerability_read would remain unchanged. This is an issue
7+
as the vulnerability_read should always be in sync with the
8+
vulnerability finding.
9+
10+
The bug has been fixed in production. This
11+
migration finds any vulnerability_reads with a scanner_id mismatch
12+
with the vulnerability_occurrence. It updates the vulnerability_read
13+
to have the value from the vulnerability_occurrence
14+
feature_category: vulnerability_management
15+
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/148807
16+
milestone: '16.11'
17+
queued_migration_version: 20240409023046
18+
# Replace with the approximate date you think it's best to ensure the completion of this BBM.
19+
finalize_after: '2024-05-01'

Diff for: db/docs/zoekt_nodes.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ feature_categories:
77
description: Describes a Zoekt server that will be used for indexing and search for some configured namespaces
88
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134901
99
milestone: '16.6'
10-
gitlab_schema: gitlab_main
10+
gitlab_schema: gitlab_main_cell
11+
exempt_from_sharding: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# frozen_string_literal: true
2+
3+
class QueueFixCorruptedScannerIdsOfVulnerabilityReads < Gitlab::Database::Migration[2.2]
4+
milestone '16.11'
5+
6+
MIGRATION = "FixCorruptedScannerIdsOfVulnerabilityReads"
7+
DELAY_INTERVAL = 2.minutes
8+
BATCH_SIZE = 1000
9+
SUB_BATCH_SIZE = 100
10+
11+
disable_ddl_transaction!
12+
restrict_gitlab_migration gitlab_schema: :gitlab_main
13+
14+
def up
15+
queue_batched_background_migration(
16+
MIGRATION,
17+
:vulnerability_reads,
18+
:id,
19+
job_interval: DELAY_INTERVAL,
20+
batch_size: BATCH_SIZE,
21+
sub_batch_size: SUB_BATCH_SIZE
22+
)
23+
end
24+
25+
def down
26+
delete_batched_background_migration(MIGRATION, :vulnerability_reads, :id, [])
27+
end
28+
end

Diff for: db/schema_migrations/20240409023046

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

Diff for: doc/administration/audit_event_types.md

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Audit event types belong to the following product categories.
6060
| [`create_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74632) | Event triggered when an external audit event destination is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.6](https://gitlab.com/gitlab-org/gitlab/-/issues/344664) | Group |
6161
| [`create_group_audit_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/147888) | Event triggered when an external audit event destination for a top-level group is created.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.11](https://gitlab.com/gitlab-org/gitlab/-/issues/436610) | Group |
6262
| [`create_http_namespace_filter`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136047) | Event triggered when a namespace filter for an external audit event destination for a top-level group is created.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.6](https://gitlab.com/gitlab-org/gitlab/-/issues/424176) | Group |
63+
| [`create_instance_audit_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/148383) | Event triggered when an external audit event destination for a GitLab instance is created.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.11](https://gitlab.com/gitlab-org/gitlab/-/issues/436615) | Instance |
6364
| [`create_instance_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/123882) | Event triggered when an instance level external audit event destination is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.2](https://gitlab.com/gitlab-org/gitlab/-/issues/404730) | Instance |
6465
| [`delete_http_namespace_filter`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136302) | Event triggered when a namespace filter for an external audit event destination for a top-level group is deleted.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.7](https://gitlab.com/gitlab-org/gitlab/-/issues/424177) | Group |
6566
| [`destroy_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74632) | Event triggered when an external audit event destination is deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.6](https://gitlab.com/gitlab-org/gitlab/-/issues/344664) | Group |

Diff for: doc/api/graphql/reference/index.md

+40
Original file line numberDiff line numberDiff line change
@@ -4950,6 +4950,32 @@ Input type: `HttpIntegrationUpdateInput`
49504950
| <a id="mutationhttpintegrationupdateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
49514951
| <a id="mutationhttpintegrationupdateintegration"></a>`integration` | [`AlertManagementHttpIntegration`](#alertmanagementhttpintegration) | HTTP integration. |
49524952

4953+
### `Mutation.instanceAuditEventStreamingDestinationsCreate`
4954+
4955+
DETAILS:
4956+
**Introduced** in GitLab 16.11.
4957+
**Status**: Experiment.
4958+
4959+
Input type: `InstanceAuditEventStreamingDestinationsCreateInput`
4960+
4961+
#### Arguments
4962+
4963+
| Name | Type | Description |
4964+
| ---- | ---- | ----------- |
4965+
| <a id="mutationinstanceauditeventstreamingdestinationscreatecategory"></a>`category` | [`String!`](#string) | Destination category. |
4966+
| <a id="mutationinstanceauditeventstreamingdestinationscreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
4967+
| <a id="mutationinstanceauditeventstreamingdestinationscreateconfig"></a>`config` | [`JSON!`](#json) | Destination config. |
4968+
| <a id="mutationinstanceauditeventstreamingdestinationscreatename"></a>`name` | [`String`](#string) | Destination name. |
4969+
| <a id="mutationinstanceauditeventstreamingdestinationscreatesecrettoken"></a>`secretToken` | [`String!`](#string) | Secret token. |
4970+
4971+
#### Fields
4972+
4973+
| Name | Type | Description |
4974+
| ---- | ---- | ----------- |
4975+
| <a id="mutationinstanceauditeventstreamingdestinationscreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
4976+
| <a id="mutationinstanceauditeventstreamingdestinationscreateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
4977+
| <a id="mutationinstanceauditeventstreamingdestinationscreateexternalauditeventdestination"></a>`externalAuditEventDestination` | [`InstanceAuditEventStreamingDestination`](#instanceauditeventstreamingdestination) | Destination created. |
4978+
49534979
### `Mutation.instanceExternalAuditEventDestinationCreate`
49544980

49554981
Input type: `InstanceExternalAuditEventDestinationCreateInput`
@@ -21984,6 +22010,19 @@ Stores instance level Amazon S3 configurations for audit event streaming.
2198422010
| <a id="instanceamazons3configurationtypeid"></a>`id` | [`ID!`](#id) | ID of the configuration. |
2198522011
| <a id="instanceamazons3configurationtypename"></a>`name` | [`String!`](#string) | Name of the external destination to send audit events to. |
2198622012

22013+
### `InstanceAuditEventStreamingDestination`
22014+
22015+
Represents an external destination to stream instance level audit events.
22016+
22017+
#### Fields
22018+
22019+
| Name | Type | Description |
22020+
| ---- | ---- | ----------- |
22021+
| <a id="instanceauditeventstreamingdestinationcategory"></a>`category` | [`String!`](#string) | Category of the external destination to send audit events to. |
22022+
| <a id="instanceauditeventstreamingdestinationconfig"></a>`config` | [`JSON!`](#json) | Config of the external destination. |
22023+
| <a id="instanceauditeventstreamingdestinationid"></a>`id` | [`ID!`](#id) | ID of the destination. |
22024+
| <a id="instanceauditeventstreamingdestinationname"></a>`name` | [`String!`](#string) | Name of the external destination to send audit events to. |
22025+
2198722026
### `InstanceExternalAuditEventDestination`
2198822027

2198922028
Represents an external resource to send instance audit events to.
@@ -34908,6 +34947,7 @@ Implementations:
3490834947
Implementations:
3490934948

3491034949
- [`GroupAuditEventStreamingDestination`](#groupauditeventstreamingdestination)
34950+
- [`InstanceAuditEventStreamingDestination`](#instanceauditeventstreamingdestination)
3491134951

3491234952
##### Fields
3491334953

Diff for: doc/architecture/blueprints/ai_gateway/index.md

+57
Original file line numberDiff line numberDiff line change
@@ -558,3 +558,60 @@ Alternative solutions were discussed in
558558
## Decisions
559559

560560
- [ADR-001: Allow direct connections](decisions/001_direct_connections.md)
561+
562+
## Future work
563+
564+
AI Gateway aim is to become the primary method for the monolith to **access** machine learning models across all usages of GitLab and create a consistent user journey when developing AI-backed features. To do so, these goal is split down into three categories:
565+
566+
- Centralized Access Through AI Gateway
567+
- Self Managed AI Gateway
568+
- Unit Primitives
569+
570+
### Centralized Access Through AI Gateway
571+
572+
The AI Gateway, a standalone service, is the sole access point for all communication between GitLab installations and third-party AI models. It is designed to centralize and manage access to all GitLab features, whether they are in-app functionalities or code suggestions, irrespective of their deployment methods.
573+
574+
This strategy significantly simplifies enterprise management and abstracts machine learning away from the monolith. With future expansions including telemetry, embeddings API, and multi-region/customer-specific deployments, our goal is to provide a scalable, comprehensive AI solution for all GitLab users, regardless of their installation type.
575+
576+
[Model registry](../../../user/project/ml/model_registry/index.md) is a feature that allows users to use GitLab to manage the machine learning models. While not solely focused on large language models, and currently more targeted at smaller model applications, which could be deployed in various ways: as a standalone library, a service, a pod, a cloud deployment, and so forth. For these user-deployed models, the ability to auto-configure an API that's accessible through the AI Gateway could be a significant feature.
577+
578+
- [AI Gateway as the Sole Access Point for Monolith to Access Models](https://gitlab.com/groups/gitlab-org/-/epics/13024)
579+
580+
### Unit Primitives
581+
582+
Unit Primitives are a fundamental part of our strategy for managing access to AI features through the AI Gateway. They represent the smallest unit of functionality that can be accessed and managed through the Gateway. This approach provides a more granular control over the functionalities exposed through the AI Gateway and simplifies the management of AI features. It also paves the way for future work on supporting user-deployed models and locally hosted models. From a business perspective, unit primitives are the smallest pieces that may be shuffled across various tiers or packaging models, providing flexibility and adaptability in our offerings.
583+
584+
In the initial iteration, we will support two primitives: Code Suggestions and Chat. The latter will encompass all Chat features in one primitive.
585+
586+
In the next iteration, we plan to decompose the Chat primitive into multiple primitives based on top-level tools. This work is dependent on the completion of the task to move classification into the AI Gateway.
587+
588+
The introduction of Unit Primitives will simplify the management of AI features and provide a more granular control over the functionalities exposed through the AI Gateway. This will also pave the way for future work on supporting user-deployed models and locally hosted models.
589+
590+
For more details, refer to the [Initial Set of Unit Primitives](https://gitlab.com/gitlab-org/gitlab/-/issues/444934) issue.
591+
592+
- [Unit Primitives for Accessing CC Features](https://gitlab.com/groups/gitlab-org/-/epics/12556)
593+
594+
### Self Managed AI Gateway
595+
596+
Self-managed instances can either use GitLab-hosted AI Gateway or have their own AI Gateway if they want to use self-deployed models, with Runway likely being the deployment method. This means part of our work will be to ensure that the AI Gateway can be deployed in a self-managed environment. This work will go hand-in-hand with the work to support locally hosted models (local inference) in support of GitLab AI features.
597+
598+
- [Self Managed AI Gateway](https://gitlab.com/groups/gitlab-org/-/epics/13162)
599+
600+
## Other components in the AI stack
601+
602+
While AI Gateway centralizes _access_ to AI features and models, it interacts with other components to help users achieve their goals:
603+
604+
- AI Agents: create and manage agents and prompts
605+
- Model registry: manage and deployment machine learning models
606+
607+
### Model registry
608+
609+
[Model registry](../../../user/project/ml/model_registry/index.md) is a feature that allows users to use GitLab to manage the machine learning models. While not solely focused on large language models, and currently more targeted at smaller model applications, which could be deployed in various ways: as a standalone library, a service, a pod, a cloud deployment, and so forth. For these user-deployed models, the ability to auto-configure an API that's accessible through the AI Gateway could be a significant feature.
610+
611+
### AI Agents
612+
613+
[AI Agents](https://gitlab.com/groups/gitlab-org/-/epics/12330) is a feature that allows users to implement and manage their own chats and AI features, managing prompts, models and tools. Development is currently in its early stages. Once mature, we intend to move GitLab feature to agents, but there are blockers that currently prevent us from doing so:
614+
615+
- [Lack of prompt templating](https://gitlab.com/gitlab-org/gitlab/-/issues/441081).
616+
- Implement replication of user-defined prompts into ai-gateway.
617+
- Implement replication of GitLab-defined prompts into self-managed installations (e.g., organization-level agents where we prepopulate with a few agents).

0 commit comments

Comments
 (0)