Skip to content

Commit 57ed4c5

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 8ebd99a commit 57ed4c5

File tree

57 files changed

+672
-503
lines changed

Some content is hidden

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

57 files changed

+672
-503
lines changed

.gitlab/ci/rails.gitlab-ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ rspec-ee unit clickhouse:
305305
- .rspec-base-pg14-clickhouse23
306306
- .rails:rules:clickhouse-changes
307307

308-
gitlab:clickhouse:rollback:
308+
gitlab:clickhouse:rollback:main:
309309
extends:
310310
- .rspec-base
311311
- .production # Disable webmock from test environment
@@ -317,7 +317,7 @@ gitlab:clickhouse:rollback:
317317
- 'sed -i "s|test:$|production:|g" config/click_house.yml'
318318
- !reference [.base-script, script]
319319
- bundle exec rake gitlab:clickhouse:migrate &&
320-
bundle exec rake gitlab:clickhouse:rollback VERSION=0
320+
bundle exec rake gitlab:clickhouse:rollback:main VERSION=0
321321

322322
gitlab:setup:
323323
extends: .db-job-base

GITALY_SERVER_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fd52f0c5d44c30584f934ea7774d4024654b63a3
1+
2893c46338b2d070bfd8559d09e6c781131fb27f

app/assets/javascripts/ml/model_registry/apps/index_ml_models.vue

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import Pagination from '~/vue_shared/components/incubation/pagination.vue';
55
import MetadataItem from '~/vue_shared/components/registry/metadata_item.vue';
66
import TitleArea from '~/vue_shared/components/registry/title_area.vue';
77
import { helpPagePath } from '~/helpers/help_page_helper';
8+
import EmptyState from '../components/empty_state.vue';
89
import * as i18n from '../translations';
9-
import { BASE_SORT_FIELDS } from '../constants';
10+
import { BASE_SORT_FIELDS, MODEL_ENTITIES } from '../constants';
1011
import SearchBar from '../components/search_bar.vue';
1112
import ModelRow from '../components/model_row.vue';
1213
@@ -19,6 +20,7 @@ export default {
1920
MetadataItem,
2021
TitleArea,
2122
GlBadge,
23+
EmptyState,
2224
},
2325
props: {
2426
models: {
@@ -43,6 +45,7 @@ export default {
4345
i18n,
4446
sortableFields: BASE_SORT_FIELDS,
4547
docHref: helpPagePath('user/project/ml/model_registry/index.md'),
48+
modelEntity: MODEL_ENTITIES.model,
4649
};
4750
</script>
4851

@@ -67,6 +70,6 @@ export default {
6770
<pagination v-bind="pageInfo" />
6871
</template>
6972

70-
<p v-else class="gl-text-secondary">{{ $options.i18n.NO_MODELS_LABEL }}</p>
73+
<empty-state v-else :entity-type="$options.modelEntity" />
7174
</div>
7275
</template>

app/assets/javascripts/ml/model_registry/apps/show_ml_model.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ import { GlTab, GlTabs, GlBadge } from '@gitlab/ui';
33
import MetadataItem from '~/vue_shared/components/registry/metadata_item.vue';
44
import TitleArea from '~/vue_shared/components/registry/title_area.vue';
55
import ModelVersionDetail from '~/ml/model_registry/components/model_version_detail.vue';
6+
import { MODEL_ENTITIES } from '~/ml/model_registry/constants';
7+
import EmptyState from '../components/empty_state.vue';
68
import * as i18n from '../translations';
79
810
export default {
911
name: 'ShowMlModelApp',
1012
components: {
1113
ModelVersionList: () => import('../components/model_version_list.vue'),
1214
CandidateList: () => import('../components/candidate_list.vue'),
15+
EmptyState,
1316
TitleArea,
1417
GlTabs,
1518
GlTab,
@@ -35,6 +38,7 @@ export default {
3538
},
3639
},
3740
i18n,
41+
modelVersionEntity: MODEL_ENTITIES.modelVersion,
3842
};
3943
</script>
4044

@@ -59,7 +63,8 @@ export default {
5963
<h3 class="gl-font-lg">{{ latestVersionTitle }}</h3>
6064
<model-version-detail :model-version="model.latestVersion" />
6165
</template>
62-
<div v-else class="gl-text-secondary">{{ $options.i18n.NO_VERSIONS_LABEL }}</div>
66+
67+
<empty-state v-else :entity-type="$options.modelVersionEntity" />
6368
</gl-tab>
6469
<gl-tab>
6570
<template #title>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<script>
2+
import { GlEmptyState } from '@gitlab/ui';
3+
import emptySvgUrl from '@gitlab/svgs/dist/illustrations/empty-state/empty-dag-md.svg?url';
4+
import { helpPagePath } from '~/helpers/help_page_helper';
5+
import { s__ } from '~/locale';
6+
import { MODEL_ENTITIES } from '../constants';
7+
8+
const emptyStateTranslations = {
9+
[MODEL_ENTITIES.model]: {
10+
title: s__('MlModelRegistry|Start tracking your machine learning models'),
11+
description: s__('MlModelRegistry|Store and manage your machine learning models and versions'),
12+
createNew: s__('MlModelRegistry|Add a model'),
13+
},
14+
[MODEL_ENTITIES.modelVersion]: {
15+
title: s__('MlModelRegistry|Manage versions of your machine learning model'),
16+
description: s__('MlModelRegistry|Use versions to track performance, parameters, and metadata'),
17+
createNew: s__('MlModelRegistry|Create a model version'),
18+
},
19+
};
20+
21+
export default {
22+
components: {
23+
GlEmptyState,
24+
},
25+
props: {
26+
entityType: {
27+
type: String,
28+
required: true,
29+
validator(value) {
30+
return MODEL_ENTITIES[value] !== undefined;
31+
},
32+
},
33+
},
34+
computed: {
35+
emptyStateValues() {
36+
return {
37+
...emptyStateTranslations[this.entityType],
38+
helpPath: helpPagePath('user/project/ml/model_registry/index', {
39+
anchor: 'creating-machine-learning-models-and-model-versions',
40+
}),
41+
emptySvgPath: emptySvgUrl,
42+
};
43+
},
44+
},
45+
};
46+
</script>
47+
48+
<template>
49+
<gl-empty-state
50+
:title="emptyStateValues.title"
51+
:primary-button-text="emptyStateValues.createNew"
52+
:primary-button-link="emptyStateValues.helpPath"
53+
:svg-path="emptyStateValues.emptySvgPath"
54+
:svg-height="null"
55+
:description="emptyStateValues.description"
56+
class="gl-py-8"
57+
/>
58+
</template>

app/assets/javascripts/ml/model_registry/components/model_version_list.vue

+6-8
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ import { n__ } from '~/locale';
44
import PackagesListLoader from '~/packages_and_registries/shared/components/packages_list_loader.vue';
55
import RegistryList from '~/packages_and_registries/shared/components/registry_list.vue';
66
import * as Sentry from '~/sentry/sentry_browser_wrapper';
7-
import { makeLoadVersionsErrorMessage, NO_VERSIONS_LABEL } from '~/ml/model_registry/translations';
7+
import { makeLoadVersionsErrorMessage } from '~/ml/model_registry/translations';
88
import { convertToGraphQLId } from '~/graphql_shared/utils';
99
import getModelVersionsQuery from '../graphql/queries/get_model_versions.query.graphql';
10-
import { GRAPHQL_PAGE_SIZE } from '../constants';
10+
import { GRAPHQL_PAGE_SIZE, MODEL_ENTITIES } from '../constants';
11+
import EmptyState from './empty_state.vue';
1112
import ModelVersionRow from './model_version_row.vue';
1213
1314
export default {
1415
components: {
16+
EmptyState,
1517
GlAlert,
1618
ModelVersionRow,
1719
PackagesListLoader,
@@ -104,9 +106,7 @@ export default {
104106
});
105107
},
106108
},
107-
i18n: {
108-
NO_VERSIONS_LABEL,
109-
},
109+
modelVersionEntity: MODEL_ENTITIES.modelVersion,
110110
};
111111
</script>
112112
<template>
@@ -117,9 +117,7 @@ export default {
117117
<gl-alert v-else-if="errorMessage" variant="danger" :dismissible="false">{{
118118
errorMessage
119119
}}</gl-alert>
120-
<div v-else-if="isListEmpty" class="gl-text-secondary">
121-
{{ $options.i18n.NO_VERSIONS_LABEL }}
122-
</div>
120+
<empty-state v-else-if="isListEmpty" :entity-type="$options.modelVersionEntity" />
123121
<div v-else>
124122
<registry-list
125123
:hidden-delete="true"

app/assets/javascripts/ml/model_registry/constants.js

+5
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ export const BASE_SORT_FIELDS = Object.freeze([
1313
]);
1414

1515
export const GRAPHQL_PAGE_SIZE = 30;
16+
17+
export const MODEL_ENTITIES = {
18+
model: 'model',
19+
modelVersion: 'modelVersion',
20+
};

app/assets/javascripts/ml/model_registry/translations.js

-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ export const MODEL_DETAILS_TAB_LABEL = s__('MlModelRegistry|Details');
44
export const MODEL_OTHER_VERSIONS_TAB_LABEL = s__('MlModelRegistry|Versions');
55
export const MODEL_CANDIDATES_TAB_LABEL = s__('MlModelRegistry|Version candidates');
66
export const LATEST_VERSION_LABEL = s__('MlModelRegistry|Latest version');
7-
export const NO_VERSIONS_LABEL = s__('MlModelRegistry|This model has no versions');
87

98
export const versionsCountLabel = (versionCount) =>
109
n__('MlModelRegistry|%d version', 'MlModelRegistry|%d versions', versionCount);
1110

1211
export const TITLE_LABEL = s__('MlModelRegistry|Model registry');
13-
export const NO_MODELS_LABEL = s__('MlModelRegistry|No models registered in this project');
1412

1513
export const modelsCountLabel = (modelCount) =>
1614
n__('MlModelRegistry|%d model', 'MlModelRegistry|%d models', modelCount);

app/models/ci/build.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def clone_accessors
231231
yaml_variables when environment coverage_regex
232232
description tag_list protected needs_attributes
233233
job_variables_attributes resource_group scheduling_type
234-
ci_stage partition_id id_tokens].freeze
234+
ci_stage partition_id id_tokens interruptible].freeze
235235
end
236236

237237
def supported_keyset_orderings
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: run_clickhouse_migrations_automatically
3+
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/138661
4+
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/434848
5+
milestone: '16.7'
6+
type: ops
7+
group: group::runner
8+
default_enabled: false

db/click_house/migrate/20231114142100_create_audit_events.rb renamed to db/click_house/migrate/main/20231114142100_create_audit_events.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def up
2525

2626
execute <<~SQL
2727
ALTER TABLE audit_events
28-
ADD PROJECTION by_id (SELECT * ORDER BY id);
28+
ADD PROJECTION IF NOT EXISTS by_id (SELECT * ORDER BY id);
2929
SQL
3030
end
3131

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# frozen_string_literal: true
2+
3+
class ScheduleIndexToCiBuildTraceMetadata < Gitlab::Database::Migration[2.2]
4+
milestone '16.7'
5+
disable_ddl_transaction!
6+
7+
INDEX_NAME = :index_ci_build_trace_metadata_on_trace_artifact_id_partition_id
8+
TABLE_NAME = :ci_build_trace_metadata
9+
COLUMNS = [:trace_artifact_id, :partition_id]
10+
11+
def up
12+
prepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME)
13+
end
14+
15+
def down
16+
unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME)
17+
end
18+
end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# frozen_string_literal: true
2+
3+
class ScheduleIndexToCiJobArtifactStates < Gitlab::Database::Migration[2.2]
4+
milestone '16.7'
5+
disable_ddl_transaction!
6+
7+
INDEX_NAME = :index_ci_job_artifact_states_on_job_artifact_id_partition_id
8+
TABLE_NAME = :ci_job_artifact_states
9+
COLUMNS = [:job_artifact_id, :partition_id]
10+
11+
def up
12+
prepare_async_index(TABLE_NAME, COLUMNS, name: INDEX_NAME)
13+
end
14+
15+
def down
16+
unprepare_async_index_by_name(TABLE_NAME, INDEX_NAME)
17+
end
18+
end

db/schema_migrations/20231205144253

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

db/schema_migrations/20231205144349

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
13d80798b47df6524f7e5a7580215bf44d3654edb20b1c78c6acdb7e24e0ccd5

doc/development/backend/create_source_code_be/index.md

+21-12
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@ group: Source Code
44
info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review.
55
---
66

7-
# Create: Source Code backend
7+
# Source Code Management
88

9-
The Create: Source Code backend (BE) team focuses on the GitLab suite of Source Code Management
10-
(SCM) tools. It is responsible for all backend aspects of the product categories
9+
The Source Code Management team is responsible for all backend aspects of the product categories
1110
that fall under the [Source Code group](https://about.gitlab.com/handbook/product/categories/#source-code-group)
1211
of the [Create stage](https://about.gitlab.com/handbook/product/categories/#create-stage)
1312
of the [DevOps lifecycle](https://about.gitlab.com/handbook/product/categories/#devops-stages).
1413

15-
We interface with the Gitaly and Code Review teams, and work closely with the
16-
[Create: Source Code frontend team](https://about.gitlab.com/handbook/engineering/development/dev/create/create-source-code-fe/). The features
14+
We interface with the Gitaly and Code Review teams. The features
1715
we work with are listed on the
1816
[Features by Group Page](https://about.gitlab.com/handbook/product/categories/features/#createsource-code-group).
1917

@@ -35,17 +33,28 @@ For more information, refer to the [GitLab Shell documentation](../../gitlab_she
3533
To learn about the reasoning behind our creation of `gitlab-sshd`, read the blog post
3634
[Why we implemented our own SSHD solution](https://about.gitlab.com/blog/2022/08/17/why-we-have-implemented-our-own-sshd-solution-on-gitlab-sass/).
3735

36+
## CODEOWNERS
37+
38+
Source Code Management shares ownership of [Code Owners](../../code_owners/index.md) with the Code Review group.
39+
3840
## GitLab Rails
3941

4042
### Gitaly touch points
4143

42-
Gitaly is a Go RPC service which handles all the `git` calls made by GitLab.
43-
GitLab is not exposed directly, and all traffic comes through Create: Source Code.
44-
For more information, read [Gitaly touch points](gitaly_touch_points.md).
44+
[Gitaly](../../../administration/gitaly/index.md) provides high-level RPC access to Git repositories.
45+
It is present in every GitLab installation and coordinates Git repository storage and retrieval.
46+
Gitaly implements a client-server architecture with Gitaly as the server and Gitaly clients, also
47+
known as _Gitaly consumers_, including:
48+
49+
- GitLab Rails
50+
- GitLab Shell
51+
- GitLab Workhorse
4552

46-
### Source Code REST API Endpoints
53+
Gitaly Rails provides API endpoints that are counterparts of Gitaly RPCs. For more information, read [Gitaly touch points](gitaly_touch_points.md).
4754

48-
Create: Source Code has over 100 REST endpoints, being a mixture of Grape API endpoints and Rails controller endpoints.
49-
For a detailed list, refer to [Source Code REST Endpoints](rest_endpoints.md).
55+
### Annotated Rails Source Code
5056

51-
An alternative list of the [Source Code endpoints and other owned objects](https://gitlab-com.gitlab.io/gl-infra/platform/stage-groups-index/source-code.html) is available.
57+
The `:source_code_management` annotation indicates which code belongs to the Source Code Management
58+
group in the Rails codebase. The annotated objects are presented on
59+
[this page](https://gitlab-com.gitlab.io/gl-infra/platform/stage-groups-index/source-code.html) along
60+
with the [Error Budgets dashboards](https://dashboards.gitlab.net/d/stage-groups-source_code/stage-groups3a-source-code3a-group-dashboard?orgId=1).

0 commit comments

Comments
 (0)