Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
74e773b861
commit
f04d85d620
|
|
@ -266,6 +266,7 @@ export default {
|
|||
autofocus
|
||||
:debounce="$options.DEFAULT_DEBOUNCE_AND_THROTTLE_MS"
|
||||
:placeholder="$options.i18n.messagePlaceholder"
|
||||
no-resize
|
||||
data-testid="message-input"
|
||||
/>
|
||||
</gl-form-group>
|
||||
|
|
|
|||
|
|
@ -491,6 +491,7 @@ export default {
|
|||
:debounce="$options.JSON_VALIDATE_DELAY"
|
||||
rows="6"
|
||||
max-rows="10"
|
||||
no-resize
|
||||
@input="validateJson"
|
||||
/>
|
||||
</gl-form-group>
|
||||
|
|
@ -656,6 +657,7 @@ export default {
|
|||
:debounce="$options.JSON_VALIDATE_DELAY"
|
||||
rows="6"
|
||||
max-rows="10"
|
||||
no-resize
|
||||
data-testid="test-payload-field"
|
||||
@input="validateJson(false)"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ export default {
|
|||
v-model="message"
|
||||
class="!gl-font-monospace"
|
||||
required
|
||||
no-resize
|
||||
:placeholder="defaultMessage"
|
||||
/>
|
||||
</gl-form-group>
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ export default {
|
|||
id="token-description"
|
||||
v-model="token.description"
|
||||
:disabled="loading"
|
||||
no-resize
|
||||
name="description"
|
||||
/>
|
||||
</gl-form-group>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ export default {
|
|||
:description="$options.translations.rolloutUserIdsDescription"
|
||||
>
|
||||
<template #default="{ inputId }">
|
||||
<gl-form-textarea :id="inputId" :value="userIds" @input="onUserIdsChange" />
|
||||
<gl-form-textarea :id="inputId" :value="userIds" no-resize @input="onUserIdsChange" />
|
||||
</template>
|
||||
</parameter-form-group>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ export default {
|
|||
v-else-if="isTextarea"
|
||||
v-model="model"
|
||||
v-bind="sharedProps"
|
||||
no-resize
|
||||
:placeholder="placeholder"
|
||||
:required="required"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ export default {
|
|||
class="note-textarea-rounded-bottom js-gfm-input js-autosize markdown-area !gl-font-monospace"
|
||||
data-testid="input-note"
|
||||
dir="auto"
|
||||
no-resize
|
||||
data-supports-quick-actions="false"
|
||||
:aria-label="$options.i18n.description"
|
||||
aria-describedby="timeline-form-hint"
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ export default {
|
|||
</gl-form-group>
|
||||
|
||||
<gl-form-group :label="$options.i18n.DESCRIPTION_LABEL" optional>
|
||||
<gl-form-textarea v-model="modelDescription" />
|
||||
<gl-form-textarea v-model="modelDescription" no-resize />
|
||||
</gl-form-group>
|
||||
|
||||
<gl-button type="submit" variant="confirm" class="js-no-auto-disable">{{
|
||||
|
|
|
|||
|
|
@ -365,6 +365,7 @@ export default {
|
|||
v-model="form.fields.description.value"
|
||||
data-testid="fork-description-textarea"
|
||||
name="description"
|
||||
no-resize
|
||||
:state="form.fields.description.state"
|
||||
/>
|
||||
</gl-form-group>
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ export default {
|
|||
v-model="message"
|
||||
:placeholder="defaultMessage"
|
||||
data-testid="commit_message"
|
||||
no-resize
|
||||
size="md"
|
||||
@input="(v) => $emit('update:message', v)"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -274,6 +274,7 @@ export default {
|
|||
v-model="form.fields['commit_message'].value"
|
||||
v-validation:[form.showValidation]
|
||||
name="commit_message"
|
||||
no-resize
|
||||
data-testid="commit-message-field"
|
||||
:state="form.fields['commit_message'].state"
|
||||
:disabled="loading"
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ export default {
|
|||
<gl-form-input v-model="dir" :disabled="loading" name="dir_name" />
|
||||
</gl-form-group>
|
||||
<gl-form-group :label="$options.i18n.COMMIT_LABEL" label-for="commit_message">
|
||||
<gl-form-textarea v-model="commit" name="commit_message" :disabled="loading" />
|
||||
<gl-form-textarea v-model="commit" name="commit_message" :disabled="loading" no-resize />
|
||||
</gl-form-group>
|
||||
<gl-form-group
|
||||
v-if="canPushCode"
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ export default {
|
|||
</div>
|
||||
</upload-dropzone>
|
||||
<gl-form-group :label="$options.i18n.COMMIT_LABEL" label-for="commit_message">
|
||||
<gl-form-textarea v-model="commit" name="commit_message" :disabled="loading" />
|
||||
<gl-form-textarea v-model="commit" name="commit_message" :disabled="loading" no-resize />
|
||||
</gl-form-group>
|
||||
<gl-form-group
|
||||
v-if="canPushCode"
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ export default {
|
|||
</gl-form-group>
|
||||
</div>
|
||||
<gl-form-group :label="s__('CreateTimelogForm|Summary')" optional label-for="summary">
|
||||
<gl-form-textarea id="summary" v-model="summary" rows="3" :no-resize="true" />
|
||||
<gl-form-textarea id="summary" v-model="summary" rows="3" no-resize />
|
||||
</gl-form-group>
|
||||
<gl-alert v-if="saveError" variant="danger" class="gl-mb-3" :dismissible="false">
|
||||
{{ saveError }}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export default {
|
|||
<gl-form-textarea
|
||||
class="form-control"
|
||||
rows="2"
|
||||
:no-resize="true"
|
||||
no-resize
|
||||
:placeholder="s__('Snippets|Describe what your snippet does or how to use it…')"
|
||||
data-testid="description-placeholder"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ export default {
|
|||
<template #default>
|
||||
<p data-testid="add-userids-description">{{ $options.translations.description }}</p>
|
||||
<gl-form-group label-for="add-user-ids" :label="$options.translations.userIdsLabel">
|
||||
<gl-form-textarea id="add-user-ids" v-model="userIds" />
|
||||
<gl-form-textarea id="add-user-ids" v-model="userIds" no-resize />
|
||||
</gl-form-group>
|
||||
</template>
|
||||
</gl-modal>
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ export default {
|
|||
required="required"
|
||||
rows="7"
|
||||
max-rows="32"
|
||||
no-resize
|
||||
@input="(val) => $emit('input', val)"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ export default {
|
|||
:placeholder="defaultCommitMessage"
|
||||
submit-on-enter
|
||||
data-testid="commit-message-field"
|
||||
no-resize
|
||||
@submit="onApply"
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -285,6 +285,7 @@ export default {
|
|||
class="js-gfm-input js-autosize markdown-area !gl-font-monospace"
|
||||
data-testid="conflicted-description"
|
||||
readonly
|
||||
no-resize
|
||||
:value="conflictedDescription"
|
||||
/>
|
||||
</details>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Mutations
|
||||
module Ml
|
||||
module ModelVersions
|
||||
class Create < BaseMutation
|
||||
graphql_name 'MlModelVersionCreate'
|
||||
authorize :write_model_registry
|
||||
|
||||
argument :project_path, GraphQL::Types::ID,
|
||||
required: true,
|
||||
description: "Project the model to mutate is in."
|
||||
|
||||
include FindsProject
|
||||
|
||||
argument :model_id, ::Types::GlobalIDType[::Ml::Model],
|
||||
required: true,
|
||||
description: 'Global ID of the model the version belongs to.'
|
||||
|
||||
argument :version, GraphQL::Types::String,
|
||||
required: false,
|
||||
description: 'Model version.'
|
||||
|
||||
argument :description, GraphQL::Types::String,
|
||||
required: false,
|
||||
description: 'Description of the model version.'
|
||||
|
||||
field :model_version,
|
||||
Types::Ml::ModelVersionType,
|
||||
null: true,
|
||||
description: 'Model after mutation.'
|
||||
|
||||
def resolve(**args)
|
||||
project = authorized_find!(args[:project_path])
|
||||
model = ::Ml::Model.by_project_id_and_id(project.id, args[:model_id].model_id)
|
||||
|
||||
return { errors: ['Model not found'] } unless model
|
||||
|
||||
model_version = ::Ml::CreateModelVersionService.new(model,
|
||||
{
|
||||
version: args[:version],
|
||||
description: args[:description]
|
||||
}
|
||||
).execute
|
||||
|
||||
{
|
||||
model_version: model_version,
|
||||
errors: []
|
||||
}
|
||||
rescue ActiveRecord::RecordInvalid, RuntimeError => e
|
||||
{
|
||||
model_version: nil,
|
||||
errors: [e.message]
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -14,6 +14,9 @@ module Types
|
|||
|
||||
field :package_path, GraphQL::Types::String,
|
||||
null: true, description: 'Path to the package of the model version.', method: :package_path
|
||||
|
||||
field :import_path, GraphQL::Types::String,
|
||||
null: true, description: 'File upload path for the machine learning model.', method: :import_path
|
||||
end
|
||||
# rubocop: enable Graphql/AuthorizeTypes
|
||||
end
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ module Types
|
|||
mount_mutation Mutations::Ml::Models::Create, alpha: { milestone: '16.8' }
|
||||
mount_mutation Mutations::Ml::Models::Destroy, alpha: { milestone: '16.10' }
|
||||
mount_mutation Mutations::Ml::Models::Delete, alpha: { milestone: '17.0' }
|
||||
mount_mutation Mutations::Ml::ModelVersions::Create, alpha: { milestone: '17.1' }
|
||||
mount_mutation Mutations::Ml::ModelVersions::Delete, alpha: { milestone: '17.0' }
|
||||
mount_mutation Mutations::BranchRules::Delete, alpha: { milestone: '16.9' }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
module Ml
|
||||
class ModelVersionPresenter < Gitlab::View::Presenter::Delegated
|
||||
include ::API::Helpers::RelatedResourcesHelpers
|
||||
|
||||
presents ::Ml::ModelVersion, as: :model_version
|
||||
|
||||
def display_name
|
||||
|
|
@ -21,5 +23,15 @@ module Ml
|
|||
|
||||
project_package_path(model_version.project, model_version.package_id)
|
||||
end
|
||||
|
||||
def import_path
|
||||
return unless model_version.package_id.present?
|
||||
|
||||
path = api_v4_projects_packages_ml_models_files___path___path(
|
||||
id: model_version.project_id, model_version_id: model_version.id, path: '', file_name: ''
|
||||
)
|
||||
|
||||
path.delete_suffix('(/path/)')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
table_name: group_audit_events
|
||||
classes:
|
||||
- GroupAuditEvent
|
||||
feature_categories:
|
||||
- audit_events
|
||||
description: Stores audit events scoped to group
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/152035/
|
||||
milestone: '17.1'
|
||||
gitlab_schema: gitlab_main_cell
|
||||
sharding_key:
|
||||
group_id: namespaces
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
table_name: instance_audit_events
|
||||
classes:
|
||||
- InstanceAuditEvent
|
||||
feature_categories:
|
||||
- audit_events
|
||||
description: Stores audit events scoped to instance
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/152035/
|
||||
milestone: '17.1'
|
||||
gitlab_schema: gitlab_main_clusterwide
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
table_name: project_audit_events
|
||||
classes:
|
||||
- ProjectAuditEvent
|
||||
feature_categories:
|
||||
- audit_events
|
||||
description: Stores audit events scoped to project
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/152035/
|
||||
milestone: '17.1'
|
||||
gitlab_schema: gitlab_main_cell
|
||||
sharding_key:
|
||||
project_id: projects
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
table_name: user_audit_events
|
||||
classes:
|
||||
- UserAuditEvent
|
||||
feature_categories:
|
||||
- audit_events
|
||||
description: Stores audit events scoped to user
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/152035/
|
||||
milestone: '17.1'
|
||||
gitlab_schema: gitlab_main_clusterwide
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateSharedSequenceForAuditEvents < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.1'
|
||||
|
||||
def up
|
||||
execute <<-SQL
|
||||
CREATE SEQUENCE shared_audit_event_id_seq;
|
||||
SQL
|
||||
end
|
||||
|
||||
def down
|
||||
execute <<-SQL
|
||||
DROP SEQUENCE shared_audit_event_id_seq;
|
||||
SQL
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateUserAuditEvents < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.1'
|
||||
enable_lock_retries!
|
||||
|
||||
AUTHOR_ID_CREATED_AT_ID_INDEX = 'idx_user_audit_events_on_author_id_created_at_id'
|
||||
USER_ID_AUTHOR_ID_CREATED_AT_ID_INDEX = 'idx_user_audit_events_on_user_id_author_created_at_id'
|
||||
USER_ID_CREATED_AT_ID_INDEX = 'idx_user_audit_events_on_project_created_at_id'
|
||||
|
||||
def up
|
||||
execute <<-SQL
|
||||
CREATE TABLE user_audit_events (
|
||||
id BIGINT NOT NULL DEFAULT nextval('shared_audit_event_id_seq'),
|
||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
user_id BIGINT NOT NULL,
|
||||
author_id BIGINT NOT NULL,
|
||||
target_id BIGINT,
|
||||
event_name TEXT,
|
||||
details TEXT,
|
||||
ip_address INET,
|
||||
author_name TEXT,
|
||||
entity_path TEXT,
|
||||
target_details TEXT,
|
||||
target_type TEXT,
|
||||
CHECK (char_length(event_name) <= 255),
|
||||
CHECK (char_length(author_name) <= 255),
|
||||
CHECK (char_length(entity_path) <= 5500),
|
||||
CHECK (char_length(target_details) <= 5500),
|
||||
CHECK (char_length(target_type) <= 255),
|
||||
PRIMARY KEY (id, created_at)
|
||||
) PARTITION BY RANGE (created_at);
|
||||
SQL
|
||||
|
||||
# rubocop:disable Migration/AddIndex -- cannot create index on partitioned table concurrently
|
||||
add_index :user_audit_events, [:author_id, :created_at, :id], name: AUTHOR_ID_CREATED_AT_ID_INDEX
|
||||
add_index :user_audit_events, [:user_id, :author_id, :created_at, :id],
|
||||
name: USER_ID_AUTHOR_ID_CREATED_AT_ID_INDEX, order: { id: :desc }
|
||||
add_index :user_audit_events, [:user_id, :created_at, :id], name: USER_ID_CREATED_AT_ID_INDEX
|
||||
# rubocop:enable Migration/AddIndex
|
||||
end
|
||||
|
||||
def down
|
||||
drop_table :user_audit_events
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateGroupAuditEvents < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.1'
|
||||
enable_lock_retries!
|
||||
|
||||
AUTHOR_ID_CREATED_AT_ID_INDEX = 'idx_group_audit_events_on_author_id_created_at_id'
|
||||
GROUP_ID_AUTHOR_ID_CREATED_AT_ID_INDEX = 'idx_group_audit_events_on_group_id_author_created_at_id'
|
||||
GROUP_ID_CREATED_AT_ID_INDEX = 'idx_group_audit_events_on_project_created_at_id'
|
||||
|
||||
def up
|
||||
execute <<-SQL
|
||||
CREATE TABLE group_audit_events (
|
||||
id BIGINT NOT NULL DEFAULT nextval('shared_audit_event_id_seq'),
|
||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
group_id BIGINT NOT NULL,
|
||||
author_id BIGINT NOT NULL,
|
||||
target_id BIGINT,
|
||||
event_name TEXT,
|
||||
details TEXT,
|
||||
ip_address INET,
|
||||
author_name TEXT,
|
||||
entity_path TEXT,
|
||||
target_details TEXT,
|
||||
target_type TEXT,
|
||||
CHECK (char_length(event_name) <= 255),
|
||||
CHECK (char_length(author_name) <= 255),
|
||||
CHECK (char_length(entity_path) <= 5500),
|
||||
CHECK (char_length(target_details) <= 5500),
|
||||
CHECK (char_length(target_type) <= 255),
|
||||
PRIMARY KEY (id, created_at)
|
||||
) PARTITION BY RANGE (created_at);
|
||||
SQL
|
||||
|
||||
# rubocop:disable Migration/AddIndex -- cannot create index on partitioned table concurrently
|
||||
add_index :group_audit_events, [:author_id, :created_at, :id], name: AUTHOR_ID_CREATED_AT_ID_INDEX
|
||||
add_index :group_audit_events, [:group_id, :author_id, :created_at, :id],
|
||||
name: GROUP_ID_AUTHOR_ID_CREATED_AT_ID_INDEX, order: { id: :desc }
|
||||
add_index :group_audit_events, [:group_id, :created_at, :id], name: GROUP_ID_CREATED_AT_ID_INDEX
|
||||
# rubocop:enable Migration/AddIndex
|
||||
end
|
||||
|
||||
def down
|
||||
drop_table :group_audit_events
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateProjectAuditEvents < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.1'
|
||||
enable_lock_retries!
|
||||
|
||||
AUTHOR_ID_CREATED_AT_ID_INDEX = 'idx_project_audit_events_on_author_id_created_at_id'
|
||||
PROJECT_ID_AUTHOR_ID_CREATED_AT_ID_INDEX = 'idx_project_audit_events_on_project_id_author_created_at_id'
|
||||
PROJECT_ID_CREATED_AT_ID_INDEX = 'idx_project_audit_events_on_project_created_at_id'
|
||||
|
||||
def up
|
||||
execute <<-SQL
|
||||
CREATE TABLE project_audit_events (
|
||||
id BIGINT NOT NULL DEFAULT nextval('shared_audit_event_id_seq'),
|
||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
project_id BIGINT NOT NULL,
|
||||
author_id BIGINT NOT NULL,
|
||||
target_id BIGINT,
|
||||
event_name TEXT,
|
||||
details TEXT,
|
||||
ip_address INET,
|
||||
author_name TEXT,
|
||||
entity_path TEXT,
|
||||
target_details TEXT,
|
||||
target_type TEXT,
|
||||
CHECK (char_length(event_name) <= 255),
|
||||
CHECK (char_length(author_name) <= 255),
|
||||
CHECK (char_length(entity_path) <= 5500),
|
||||
CHECK (char_length(target_details) <= 5500),
|
||||
CHECK (char_length(target_type) <= 255),
|
||||
PRIMARY KEY (id, created_at)
|
||||
) PARTITION BY RANGE (created_at);
|
||||
SQL
|
||||
|
||||
# rubocop:disable Migration/AddIndex -- cannot create index on partitioned table concurrently
|
||||
add_index :project_audit_events, [:author_id, :created_at, :id], name: AUTHOR_ID_CREATED_AT_ID_INDEX
|
||||
add_index :project_audit_events, [:project_id, :author_id, :created_at, :id],
|
||||
name: PROJECT_ID_AUTHOR_ID_CREATED_AT_ID_INDEX, order: { id: :desc }
|
||||
add_index :project_audit_events, [:project_id, :created_at, :id], name: PROJECT_ID_CREATED_AT_ID_INDEX
|
||||
# rubocop:enable Migration/AddIndex
|
||||
end
|
||||
|
||||
def down
|
||||
drop_table :project_audit_events
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CreateInstanceAuditEvents < Gitlab::Database::Migration[2.2]
|
||||
milestone '17.1'
|
||||
enable_lock_retries!
|
||||
|
||||
AUTHOR_ID_CREATED_AT_ID_INDEX = 'idx_instance_audit_events_on_author_id_created_at_id'
|
||||
|
||||
def up
|
||||
execute <<-SQL
|
||||
CREATE TABLE instance_audit_events (
|
||||
id BIGINT NOT NULL DEFAULT nextval('shared_audit_event_id_seq'),
|
||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
author_id BIGINT NOT NULL,
|
||||
target_id BIGINT,
|
||||
event_name TEXT,
|
||||
details TEXT,
|
||||
ip_address INET,
|
||||
author_name TEXT,
|
||||
entity_path TEXT,
|
||||
target_details TEXT,
|
||||
target_type TEXT,
|
||||
CHECK (char_length(event_name) <= 255),
|
||||
CHECK (char_length(author_name) <= 255),
|
||||
CHECK (char_length(entity_path) <= 5500),
|
||||
CHECK (char_length(target_details) <= 5500),
|
||||
CHECK (char_length(target_type) <= 255),
|
||||
PRIMARY KEY (id, created_at)
|
||||
) PARTITION BY RANGE (created_at);
|
||||
SQL
|
||||
|
||||
# rubocop:disable Migration/AddIndex -- cannot create index on partitioned table concurrently
|
||||
add_index :instance_audit_events, [:author_id, :created_at, :id], name: AUTHOR_ID_CREATED_AT_ID_INDEX
|
||||
# rubocop:enable Migration/AddIndex
|
||||
end
|
||||
|
||||
def down
|
||||
drop_table :instance_audit_events
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
753660970abb24a007413d5fa2da922d94d05791395a030ad8a6357229785c0d
|
||||
|
|
@ -0,0 +1 @@
|
|||
c034e2021dd90b72606a73a40112f59d3a3ffa65afa7f8329ea0b9e5e2aa125f
|
||||
|
|
@ -0,0 +1 @@
|
|||
474d1ddd07288a687800a5d32a314d6952f42c398797f9ad656e488f60581d83
|
||||
|
|
@ -0,0 +1 @@
|
|||
98632e2de7b9e6f5ba9fc735b17503f22c060c63a1110848c2f0ee631cff0ac7
|
||||
|
|
@ -0,0 +1 @@
|
|||
3f99b51a59e6b61dca0687cd6f3711e7e2dc8b3aa2fe6aa70d46ec23bbcfd9c9
|
||||
122
db/structure.sql
122
db/structure.sql
|
|
@ -9712,6 +9712,34 @@ CREATE SEQUENCE grafana_integrations_id_seq
|
|||
|
||||
ALTER SEQUENCE grafana_integrations_id_seq OWNED BY grafana_integrations.id;
|
||||
|
||||
CREATE SEQUENCE shared_audit_event_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
CREATE TABLE group_audit_events (
|
||||
id bigint DEFAULT nextval('shared_audit_event_id_seq'::regclass) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
group_id bigint NOT NULL,
|
||||
author_id bigint NOT NULL,
|
||||
target_id bigint,
|
||||
event_name text,
|
||||
details text,
|
||||
ip_address inet,
|
||||
author_name text,
|
||||
entity_path text,
|
||||
target_details text,
|
||||
target_type text,
|
||||
CONSTRAINT group_audit_events_author_name_check CHECK ((char_length(author_name) <= 255)),
|
||||
CONSTRAINT group_audit_events_entity_path_check CHECK ((char_length(entity_path) <= 5500)),
|
||||
CONSTRAINT group_audit_events_event_name_check CHECK ((char_length(event_name) <= 255)),
|
||||
CONSTRAINT group_audit_events_target_details_check CHECK ((char_length(target_details) <= 5500)),
|
||||
CONSTRAINT group_audit_events_target_type_check CHECK ((char_length(target_type) <= 255))
|
||||
)
|
||||
PARTITION BY RANGE (created_at);
|
||||
|
||||
CREATE TABLE group_crm_settings (
|
||||
group_id bigint NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
|
|
@ -10345,6 +10373,26 @@ CREATE SEQUENCE insights_id_seq
|
|||
|
||||
ALTER SEQUENCE insights_id_seq OWNED BY insights.id;
|
||||
|
||||
CREATE TABLE instance_audit_events (
|
||||
id bigint DEFAULT nextval('shared_audit_event_id_seq'::regclass) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
author_id bigint NOT NULL,
|
||||
target_id bigint,
|
||||
event_name text,
|
||||
details text,
|
||||
ip_address inet,
|
||||
author_name text,
|
||||
entity_path text,
|
||||
target_details text,
|
||||
target_type text,
|
||||
CONSTRAINT instance_audit_events_author_name_check CHECK ((char_length(author_name) <= 255)),
|
||||
CONSTRAINT instance_audit_events_entity_path_check CHECK ((char_length(entity_path) <= 5500)),
|
||||
CONSTRAINT instance_audit_events_event_name_check CHECK ((char_length(event_name) <= 255)),
|
||||
CONSTRAINT instance_audit_events_target_details_check CHECK ((char_length(target_details) <= 5500)),
|
||||
CONSTRAINT instance_audit_events_target_type_check CHECK ((char_length(target_type) <= 255))
|
||||
)
|
||||
PARTITION BY RANGE (created_at);
|
||||
|
||||
CREATE TABLE instance_audit_events_streaming_headers (
|
||||
id bigint NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
|
|
@ -14293,6 +14341,27 @@ CREATE SEQUENCE project_aliases_id_seq
|
|||
|
||||
ALTER SEQUENCE project_aliases_id_seq OWNED BY project_aliases.id;
|
||||
|
||||
CREATE TABLE project_audit_events (
|
||||
id bigint DEFAULT nextval('shared_audit_event_id_seq'::regclass) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
project_id bigint NOT NULL,
|
||||
author_id bigint NOT NULL,
|
||||
target_id bigint,
|
||||
event_name text,
|
||||
details text,
|
||||
ip_address inet,
|
||||
author_name text,
|
||||
entity_path text,
|
||||
target_details text,
|
||||
target_type text,
|
||||
CONSTRAINT project_audit_events_author_name_check CHECK ((char_length(author_name) <= 255)),
|
||||
CONSTRAINT project_audit_events_entity_path_check CHECK ((char_length(entity_path) <= 5500)),
|
||||
CONSTRAINT project_audit_events_event_name_check CHECK ((char_length(event_name) <= 255)),
|
||||
CONSTRAINT project_audit_events_target_details_check CHECK ((char_length(target_details) <= 5500)),
|
||||
CONSTRAINT project_audit_events_target_type_check CHECK ((char_length(target_type) <= 255))
|
||||
)
|
||||
PARTITION BY RANGE (created_at);
|
||||
|
||||
CREATE TABLE project_authorizations (
|
||||
user_id integer NOT NULL,
|
||||
project_id integer NOT NULL,
|
||||
|
|
@ -17183,6 +17252,27 @@ CREATE SEQUENCE user_agent_details_id_seq
|
|||
|
||||
ALTER SEQUENCE user_agent_details_id_seq OWNED BY user_agent_details.id;
|
||||
|
||||
CREATE TABLE user_audit_events (
|
||||
id bigint DEFAULT nextval('shared_audit_event_id_seq'::regclass) NOT NULL,
|
||||
created_at timestamp with time zone NOT NULL,
|
||||
user_id bigint NOT NULL,
|
||||
author_id bigint NOT NULL,
|
||||
target_id bigint,
|
||||
event_name text,
|
||||
details text,
|
||||
ip_address inet,
|
||||
author_name text,
|
||||
entity_path text,
|
||||
target_details text,
|
||||
target_type text,
|
||||
CONSTRAINT user_audit_events_author_name_check CHECK ((char_length(author_name) <= 255)),
|
||||
CONSTRAINT user_audit_events_entity_path_check CHECK ((char_length(entity_path) <= 5500)),
|
||||
CONSTRAINT user_audit_events_event_name_check CHECK ((char_length(event_name) <= 255)),
|
||||
CONSTRAINT user_audit_events_target_details_check CHECK ((char_length(target_details) <= 5500)),
|
||||
CONSTRAINT user_audit_events_target_type_check CHECK ((char_length(target_type) <= 255))
|
||||
)
|
||||
PARTITION BY RANGE (created_at);
|
||||
|
||||
CREATE TABLE user_callouts (
|
||||
id integer NOT NULL,
|
||||
feature_name integer NOT NULL,
|
||||
|
|
@ -21660,6 +21750,9 @@ ALTER TABLE ONLY gpg_signatures
|
|||
ALTER TABLE ONLY grafana_integrations
|
||||
ADD CONSTRAINT grafana_integrations_pkey PRIMARY KEY (id);
|
||||
|
||||
ALTER TABLE ONLY group_audit_events
|
||||
ADD CONSTRAINT group_audit_events_pkey PRIMARY KEY (id, created_at);
|
||||
|
||||
ALTER TABLE ONLY group_crm_settings
|
||||
ADD CONSTRAINT group_crm_settings_pkey PRIMARY KEY (group_id);
|
||||
|
||||
|
|
@ -21768,6 +21861,9 @@ ALTER TABLE ONLY index_statuses
|
|||
ALTER TABLE ONLY insights
|
||||
ADD CONSTRAINT insights_pkey PRIMARY KEY (id);
|
||||
|
||||
ALTER TABLE ONLY instance_audit_events
|
||||
ADD CONSTRAINT instance_audit_events_pkey PRIMARY KEY (id, created_at);
|
||||
|
||||
ALTER TABLE ONLY instance_audit_events_streaming_headers
|
||||
ADD CONSTRAINT instance_audit_events_streaming_headers_pkey PRIMARY KEY (id);
|
||||
|
||||
|
|
@ -22320,6 +22416,9 @@ ALTER TABLE ONLY project_alerting_settings
|
|||
ALTER TABLE ONLY project_aliases
|
||||
ADD CONSTRAINT project_aliases_pkey PRIMARY KEY (id);
|
||||
|
||||
ALTER TABLE ONLY project_audit_events
|
||||
ADD CONSTRAINT project_audit_events_pkey PRIMARY KEY (id, created_at);
|
||||
|
||||
ALTER TABLE ONLY project_authorizations
|
||||
ADD CONSTRAINT project_authorizations_pkey PRIMARY KEY (user_id, project_id, access_level);
|
||||
|
||||
|
|
@ -22761,6 +22860,9 @@ ALTER TABLE ONLY user_achievements
|
|||
ALTER TABLE ONLY user_agent_details
|
||||
ADD CONSTRAINT user_agent_details_pkey PRIMARY KEY (id);
|
||||
|
||||
ALTER TABLE ONLY user_audit_events
|
||||
ADD CONSTRAINT user_audit_events_pkey PRIMARY KEY (id, created_at);
|
||||
|
||||
ALTER TABLE ONLY user_callouts
|
||||
ADD CONSTRAINT user_callouts_pkey PRIMARY KEY (id);
|
||||
|
||||
|
|
@ -24277,6 +24379,12 @@ CREATE INDEX idx_external_status_checks_on_id_and_project_id ON external_status_
|
|||
|
||||
CREATE INDEX idx_gpg_keys_on_user_externally_verified ON gpg_keys USING btree (user_id) WHERE (externally_verified = true);
|
||||
|
||||
CREATE INDEX idx_group_audit_events_on_author_id_created_at_id ON ONLY group_audit_events USING btree (author_id, created_at, id);
|
||||
|
||||
CREATE INDEX idx_group_audit_events_on_group_id_author_created_at_id ON ONLY group_audit_events USING btree (group_id, author_id, created_at, id DESC);
|
||||
|
||||
CREATE INDEX idx_group_audit_events_on_project_created_at_id ON ONLY group_audit_events USING btree (group_id, created_at, id);
|
||||
|
||||
CREATE INDEX idx_headers_instance_external_audit_event_destination_id ON instance_audit_events_streaming_headers USING btree (instance_external_audit_event_destination_id);
|
||||
|
||||
CREATE INDEX idx_installable_conan_pkgs_on_project_id_id ON packages_packages USING btree (project_id, id) WHERE ((package_type = 3) AND (status = ANY (ARRAY[0, 1])));
|
||||
|
|
@ -24285,6 +24393,8 @@ CREATE INDEX idx_installable_helm_pkgs_on_project_id_id ON packages_packages USI
|
|||
|
||||
CREATE INDEX idx_installable_npm_pkgs_on_project_id_name_version_id ON packages_packages USING btree (project_id, name, version, id) WHERE ((package_type = 2) AND (status = 0));
|
||||
|
||||
CREATE INDEX idx_instance_audit_events_on_author_id_created_at_id ON ONLY instance_audit_events USING btree (author_id, created_at, id);
|
||||
|
||||
CREATE UNIQUE INDEX idx_instance_external_audit_event_destination_id_key_uniq ON instance_audit_events_streaming_headers USING btree (instance_external_audit_event_destination_id, key);
|
||||
|
||||
CREATE INDEX idx_issues_on_health_status_not_null ON issues USING btree (health_status) WHERE (health_status IS NOT NULL);
|
||||
|
|
@ -24395,6 +24505,12 @@ CREATE INDEX idx_proj_feat_usg_on_jira_dvcs_cloud_last_sync_at_and_proj_id ON pr
|
|||
|
||||
CREATE INDEX idx_proj_feat_usg_on_jira_dvcs_server_last_sync_at_and_proj_id ON project_feature_usages USING btree (jira_dvcs_server_last_sync_at, project_id) WHERE (jira_dvcs_server_last_sync_at IS NOT NULL);
|
||||
|
||||
CREATE INDEX idx_project_audit_events_on_author_id_created_at_id ON ONLY project_audit_events USING btree (author_id, created_at, id);
|
||||
|
||||
CREATE INDEX idx_project_audit_events_on_project_created_at_id ON ONLY project_audit_events USING btree (project_id, created_at, id);
|
||||
|
||||
CREATE INDEX idx_project_audit_events_on_project_id_author_created_at_id ON ONLY project_audit_events USING btree (project_id, author_id, created_at, id DESC);
|
||||
|
||||
CREATE UNIQUE INDEX idx_project_id_payload_key_self_managed_prometheus_alert_events ON self_managed_prometheus_alert_events USING btree (project_id, payload_key);
|
||||
|
||||
CREATE INDEX idx_project_repository_check_partial ON projects USING btree (repository_storage, created_at) WHERE (last_repository_check_at IS NULL);
|
||||
|
|
@ -24443,6 +24559,12 @@ CREATE UNIQUE INDEX idx_uniq_analytics_dashboards_pointers_on_project_id ON anal
|
|||
|
||||
CREATE INDEX idx_user_add_on_assignments_on_add_on_purchase_id_and_id ON subscription_user_add_on_assignments USING btree (add_on_purchase_id, id);
|
||||
|
||||
CREATE INDEX idx_user_audit_events_on_author_id_created_at_id ON ONLY user_audit_events USING btree (author_id, created_at, id);
|
||||
|
||||
CREATE INDEX idx_user_audit_events_on_project_created_at_id ON ONLY user_audit_events USING btree (user_id, created_at, id);
|
||||
|
||||
CREATE INDEX idx_user_audit_events_on_user_id_author_created_at_id ON ONLY user_audit_events USING btree (user_id, author_id, created_at, id DESC);
|
||||
|
||||
CREATE INDEX idx_user_credit_card_validations_on_holder_name_hash ON user_credit_card_validations USING btree (holder_name_hash);
|
||||
|
||||
CREATE INDEX idx_user_credit_card_validations_on_similar_to_meta_data ON user_credit_card_validations USING btree (expiration_date_hash, last_digits_hash, network_hash, credit_card_validated_at);
|
||||
|
|
|
|||
|
|
@ -6656,6 +6656,32 @@ Input type: `MlModelDestroyInput`
|
|||
| <a id="mutationmlmodeldestroymessage"></a>`message` | [`String`](#string) | Model deletion result message. |
|
||||
| <a id="mutationmlmodeldestroymodel"></a>`model` | [`MlModel`](#mlmodel) | Model after mutation. |
|
||||
|
||||
### `Mutation.mlModelVersionCreate`
|
||||
|
||||
DETAILS:
|
||||
**Introduced** in GitLab 17.1.
|
||||
**Status**: Experiment.
|
||||
|
||||
Input type: `MlModelVersionCreateInput`
|
||||
|
||||
#### Arguments
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmlmodelversioncreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmlmodelversioncreatedescription"></a>`description` | [`String`](#string) | Description of the model version. |
|
||||
| <a id="mutationmlmodelversioncreatemodelid"></a>`modelId` | [`MlModelID!`](#mlmodelid) | Global ID of the model the version belongs to. |
|
||||
| <a id="mutationmlmodelversioncreateprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the model to mutate is in. |
|
||||
| <a id="mutationmlmodelversioncreateversion"></a>`version` | [`String`](#string) | Model version. |
|
||||
|
||||
#### Fields
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationmlmodelversioncreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationmlmodelversioncreateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
|
||||
| <a id="mutationmlmodelversioncreatemodelversion"></a>`modelVersion` | [`MlModelVersion`](#mlmodelversion) | Model after mutation. |
|
||||
|
||||
### `Mutation.mlModelVersionDelete`
|
||||
|
||||
DETAILS:
|
||||
|
|
@ -23658,6 +23684,7 @@ Represents links to perform actions on the model version.
|
|||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="mlmodelversionlinksimportpath"></a>`importPath` | [`String`](#string) | File upload path for the machine learning model. |
|
||||
| <a id="mlmodelversionlinkspackagepath"></a>`packagePath` | [`String`](#string) | Path to the package of the model version. |
|
||||
| <a id="mlmodelversionlinksshowpath"></a>`showPath` | [`String`](#string) | Path to the details page of the model version. |
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ levels are defined in the `Gitlab::Access` module. Currently, these levels are v
|
|||
- Reporter (`20`)
|
||||
- Developer (`30`)
|
||||
- Maintainer (`40`)
|
||||
- Owner (`50`). Valid for projects in [GitLab 14.9 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/21432).
|
||||
- Owner (`50`)
|
||||
|
||||
## Add a member to a group or project
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
| `FUZZAPI_IMAGE_SUFFIX` | Specify a container image suffix. Defaults to none. |
|
||||
| `FUZZAPI_API_PORT` | Specify the communication port number used by API Fuzzing engine. Defaults to `5500`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/367734) in GitLab 15.5. |
|
||||
| `FUZZAPI_TARGET_URL` | Base URL of API testing target. |
|
||||
| `FUZZAPI_TARGET_CHECK_SKIP` | Disable waiting for target to become available. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/442699) in GitLab 17.1. |
|
||||
| `FUZZAPI_TARGET_CHECK_STATUS_CODE` | Provide the expected status code for target availability check. If not provided, any non-500 status code is acceptable. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/442699) in GitLab 17.1. |
|
||||
|[`FUZZAPI_PROFILE`](customizing_analyzer_settings.md#api-fuzzing-profiles) | Configuration profile to use during testing. Defaults to `Quick-10`. |
|
||||
|[`FUZZAPI_EXCLUDE_PATHS`](customizing_analyzer_settings.md#exclude-paths) | Exclude API URL paths from testing. |
|
||||
|[`FUZZAPI_EXCLUDE_URLS`](customizing_analyzer_settings.md#exclude-urls) | Exclude API URL from testing. |
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
| `DAST_API_IMAGE_SUFFIX` | Specify a container image suffix. Defaults to none. |
|
||||
| `DAST_API_API_PORT` | Specify the communication port number used by API security testing engine. Defaults to `5500`. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/367734) in GitLab 15.5. |
|
||||
| `DAST_API_TARGET_URL` | Base URL of API testing target. |
|
||||
| `DAST_API_TARGET_CHECK_SKIP` | Disable waiting for target to become available. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/442699) in GitLab 17.1. |
|
||||
| `DAST_API_TARGET_CHECK_STATUS_CODE` | Provide the expected status code for target availability check. If not provided, any non-500 status code is acceptable. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/442699) in GitLab 17.1. |
|
||||
|[`DAST_API_CONFIG`](#configuration-files) | API security testing configuration file. Defaults to `.gitlab-dast-api.yml`. |
|
||||
|[`DAST_API_PROFILE`](#configuration-files) | Configuration profile to use during testing. Defaults to `Quick`. |
|
||||
|[`DAST_API_EXCLUDE_PATHS`](customizing_analyzer_settings.md#exclude-paths) | Exclude API URL paths from testing. |
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@ ready for production use.
|
|||
We invite you to leave your feedback about migrating by direct transfer in
|
||||
[the feedback issue](https://gitlab.com/gitlab-org/gitlab/-/issues/284495).
|
||||
|
||||
## Migrating specific projects
|
||||
|
||||
Migrating groups by using direct transfer in the GitLab UI migrates all projects in the group. If you want to migrate only specific projects in the group by using direct
|
||||
transfer, you must use the [API](../../../api/bulk_imports.md#start-a-new-group-or-project-migration).
|
||||
|
||||
## Known issues
|
||||
|
||||
- Because of [issue 406685](https://gitlab.com/gitlab-org/gitlab/-/issues/406685), files with a filename longer than 255 characters are not migrated.
|
||||
|
|
|
|||
|
|
@ -277,7 +277,6 @@
|
|||
"jest-jasmine2": "^28.1.3",
|
||||
"jest-junit": "^12.3.0",
|
||||
"jest-util": "^28.1.3",
|
||||
"markdownlint-cli": "^0.39.0",
|
||||
"markdownlint-cli2": "^0.12.1",
|
||||
"markdownlint-rule-helpers": "^0.20.0",
|
||||
"miragejs": "^0.1.40",
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ RSpec.describe 'Database schema', feature_category: :database do
|
|||
analytics_cycle_analytics_merge_request_stage_events: %w[author_id group_id merge_request_id milestone_id project_id stage_event_hash_id state_id],
|
||||
analytics_cycle_analytics_issue_stage_events: %w[author_id group_id issue_id milestone_id project_id stage_event_hash_id state_id sprint_id],
|
||||
audit_events: %w[author_id entity_id target_id],
|
||||
user_audit_events: %w[author_id user_id target_id],
|
||||
group_audit_events: %w[author_id group_id target_id],
|
||||
project_audit_events: %w[author_id project_id target_id],
|
||||
instance_audit_events: %w[author_id target_id],
|
||||
award_emoji: %w[awardable_id user_id],
|
||||
aws_roles: %w[role_external_id],
|
||||
boards: %w[milestone_id iteration_id],
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ RSpec.describe GitlabSchema.types['MlModelVersion'], feature_category: :mlops do
|
|||
_links {
|
||||
packagePath
|
||||
showPath
|
||||
importPath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -53,7 +54,8 @@ RSpec.describe GitlabSchema.types['MlModelVersion'], feature_category: :mlops do
|
|||
},
|
||||
'_links' => {
|
||||
'showPath' => "/#{project.full_path}/-/ml/models/#{model_version.model.id}/versions/#{model_version.id}",
|
||||
'packagePath' => "/#{project.full_path}/-/packages/#{model_version.package_id}"
|
||||
'packagePath' => "/#{project.full_path}/-/packages/#{model_version.package_id}",
|
||||
'importPath' => "/api/v4/projects/#{project.id}/packages/ml_models/#{model_version.id}/files/"
|
||||
}
|
||||
})
|
||||
end
|
||||
|
|
|
|||
|
|
@ -81,7 +81,9 @@ RSpec.describe 'new tables missing sharding_key', feature_category: :cell do
|
|||
'value_stream_dashboard_counts.namespace_id', # https://gitlab.com/gitlab-org/gitlab/-/issues/439555
|
||||
'zoekt_indices.namespace_id',
|
||||
'zoekt_repositories.project_identifier',
|
||||
'zoekt_tasks.project_identifier'
|
||||
'zoekt_tasks.project_identifier',
|
||||
'project_audit_events.project_id',
|
||||
'group_audit_events.group_id'
|
||||
]
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe 'Creation of a machine learning model version', feature_category: :mlops do
|
||||
include GraphqlHelpers
|
||||
|
||||
let_it_be(:model) { create(:ml_models) }
|
||||
let_it_be(:project) { model.project }
|
||||
let_it_be(:current_user) { project.owner }
|
||||
|
||||
let(:version) { '1.0.0' }
|
||||
let(:description) { 'A description' }
|
||||
let(:input) { { project_path: project.full_path, modelId: model.to_gid, version: version, description: description } }
|
||||
let(:fields) do
|
||||
<<~FIELDS
|
||||
modelVersion{
|
||||
version
|
||||
description
|
||||
id
|
||||
}
|
||||
errors
|
||||
FIELDS
|
||||
end
|
||||
|
||||
let(:mutation) { graphql_mutation(:ml_model_version_create, input, fields, ['version']) }
|
||||
let(:mutation_response) { graphql_mutation_response(:ml_model_version_create) }
|
||||
|
||||
context 'when user is not allowed write changes' do
|
||||
before do
|
||||
allow(Ability).to receive(:allowed?).and_call_original
|
||||
allow(Ability).to receive(:allowed?)
|
||||
.with(current_user, :write_model_registry, project)
|
||||
.and_return(false)
|
||||
end
|
||||
|
||||
it_behaves_like 'a mutation that returns a top-level access error'
|
||||
end
|
||||
|
||||
context 'when user is allowed write changes' do
|
||||
it 'creates a model' do
|
||||
post_graphql_mutation(mutation, current_user: current_user)
|
||||
|
||||
expect(response).to have_gitlab_http_status(:success)
|
||||
expect(mutation_response['modelVersion']).to include(
|
||||
'version' => version,
|
||||
'description' => description
|
||||
)
|
||||
end
|
||||
|
||||
context 'when version is invalid' do
|
||||
err_msg = "Validation failed: Version is invalid"
|
||||
let(:version) { 'invalid-version' }
|
||||
|
||||
it_behaves_like 'a mutation that returns errors in the response', errors: [err_msg]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -128,7 +128,7 @@ RSpec.describe 'rubocop rake tasks', :silence_stdout do
|
|||
context 'without arguments' do
|
||||
let(:run_task) { run_rake_task('rubocop:todo:generate') }
|
||||
|
||||
it 'generates TODOs for all RuboCop rules' do
|
||||
it 'generates TODOs for all RuboCop rules', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/437144' do
|
||||
expect { run_task }.to output(<<~OUTPUT).to_stdout
|
||||
Generating RuboCop TODOs with:
|
||||
rubocop --parallel --format RuboCop::Formatter::TodoFormatter
|
||||
|
|
|
|||
59
yarn.lock
59
yarn.lock
|
|
@ -4835,11 +4835,6 @@ commander@^6.0.0:
|
|||
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
|
||||
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
|
||||
|
||||
commander@~11.1.0:
|
||||
version "11.1.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-11.1.0.tgz#62fdce76006a68e5c1ab3314dc92e800eb83d906"
|
||||
integrity sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==
|
||||
|
||||
commondir@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
|
||||
|
|
@ -7422,11 +7417,6 @@ get-stdin@^6.0.0:
|
|||
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
|
||||
integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==
|
||||
|
||||
get-stdin@~9.0.0:
|
||||
version "9.0.0"
|
||||
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-9.0.0.tgz#3983ff82e03d56f1b2ea0d3e60325f39d703a575"
|
||||
integrity sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==
|
||||
|
||||
get-stream@^6.0.0:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
|
||||
|
|
@ -7511,7 +7501,7 @@ glob-to-regexp@^0.4.1:
|
|||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
glob@^10.3.10, glob@^10.3.7, glob@~10.3.10:
|
||||
glob@^10.3.10, glob@^10.3.7:
|
||||
version "10.3.10"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b"
|
||||
integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==
|
||||
|
|
@ -8085,7 +8075,7 @@ ignore-by-default@^1.0.1:
|
|||
resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
|
||||
integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk=
|
||||
|
||||
ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.0, ignore@~5.3.0:
|
||||
ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.0:
|
||||
version "5.3.1"
|
||||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef"
|
||||
integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==
|
||||
|
|
@ -8169,11 +8159,6 @@ ini@^1.3.4, ini@^1.3.5, ini@~1.3.0:
|
|||
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
|
||||
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
|
||||
|
||||
ini@~4.1.0:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/ini/-/ini-4.1.2.tgz#7f646dbd9caea595e61f88ef60bfff8b01f8130a"
|
||||
integrity sha512-AMB1mvwR1pyBFY/nSevUX6y8nJWS63/SzUKD3JyQn97s4xgIdgQPT75IRouIiBAN4yLQBUShNYVW0+UG25daCw==
|
||||
|
||||
inline-style-parser@0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.1.1.tgz#ec8a3b429274e9c0a1f1c4ffa9453a7fef72cea1"
|
||||
|
|
@ -9147,16 +9132,11 @@ json5@^2.1.2, json5@^2.2.3:
|
|||
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
|
||||
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
|
||||
|
||||
jsonc-parser@3.2.0:
|
||||
jsonc-parser@3.2.0, jsonc-parser@^3.0.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
|
||||
integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
|
||||
|
||||
jsonc-parser@^3.0.0, jsonc-parser@~3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a"
|
||||
integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==
|
||||
|
||||
jsonfile@^6.0.1:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
|
||||
|
|
@ -9674,21 +9654,6 @@ markdownlint-cli2@^0.12.1:
|
|||
micromatch "4.0.5"
|
||||
yaml "2.3.4"
|
||||
|
||||
markdownlint-cli@^0.39.0:
|
||||
version "0.39.0"
|
||||
resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.39.0.tgz#74378c314c793702c637184b78263ee4ebba7e33"
|
||||
integrity sha512-ZuFN7Xpsbn1Nbp0YYkeLOfXOMOfLQBik2lKRy8pVI/llmKQ2uW7x+8k5OMgF6o7XCsTDSYC/OOmeJ+3qplvnJQ==
|
||||
dependencies:
|
||||
commander "~11.1.0"
|
||||
get-stdin "~9.0.0"
|
||||
glob "~10.3.10"
|
||||
ignore "~5.3.0"
|
||||
js-yaml "^4.1.0"
|
||||
jsonc-parser "~3.2.1"
|
||||
markdownlint "~0.33.0"
|
||||
minimatch "~9.0.3"
|
||||
run-con "~1.3.2"
|
||||
|
||||
markdownlint-micromark@0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/markdownlint-micromark/-/markdownlint-micromark-0.1.2.tgz#5520e04febffa46741875a2f297509ffdb561f5c"
|
||||
|
|
@ -9706,7 +9671,7 @@ markdownlint-rule-helpers@^0.20.0:
|
|||
dependencies:
|
||||
markdownlint-micromark "0.1.2"
|
||||
|
||||
markdownlint@0.33.0, markdownlint@~0.33.0:
|
||||
markdownlint@0.33.0:
|
||||
version "0.33.0"
|
||||
resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.33.0.tgz#cc3852b2c54d5b0193710c6fdf97c5fbde7e322a"
|
||||
integrity sha512-4lbtT14A3m0LPX1WS/3d1m7Blg+ZwiLq36WvjQqFGsX3Gik99NV+VXp/PW3n+Q62xyPdbvGOCfjPqjW+/SKMig==
|
||||
|
|
@ -10395,14 +10360,14 @@ minimatch@^7.4.3:
|
|||
dependencies:
|
||||
brace-expansion "^2.0.1"
|
||||
|
||||
minimatch@^9.0.1, minimatch@~9.0.3:
|
||||
minimatch@^9.0.1:
|
||||
version "9.0.3"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825"
|
||||
integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==
|
||||
dependencies:
|
||||
brace-expansion "^2.0.1"
|
||||
|
||||
minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.8:
|
||||
minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6:
|
||||
version "1.2.8"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
|
||||
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
|
||||
|
|
@ -12296,16 +12261,6 @@ route-recognizer@^0.3.3:
|
|||
resolved "https://registry.yarnpkg.com/route-recognizer/-/route-recognizer-0.3.4.tgz#39ab1ffbce1c59e6d2bdca416f0932611e4f3ca3"
|
||||
integrity sha512-2+MhsfPhvauN1O8KaXpXAOfR/fwe8dnUXVM+xw7yt40lJRfPVQxV6yryZm0cgRvAj5fMF/mdRZbL2ptwbs5i2g==
|
||||
|
||||
run-con@~1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/run-con/-/run-con-1.3.2.tgz#755860a10ce326a96b509485fcea50b4d03754e8"
|
||||
integrity sha512-CcfE+mYiTcKEzg0IqS08+efdnH0oJ3zV0wSUFBNrMHMuxCtXvBCLzCJHatwuXDcu/RlhjTziTo/a1ruQik6/Yg==
|
||||
dependencies:
|
||||
deep-extend "^0.6.0"
|
||||
ini "~4.1.0"
|
||||
minimist "^1.2.8"
|
||||
strip-json-comments "~3.1.1"
|
||||
|
||||
run-parallel@^1.1.9:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
|
||||
|
|
@ -13075,7 +13030,7 @@ strip-json-comments@^2.0.0, strip-json-comments@~2.0.1:
|
|||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
||||
integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==
|
||||
|
||||
strip-json-comments@^3.1.1, strip-json-comments@~3.1.1:
|
||||
strip-json-comments@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
|
||||
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
|
||||
|
|
|
|||
Loading…
Reference in New Issue