Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
c46c7eba8b
commit
4722868e79
|
@ -6,7 +6,6 @@ Gitlab/DocumentationLinks/Link:
|
|||
- '**/*.haml'
|
||||
- 'app/controllers/jira_connect/app_descriptor_controller.rb'
|
||||
- 'app/controllers/jwt_controller.rb'
|
||||
- 'app/helpers/ci/jobs_helper.rb'
|
||||
- 'app/helpers/ide_helper.rb'
|
||||
- 'app/helpers/projects_helper.rb'
|
||||
- 'app/helpers/releases_helper.rb'
|
||||
|
@ -23,7 +22,6 @@ Gitlab/DocumentationLinks/Link:
|
|||
- 'ee/app/helpers/projects/security/api_fuzzing_configuration_helper.rb'
|
||||
- 'ee/app/helpers/vulnerabilities_helper.rb'
|
||||
- 'ee/app/models/integrations/github.rb'
|
||||
- 'ee/app/presenters/ee/merge_request_presenter.rb'
|
||||
- 'ee/lib/api/managed_licenses.rb'
|
||||
- 'ee/lib/ee/gitlab/namespace_storage_size_error_message.rb'
|
||||
- 'ee/lib/gitlab/checks/secrets_check.rb'
|
||||
|
|
|
@ -22,12 +22,3 @@ Gitlab/Rails/SafeFormat:
|
|||
- 'ee/app/components/namespaces/free_user_cap/usage_quota_alert_component.rb'
|
||||
- 'ee/app/components/namespaces/free_user_cap/usage_quota_trial_alert_component.rb'
|
||||
- 'ee/app/helpers/ee/application_helper.rb'
|
||||
- 'ee/app/helpers/ee/import_helper.rb'
|
||||
- 'ee/app/helpers/ee/members_helper.rb'
|
||||
- 'ee/app/helpers/ee/search_helper.rb'
|
||||
- 'ee/app/helpers/push_rules_helper.rb'
|
||||
- 'ee/app/models/integrations/git_guardian.rb'
|
||||
- 'ee/app/models/integrations/github.rb'
|
||||
- 'ee/lib/gitlab/licenses/submit_license_usage_data_banner.rb'
|
||||
- 'ee/lib/gitlab/manual_quarterly_co_term_banner.rb'
|
||||
- 'spec/helpers/profiles_helper_spec.rb'
|
||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2011-present GitLab B.V.
|
||||
Copyright (c) 2011-present GitLab Inc.
|
||||
|
||||
Portions of this software are licensed as follows:
|
||||
|
||||
|
|
|
@ -549,7 +549,7 @@ const WEB_IDE_GO_TO_FILE = {
|
|||
|
||||
/**
|
||||
* Legacy Web IDE uses @keydown.ctrl.enter and @keydown.meta.enter events here:
|
||||
* https://gitlab.com/gitlab-org/gitlab/-/blob/f3e807cdff5cf25765894163b4e92f8b2bcf8a68/app/assets/javascripts/ide/components/shared/commit_message_field.vue#L131-132
|
||||
* https://gitlab.com/gitlab-org/gitlab/-/blob/f3e807cdff5cf25765894163b4e92f8b2bcf8a68/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue#L122-123
|
||||
*/
|
||||
const WEB_IDE_COMMIT = {
|
||||
id: 'webIDE.commit',
|
||||
|
@ -557,7 +557,6 @@ const WEB_IDE_COMMIT = {
|
|||
defaultKeys: ['mod+enter'],
|
||||
customizable: false,
|
||||
};
|
||||
|
||||
// All keybinding groups
|
||||
const GLOBAL_SHORTCUTS_GROUP = {
|
||||
id: 'globalShortcuts',
|
||||
|
|
|
@ -1,136 +0,0 @@
|
|||
<script>
|
||||
import { GlIcon, GlPopover } from '@gitlab/ui';
|
||||
import { __, sprintf } from '~/locale';
|
||||
import { MAX_TITLE_LENGTH, MAX_BODY_LENGTH } from '../../constants';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
GlIcon,
|
||||
GlPopover,
|
||||
},
|
||||
props: {
|
||||
text: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
scrollTop: 0,
|
||||
isFocused: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
allLines() {
|
||||
return this.text.split('\n').map((line, i) => ({
|
||||
text: line.substr(0, this.getLineLength(i)) || ' ',
|
||||
highlightedText: line.substr(this.getLineLength(i)),
|
||||
}));
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleScroll() {
|
||||
if (this.$refs.textarea) {
|
||||
this.$nextTick(() => {
|
||||
this.scrollTop = this.$refs.textarea.scrollTop;
|
||||
});
|
||||
}
|
||||
},
|
||||
getLineLength(i) {
|
||||
return i === 0 ? MAX_TITLE_LENGTH : MAX_BODY_LENGTH;
|
||||
},
|
||||
onInput(e) {
|
||||
this.$emit('input', e.target.value);
|
||||
},
|
||||
onCtrlEnter() {
|
||||
if (!this.isFocused) return;
|
||||
this.$emit('submit');
|
||||
},
|
||||
updateIsFocused(isFocused) {
|
||||
this.isFocused = isFocused;
|
||||
},
|
||||
},
|
||||
popoverOptions: {
|
||||
triggers: 'hover',
|
||||
placement: 'top',
|
||||
content: sprintf(
|
||||
__(`
|
||||
The character highlighter helps you keep the subject line to %{titleLength} characters
|
||||
and wrap the body at %{bodyLength} so they are readable in git.
|
||||
`),
|
||||
{ titleLength: MAX_TITLE_LENGTH, bodyLength: MAX_BODY_LENGTH },
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<fieldset
|
||||
class="gl-rounded-base gl-px-5 gl-py-4 gl-shadow-inner-1-gray-400"
|
||||
:class="{
|
||||
'gl-outline-none focus:gl-focus': isFocused,
|
||||
}"
|
||||
>
|
||||
<div
|
||||
v-once
|
||||
class="gl-mb-3 gl-flex gl-items-center gl-border-b-1 gl-border-b-gray-100 gl-pb-3 gl-border-b-solid"
|
||||
>
|
||||
<div>{{ __('Commit Message') }}</div>
|
||||
<div id="commit-message-popover-container">
|
||||
<span id="commit-message-question" class="gl-gray-700 gl-ml-3">
|
||||
<gl-icon name="question-o" />
|
||||
</span>
|
||||
<gl-popover
|
||||
target="commit-message-question"
|
||||
container="commit-message-popover-container"
|
||||
v-bind="$options.popoverOptions"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gl-relative gl-h-13 gl-w-full gl-overflow-hidden">
|
||||
<div class="gl-absolute gl-z-1 gl-text-transparent gl-font-monospace">
|
||||
<div
|
||||
data-testid="highlights"
|
||||
:style="{
|
||||
transform: `translate3d(0, ${-scrollTop}px, 0)`,
|
||||
}"
|
||||
>
|
||||
<div v-for="(line, index) in allLines" :key="index">
|
||||
<span
|
||||
data-testid="highlights-text"
|
||||
class="gl-whitespace-pre-wrap gl-break-anywhere"
|
||||
v-text="line.text"
|
||||
>
|
||||
</span
|
||||
><mark
|
||||
v-show="line.highlightedText"
|
||||
data-testid="highlights-mark"
|
||||
class="gl-whitespace-pre-wrap gl-bg-orange-100 gl-px-1 gl-py-0 gl-text-transparent gl-break-anywhere"
|
||||
v-text="line.highlightedText"
|
||||
>
|
||||
</mark>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<textarea
|
||||
ref="textarea"
|
||||
:placeholder="placeholder"
|
||||
:value="text"
|
||||
class="p-0 gl-absolute gl-z-2 gl-h-full gl-w-full gl-border-0 gl-bg-transparent gl-outline-none gl-font-monospace"
|
||||
dir="auto"
|
||||
name="commit-message"
|
||||
@scroll="handleScroll"
|
||||
@input="onInput"
|
||||
@focus="updateIsFocused(true)"
|
||||
@blur="updateIsFocused(false)"
|
||||
@keydown.ctrl.enter="onCtrlEnter"
|
||||
@keydown.meta.enter="onCtrlEnter"
|
||||
>
|
||||
</textarea>
|
||||
</div>
|
||||
</fieldset>
|
||||
</template>
|
|
@ -272,7 +272,7 @@ export default {
|
|||
<div class="gl-flex gl-flex-wrap gl-items-center">
|
||||
<div
|
||||
data-testid="md-header-toolbar"
|
||||
class="md-header-toolbar gl-flex gl-grow gl-items-start gl-gap-y-2 gl-py-3"
|
||||
class="md-header-toolbar gl-flex gl-grow gl-items-start gl-gap-y-2 gl-bg-default gl-py-3"
|
||||
>
|
||||
<div class="gl-flex gl-flex-wrap gl-gap-y-2">
|
||||
<gl-button
|
||||
|
|
|
@ -11,11 +11,7 @@ module Packages
|
|||
def execute
|
||||
return packages if project && params[:package_name]
|
||||
|
||||
if Feature.enabled?(:terraform_extract_terraform_package_model, Feature.current_request)
|
||||
::Packages::TerraformModule::Package.none
|
||||
else
|
||||
::Packages::Package.none
|
||||
end
|
||||
::Packages::TerraformModule::Package.none
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -23,18 +19,10 @@ module Packages
|
|||
attr_reader :project, :params
|
||||
|
||||
def packages
|
||||
result = if Feature.enabled?(:terraform_extract_terraform_package_model, Feature.current_request)
|
||||
::Packages::TerraformModule::Package
|
||||
.for_projects(project)
|
||||
.with_name(params[:package_name])
|
||||
.installable
|
||||
else
|
||||
project
|
||||
.packages
|
||||
.with_name(params[:package_name])
|
||||
.terraform_module
|
||||
.installable
|
||||
end
|
||||
result = ::Packages::TerraformModule::Package
|
||||
.for_projects(project)
|
||||
.with_name(params[:package_name])
|
||||
.installable
|
||||
|
||||
params[:package_version] ? result.with_version(params[:package_version]) : result.has_version.order_version_desc
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ module Ci
|
|||
"artifact_help_url" => help_page_path('user/gitlab_com/index.md', anchor: 'gitlab-cicd'),
|
||||
"deployment_help_url" => help_page_path('user/project/clusters/deploy_to_cluster.md', anchor: 'troubleshooting'),
|
||||
"runner_settings_url" => project_runners_path(build.project, anchor: 'js-runners-settings'),
|
||||
"retry_outdated_job_docs_url" => help_page_path('ci/pipelines/settings.md', anchor: 'retry-outdated-jobs'),
|
||||
"retry_outdated_job_docs_url" => help_page_path('ci/pipelines/settings.md', anchor: 'prevent-outdated-deployment-jobs'),
|
||||
"pipeline_test_report_url" => test_report_project_pipeline_path(project, build.pipeline),
|
||||
"log_viewer_path" => viewer_project_job_path(project, build),
|
||||
"job_gid" => build.to_gid.to_s
|
||||
|
|
|
@ -51,11 +51,7 @@ class Namespace
|
|||
%w[namespaces], url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/424279'
|
||||
) do
|
||||
Namespace.transaction do
|
||||
if sync_traversal_ids_nowait?
|
||||
Gitlab::Database::Transaction::Settings.with('LOCK_TIMEOUT', LOCK_TIMEOUT) do
|
||||
@root.lock!('FOR NO KEY UPDATE')
|
||||
end
|
||||
else
|
||||
Gitlab::Database::Transaction::Settings.with('LOCK_TIMEOUT', LOCK_TIMEOUT) do
|
||||
@root.lock!('FOR NO KEY UPDATE')
|
||||
end
|
||||
|
||||
|
@ -121,9 +117,5 @@ class Namespace
|
|||
def db_deadlock_counter
|
||||
Gitlab::Metrics.counter(:db_deadlock, 'Counts the times we have deadlocked in the database')
|
||||
end
|
||||
|
||||
def sync_traversal_ids_nowait?
|
||||
Feature.enabled?(:sync_traversal_ids_nowait, Feature.current_request)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -49,10 +49,6 @@ class Packages::Package < ApplicationRecord
|
|||
has_many :nuget_symbols, inverse_of: :package, class_name: 'Packages::Nuget::Symbol'
|
||||
has_one :npm_metadatum, inverse_of: :package, class_name: 'Packages::Npm::Metadatum'
|
||||
|
||||
# TODO: Remove with the rollout of the FF terraform_extract_terraform_package_model
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/490007
|
||||
has_one :terraform_module_metadatum, inverse_of: :package, class_name: 'Packages::TerraformModule::Metadatum'
|
||||
|
||||
has_many :build_infos, inverse_of: :package
|
||||
has_many :pipelines, through: :build_infos, disable_joins: true
|
||||
has_many :matching_package_protection_rules, ->(package) { where(package_type: package.package_type).for_package_name(package.name) }, through: :project, source: :package_protection_rules
|
||||
|
@ -76,17 +72,11 @@ class Packages::Package < ApplicationRecord
|
|||
validates :name, format: { with: Gitlab::Regex.npm_package_name_regex, message: Gitlab::Regex.npm_package_name_regex_message }, if: :npm?
|
||||
validates :name, format: { with: Gitlab::Regex.nuget_package_name_regex }, if: :nuget?
|
||||
|
||||
# TODO: Remove with the rollout of the FF terraform_extract_terraform_package_model
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/490007
|
||||
validates :name, format: { with: Gitlab::Regex.terraform_module_package_name_regex }, if: :terraform_module?
|
||||
|
||||
validates :version, format: { with: Gitlab::Regex.nuget_version_regex }, if: :nuget?
|
||||
validates :version, format: { with: Gitlab::Regex.maven_version_regex }, if: -> { version? && maven? }
|
||||
|
||||
# TODO: Remove `terraform_module?` condition with the rollout of the FF terraform_extract_terraform_package_model
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/490007
|
||||
validates :version, format: { with: Gitlab::Regex.semver_regex, message: Gitlab::Regex.semver_regex_message },
|
||||
if: -> { npm? || terraform_module? }
|
||||
if: -> { npm? }
|
||||
|
||||
scope :for_projects, ->(project_ids) { where(project_id: project_ids) }
|
||||
scope :with_name, ->(name) { where(name: name) }
|
||||
|
@ -177,7 +167,7 @@ class Packages::Package < ApplicationRecord
|
|||
def self.inheritance_column = 'package_type'
|
||||
|
||||
def self.inheritance_column_to_class_map
|
||||
hash = {
|
||||
{
|
||||
ml_model: 'Packages::MlModel::Package',
|
||||
golang: 'Packages::Go::Package',
|
||||
rubygems: 'Packages::Rubygems::Package',
|
||||
|
@ -187,14 +177,9 @@ class Packages::Package < ApplicationRecord
|
|||
composer: 'Packages::Composer::Package',
|
||||
helm: 'Packages::Helm::Package',
|
||||
generic: 'Packages::Generic::Package',
|
||||
pypi: 'Packages::Pypi::Package'
|
||||
}
|
||||
|
||||
if Feature.enabled?(:terraform_extract_terraform_package_model, Feature.current_request)
|
||||
hash[:terraform_module] = 'Packages::TerraformModule::Package'
|
||||
end
|
||||
|
||||
hash
|
||||
pypi: 'Packages::Pypi::Package',
|
||||
terraform_module: 'Packages::TerraformModule::Package'
|
||||
}.freeze
|
||||
end
|
||||
|
||||
def self.only_maven_packages_with_path(path, use_cte: false)
|
||||
|
|
|
@ -10,34 +10,15 @@ module Packages
|
|||
MAX_FIELDS_SIZE = 10.megabytes
|
||||
|
||||
belongs_to :package, class_name: 'Packages::TerraformModule::Package', inverse_of: :terraform_module_metadatum
|
||||
|
||||
# TODO: Remove with the rollout of the FF terraform_extract_terraform_package_model
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/480692
|
||||
belongs_to :legacy_package, -> {
|
||||
where(package_type: :terraform_module)
|
||||
}, inverse_of: :terraform_module_metadatum, class_name: 'Packages::Package', foreign_key: :package_id
|
||||
|
||||
belongs_to :project
|
||||
|
||||
validates :package, presence: true, if: -> { terraform_extract_terraform_package_model_enabled? }
|
||||
|
||||
# TODO: Remove with the rollout of the FF terraform_extract_terraform_package_model
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/480692
|
||||
validates :legacy_package, presence: true, unless: -> { terraform_extract_terraform_package_model_enabled? }
|
||||
|
||||
validates :package, presence: true
|
||||
validates :project, :fields, presence: true
|
||||
validates :fields, json_schema: { filename: 'terraform_module_metadata', detail_errors: true }
|
||||
validate :terraform_module_package_type, unless: -> { terraform_extract_terraform_package_model_enabled? }
|
||||
validate :ensure_fields_size
|
||||
|
||||
private
|
||||
|
||||
def terraform_module_package_type
|
||||
return if legacy_package&.terraform_module?
|
||||
|
||||
errors.add(:base, _('Package type must be Terraform Module'))
|
||||
end
|
||||
|
||||
def ensure_fields_size
|
||||
return if fields.to_s.size <= MAX_FIELDS_SIZE
|
||||
|
||||
|
@ -47,11 +28,6 @@ module Packages
|
|||
message: format(_('metadata is too large (maximum is %{max_size} characters)'), max_size: MAX_FIELDS_SIZE)
|
||||
)
|
||||
end
|
||||
|
||||
def terraform_extract_terraform_package_model_enabled?
|
||||
Feature.enabled?(:terraform_extract_terraform_package_model, Feature.current_request)
|
||||
end
|
||||
strong_memoize_attr :terraform_extract_terraform_package_model_enabled?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,18 +11,13 @@ module Packages
|
|||
|
||||
def execute
|
||||
metadata = ::Packages::TerraformModule::Metadatum.new(
|
||||
package: package,
|
||||
project: package.project,
|
||||
fields: metadata_hash,
|
||||
updated_at: Time.current,
|
||||
created_at: Time.current
|
||||
)
|
||||
|
||||
if Feature.enabled?(:terraform_extract_terraform_package_model, Feature.current_request)
|
||||
metadata.package = package
|
||||
else
|
||||
metadata.legacy_package = package
|
||||
end
|
||||
|
||||
if metadata.valid?
|
||||
::Packages::TerraformModule::Metadatum.upsert(metadata.attributes, returning: false)
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@ module Projects
|
|||
end
|
||||
|
||||
def execute
|
||||
return false unless can?(current_user, :remove_project, project)
|
||||
unless can?(current_user, :remove_project, project)
|
||||
project.update_attribute(:pending_delete, false) if project.pending_delete?
|
||||
return false
|
||||
end
|
||||
|
||||
project.update_attribute(:pending_delete, true)
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
name: sync_traversal_ids_nowait
|
||||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/468848
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/158024
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/472155
|
||||
milestone: '17.3'
|
||||
group: group::tenant scale
|
||||
type: gitlab_com_derisk
|
||||
default_enabled: false
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
name: terraform_extract_terraform_package_model
|
||||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/435834
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/167045
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/490007
|
||||
milestone: '17.6'
|
||||
group: group::package registry
|
||||
type: gitlab_com_derisk
|
||||
default_enabled: false
|
|
@ -2,6 +2,11 @@
|
|||
announcement_milestone: "14.5" # The milestone when this feature was first announced as deprecated.
|
||||
removal_milestone: "16.0" # the milestone when this feature is planned to be removed
|
||||
breaking_change: true
|
||||
impact: medium
|
||||
scope: instance, group, project
|
||||
resolution_role: Owner
|
||||
manual_task: true
|
||||
window: "1"
|
||||
body: | # Do not modify this line, instead modify the lines below.
|
||||
The GitLab Runner GraphQL API endpoints will not return `paused` or `active` as a status in GitLab 16.0.
|
||||
In a future v5 of the REST API, the endpoints for GitLab Runner will also not return `paused` or `active`.
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
reporter: pedropombeiro # (required) GitLab username of the person reporting the deprecation
|
||||
stage: Verify # (required) String value of the stage that the feature was created in. e.g., Growth
|
||||
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/379743 # (required) Link to the deprecation issue in GitLab
|
||||
impact: critical
|
||||
scope: instance, group, project
|
||||
resolution_role: Admin
|
||||
manual_task: true
|
||||
window: "1"
|
||||
body: | # (required) Do not modify this line, instead modify the lines below.
|
||||
The support for registration tokens and certain runner configuration arguments in the `POST` method operation on the `/api/v4/runners` endpoint is deprecated.
|
||||
This endpoint [registers](https://docs.gitlab.com/ee/api/runners.html#register-a-new-runner) a runner
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
reporter: pedropombeiro # (required) GitLab username of the person reporting the deprecation
|
||||
stage: Verify # (required) String value of the stage that the feature was created in. e.g., Growth
|
||||
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/381111 # (required) Link to the deprecation issue in GitLab
|
||||
impact: critical
|
||||
scope: instance, group, project
|
||||
resolution_role: Admin
|
||||
manual_task: true
|
||||
window: "1"
|
||||
body: | # (required) Do not modify this line, instead modify the lines below.
|
||||
The [`runnerRegistrationToken`](https://docs.gitlab.com/runner/install/kubernetes.html) parameter to use the GitLab Helm Chart to install a runner on Kubernetes is deprecated.
|
||||
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
reporter: pedropombeiro # (required) GitLab username of the person reporting the deprecation
|
||||
stage: Verify # (required) String value of the stage that the feature was created in. e.g., Growth
|
||||
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/380872 # (required) Link to the deprecation issue in GitLab
|
||||
impact: critical
|
||||
scope: instance, group, project
|
||||
resolution_role: Admin
|
||||
manual_task: true
|
||||
window: "1"
|
||||
body: | # (required) Do not modify this line, instead modify the lines below.
|
||||
Registration tokens and certain configuration arguments in the command `gitlab-runner register` that [registers](https://docs.gitlab.com/runner/register/) a runner, are deprecated.
|
||||
Authentication tokens will be used to register runners instead. Registration tokens, and support for certain configuration arguments,
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
reporter: pedropombeiro # (required) GitLab username of the person reporting the deprecation
|
||||
stage: Verify # (required) String value of the stage that the feature was created in. e.g., Growth
|
||||
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/383341 # (required) Link to the deprecation issue in GitLab
|
||||
impact: critical
|
||||
scope: instance, group, project
|
||||
resolution_role: Admin
|
||||
manual_task: true
|
||||
window: "1"
|
||||
body: | # (required) Do not modify this line, instead modify the lines below.
|
||||
The support for runner registration tokens is deprecated. As a consequence, the REST API endpoints to reset a registration token are also deprecated and will
|
||||
return the HTTP `410 Gone` status code in GitLab 18.0.
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
stage: Verify # (required) String value of the stage that the feature was created in. e.g., Growth
|
||||
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/385235 # (required) Link to the deprecation issue in GitLab
|
||||
body: | # (required) Do not modify this line, instead modify the lines below.
|
||||
The [`gitlab-runner exec`](https://docs.gitlab.com/runner/commands/#gitlab-runner-exec) command is deprecated and will be fully removed from GitLab Runner in 16.0. The `gitlab-runner exec` feature was initially developed to provide the ability to validate a GitLab CI pipeline on a local system without needing to commit the updates to a GitLab instance. However, with the continued evolution of GitLab CI, replicating all GitLab CI features into `gitlab-runner exec` was no longer viable. Pipeline syntax and validation [simulation](https://docs.gitlab.com/ee/ci/pipeline_editor/#simulate-a-cicd-pipeline) are available in the GitLab pipeline editor.
|
||||
The `gitlab-runner exec` command is deprecated and will be fully removed from GitLab Runner in 16.0. The `gitlab-runner exec` feature was initially developed to provide the ability to validate a GitLab CI pipeline on a local system without needing to commit the updates to a GitLab instance. However, with the continued evolution of GitLab CI, replicating all GitLab CI features into `gitlab-runner exec` was no longer viable. Pipeline syntax and validation [simulation](https://docs.gitlab.com/ee/ci/pipeline_editor/#simulate-a-cicd-pipeline) are available in the GitLab pipeline editor.
|
||||
end_of_support_milestone: # (optional) Use "XX.YY" format. The milestone when support for this feature will end.
|
||||
|
||||
|
||||
# OTHER OPTIONAL FIELDS
|
||||
#
|
||||
tiers: # (optional - may be required in the future) An array of tiers that the feature is available in currently. e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
|
||||
documentation_url: https://docs.gitlab.com/runner/commands/#gitlab-runner-exec # (optional) This is a link to the current documentation page
|
||||
image_url: # (optional) This is a link to a thumbnail image depicting the feature
|
||||
video_url: # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
scope: instance
|
||||
resolution_role: Admin
|
||||
manual_task: true
|
||||
window: "2"
|
||||
body: |
|
||||
The `ciDuration` field of the `CiRunnerUsage` and `CiRunnerUsageByProject` types replaces the former `ciUsedMinutes` field.
|
||||
Update all references to `ciUsedMinutes` from these types to `ciDuration`.
|
||||
|
|
|
@ -137,7 +137,7 @@ As illustrated in the following diagram:
|
|||
|
||||
To establish a fully isolated self-hosted infrastructure:
|
||||
|
||||
1. **Install the large language model (LLM) serving infrastructure**
|
||||
1. **Install a Large Language Model (LLM) Serving Infrastructure**
|
||||
|
||||
- We support various platforms for serving and hosting your LLMs, such as vLLM, AWS Bedrock, and Azure OpenAI. To help you choose the most suitable option for effectively deploying your models, see the [supported LLM platforms documentation](supported_llm_serving_platforms.md) for more information on each platform's features.
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ There are multiple platforms available to host your self-hosted Large Language M
|
|||
1. [vLLM](https://docs.vllm.ai/en/latest/index.html).
|
||||
A high-performance inference server optimized for serving LLMs with memory efficiency. It supports model parallelism and integrates easily with existing workflows.
|
||||
- [vLLM Installation Guide](https://docs.vllm.ai/en/latest/getting_started/installation.html)
|
||||
- [vLLM Supported Models](https://docs.vllm.ai/en/latest/models/supported_models.html)
|
||||
|
||||
## For cloud-hosted model deployments
|
||||
|
||||
|
@ -34,3 +35,4 @@ There are multiple platforms available to host your self-hosted Large Language M
|
|||
1. [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/).
|
||||
Provides access to OpenAI's powerful models, enabling developers to integrate advanced AI capabilities into their applications with robust security and scalable infrastructure.
|
||||
- [Working with Azure OpenAI models](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/working-with-models?tabs=powershell)
|
||||
- [Azure OpenAI Service models](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure%2Cglobal-standard%2Cstandard-chat-completions)
|
||||
|
|
|
@ -47,7 +47,6 @@ The following models are under evaluation, and support is limited:
|
|||
| DeepSeekCoder | [DeepSeek Coder 33b Instruct](https://huggingface.co/deepseek-ai/deepseek-coder-33b-instruct) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
|
||||
| DeepSeekCoder | [DeepSeek Coder 33b Base](https://huggingface.co/deepseek-ai/deepseek-coder-33b-base) | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No |
|
||||
| GPT | [GPT-3.5-Turbo](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-35) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
|
||||
| GPT | [GPT-4](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-4) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
|
||||
| GPT | [GPT-4 Turbo](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-4) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
|
||||
| GPT | [GPT-4o](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-4o-and-gpt-4-turbo) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
|
||||
| GPT | [GPT-4o-mini](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=python-secure#gpt-4o-and-gpt-4-turbo) | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No |
|
||||
|
@ -60,5 +59,7 @@ For optimal performance, the following hardware specifications are recommended a
|
|||
|
||||
- **CPU**: Minimum 8 cores (16 threads recommended).
|
||||
- **RAM**: At least 32 GB (64 GB or more recommended for larger models).
|
||||
- **GPU**: 2x NVIDIA A100 or equivalent for optimal inference performance.
|
||||
- **GPU**:
|
||||
- **Minimum**: 2x NVIDIA A100 or equivalent for optimal inference performance.
|
||||
- **Note**: For running Mixtral 8x22B and Mixtral 8x22B-it, it is recommended to use 8x NVIDIA A100 GPUs.
|
||||
- **Storage**: SSD with sufficient space for model weights and data.
|
||||
|
|
|
@ -21,9 +21,12 @@ To set up the GitLab for Jira Cloud app on your self-managed instance, do one of
|
|||
- [Install the GitLab for Jira Cloud app manually](#install-the-gitlab-for-jira-cloud-app-manually).
|
||||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
For an overview, see
|
||||
[Configure the GitLab for Jira Cloud app from the Atlassian Marketplace with a self-managed instance](https://www.youtube.com/watch?v=dka9fLoGsno&t=1665s).
|
||||
<!-- Video published on 2024-06-27 -->
|
||||
For an overview, see:
|
||||
|
||||
- [Installing the GitLab for Jira Cloud app from the Atlassian Marketplace for a self-managed instance](https://youtu.be/RnDw4PzmdW8?list=PL05JrBw4t0Koazgli_PmMQCER2pVH7vUT)
|
||||
<!-- Video published on 2024-10-30 -->
|
||||
- [Installing the GitLab for Jira Cloud app manually for a self-managed instance](https://youtu.be/fs02xS8BElA?list=PL05JrBw4t0Koazgli_PmMQCER2pVH7vUT)
|
||||
<!-- Video published on 2024-10-30 -->
|
||||
|
||||
If you [install the GitLab for Jira Cloud app from the Atlassian Marketplace](#install-the-gitlab-for-jira-cloud-app-from-the-atlassian-marketplace),
|
||||
you can use the [project toolchain](https://support.atlassian.com/jira-software-cloud/docs/what-is-the-connections-feature/) developed and maintained
|
||||
|
|
|
@ -64,8 +64,8 @@ You can now [configure the GitLab for Jira Cloud app](#configure-the-gitlab-for-
|
|||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
For an overview, see
|
||||
[Configure the GitLab for Jira Cloud app from the Atlassian Marketplace](https://youtu.be/SwR-g1s1zTo).
|
||||
<!-- Video published on 2020-02-01 -->
|
||||
[Installing the GitLab for Jira Cloud app from the Atlassian Marketplace for GitLab.com](https://youtu.be/52rB586_rs8?list=PL05JrBw4t0Koazgli_PmMQCER2pVH7vUT).
|
||||
<!-- Video published on 2024-10-30 -->
|
||||
|
||||
## Configure the GitLab for Jira Cloud app
|
||||
|
||||
|
|
|
@ -295,3 +295,18 @@ To [continue using](https://about.gitlab.com/gitlab-duo/) GitLab Duo Pro or GitL
|
|||
- Purchase GitLab Duo Pro or Duo Enterprise
|
||||
|
||||
GitLab Duo Enterprise is available only for Ultimate subscriptions.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Unable to use the UI to assign seats to your users
|
||||
|
||||
On the **Usage Quotas** page, if you experience both of the following, you will be unable to use the UI to assign seats to your users:
|
||||
|
||||
- The **Seats** tab does not load.
|
||||
- The following error message is displayed:
|
||||
|
||||
```plaintext
|
||||
An error occurred while loading billable members list.
|
||||
```
|
||||
|
||||
As a workaround, you can use the GraphQL queries in [this snippet](https://gitlab.com/gitlab-org/gitlab/-/snippets/3763094) to assign seats to users.
|
||||
|
|
|
@ -0,0 +1,136 @@
|
|||
---
|
||||
stage: Create
|
||||
group: Source Code
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
|
||||
description: "To remove unwanted large files from a Git repository and reduce its storage size, use the filter-repo command."
|
||||
---
|
||||
|
||||
# Reduce repository size
|
||||
|
||||
DETAILS:
|
||||
**Tier:** Free, Premium, Ultimate
|
||||
**Offering:** GitLab.com, Self-managed, GitLab Dedicated
|
||||
|
||||
The size of a Git repository can significantly impact performance and storage costs.
|
||||
It can differ slightly from one instance to another due to compression, housekeeping, and other factors.
|
||||
|
||||
This page explains how to remove large files from your Git repository.
|
||||
|
||||
For more information about repository size, see:
|
||||
|
||||
- [Repository size](../../user/project/repository/repository_size.md)
|
||||
- [How repository size is calculated](../../user/project/repository/repository_size.md#size-calculation)
|
||||
- [Size and storage limits](../../user/project/repository/repository_size.md#size-and-storage-limits)
|
||||
- [GitLab UI methods to reduce repository size](../../user/project/repository/repository_size.md#methods-to-reduce-repository-size)
|
||||
|
||||
## Purge files from repository history
|
||||
|
||||
Use this method to remove large files from the entire Git history.
|
||||
|
||||
It is not suitable for removing sensitive data like passwords or keys from your repository.
|
||||
Information about commits, including file content, is cached in the database, and remain visible
|
||||
even after they have been removed from the repository. To remove sensitive data, use the method
|
||||
described in [Remove blobs](../../user/project/repository/repository_size.md#remove-files).
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must install [`git filter-repo`](https://github.com/newren/git-filter-repo/blob/main/INSTALL.md).
|
||||
- Optional. Install [`git-sizer`](https://github.com/github/git-sizer#getting-started).
|
||||
|
||||
WARNING:
|
||||
Purging files is a destructive operation. Before proceeding, ensure you have a backup of the repository.
|
||||
|
||||
To purge files from a GitLab repository:
|
||||
|
||||
1. [Export the project](../../user/project/settings/import_export.md#export-a-project-and-its-data) that contains
|
||||
a copy of your repository, and download it.
|
||||
|
||||
- For large projects, you can use the [Project relations export API](../../api/project_relations_export.md).
|
||||
|
||||
1. Decompress and extract the backup:
|
||||
|
||||
```shell
|
||||
tar xzf project-backup.tar.gz
|
||||
```
|
||||
|
||||
1. Clone the repository using `--bare` and `--mirror` options:
|
||||
|
||||
```shell
|
||||
git clone --bare --mirror /path/to/project.bundle
|
||||
```
|
||||
|
||||
1. Go to the `project.git` directory:
|
||||
|
||||
```shell
|
||||
cd project.git
|
||||
```
|
||||
|
||||
1. Update the remote URL:
|
||||
|
||||
```shell
|
||||
git remote set-url origin https://gitlab.example.com/<namespace>/<project_name>.git
|
||||
```
|
||||
|
||||
1. Analyze the repository using `git filter-repo` or `git-sizer`:
|
||||
|
||||
- `git filter-repo`:
|
||||
|
||||
```shell
|
||||
git filter-repo --analyze
|
||||
head filter-repo/analysis/*-{all,deleted}-sizes.txt
|
||||
```
|
||||
|
||||
- `git-sizer`:
|
||||
|
||||
```shell
|
||||
git-sizer
|
||||
```
|
||||
|
||||
1. Purge the history of your repository using one of the following `git filter-repo` options:
|
||||
|
||||
- `--path` and `--invert-paths` to purge specific files:
|
||||
|
||||
```shell
|
||||
git filter-repo --path path/to/file.ext --invert-paths
|
||||
```
|
||||
|
||||
- `--strip-blobs-bigger-than` to purge all files larger than for example 10M:
|
||||
|
||||
```shell
|
||||
git filter-repo --strip-blobs-bigger-than 10M
|
||||
```
|
||||
|
||||
For more examples, see the
|
||||
[`git filter-repo` documentation](https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html#EXAMPLES).
|
||||
|
||||
1. Back up the `commit-map`:
|
||||
|
||||
```shell
|
||||
cp filter-repo/commit-map ./_filter_repo_commit_map_$(date +%s)
|
||||
```
|
||||
|
||||
1. Unset the mirror flag:
|
||||
|
||||
```shell
|
||||
git config --unset remote.origin.mirror
|
||||
```
|
||||
|
||||
1. Force push the changes:
|
||||
|
||||
```shell
|
||||
git push origin --force 'refs/heads/*'
|
||||
git push origin --force 'refs/tags/*'
|
||||
git push origin --force 'refs/replace/*'
|
||||
```
|
||||
|
||||
For more information about references, see
|
||||
[Git references used by Gitaly](../../development/gitaly.md#git-references-used-by-gitaly).
|
||||
|
||||
NOTE:
|
||||
This step fails for [protected branches](../../user/project/repository/branches/protected.md) and
|
||||
[protected tags](../../user/project/protected_tags.md). To proceed, temporarily remove protections.
|
||||
|
||||
1. Wait at least 30 minutes before the next step.
|
||||
1. Run the [clean up repository](../../user/project/repository/repository_size.md#clean-up-repository) process.
|
||||
This process only cleans up objects that are more than 30 minutes old.
|
||||
For more information, see [space not being freed after cleanup](../../user/project/repository/repository_size.md#space-not-being-freed-after-cleanup).
|
|
@ -2756,7 +2756,7 @@ Due to limited customer usage and capabilities, the Visual Reviews feature for R
|
|||
|
||||
</div>
|
||||
|
||||
The [`gitlab-runner exec`](https://docs.gitlab.com/runner/commands/#gitlab-runner-exec) command is deprecated and will be fully removed from GitLab Runner in 16.0. The `gitlab-runner exec` feature was initially developed to provide the ability to validate a GitLab CI pipeline on a local system without needing to commit the updates to a GitLab instance. However, with the continued evolution of GitLab CI, replicating all GitLab CI features into `gitlab-runner exec` was no longer viable. Pipeline syntax and validation [simulation](https://docs.gitlab.com/ee/ci/pipeline_editor/#simulate-a-cicd-pipeline) are available in the GitLab pipeline editor.
|
||||
The `gitlab-runner exec` command is deprecated and will be fully removed from GitLab Runner in 16.0. The `gitlab-runner exec` feature was initially developed to provide the ability to validate a GitLab CI pipeline on a local system without needing to commit the updates to a GitLab instance. However, with the continued evolution of GitLab CI, replicating all GitLab CI features into `gitlab-runner exec` was no longer viable. Pipeline syntax and validation [simulation](https://docs.gitlab.com/ee/ci/pipeline_editor/#simulate-a-cicd-pipeline) are available in the GitLab pipeline editor.
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -62,107 +62,7 @@ Information about commits, including file content, is cached in the database, an
|
|||
even after they have been removed from the repository. To remove sensitive data, use the method
|
||||
described in [Remove blobs](#remove-files).
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- [`git filter-repo`](https://github.com/newren/git-filter-repo/blob/main/INSTALL.md) installed.
|
||||
- Optional: [`git-sizer`](https://github.com/github/git-sizer#getting-started) installed.
|
||||
|
||||
WARNING:
|
||||
Purging files is a destructive operation. Before proceeding, ensure you have a backup of the repository before.
|
||||
|
||||
To purge files from a GitLab repository:
|
||||
|
||||
1. [Export the project](../settings/import_export.md#export-a-project-and-its-data), that contains
|
||||
a copy of your repository, and download it.
|
||||
|
||||
- For large projects, you can use the [Project relations export API](../../../api/project_relations_export.md).
|
||||
|
||||
1. Decompress and extract the backup:
|
||||
|
||||
```shell
|
||||
tar xzf project-backup.tar.gz
|
||||
```
|
||||
|
||||
1. Clone the repository using `--bare` and `--mirror` options:
|
||||
|
||||
```shell
|
||||
git clone --bare --mirror /path/to/project.bundle
|
||||
```
|
||||
|
||||
1. Go to the `project.git` directory:
|
||||
|
||||
```shell
|
||||
cd project.git
|
||||
```
|
||||
|
||||
1. Update the remote URL:
|
||||
|
||||
```shell
|
||||
git remote set-url origin https://gitlab.example.com/<namespace>/<project_name>.git
|
||||
```
|
||||
|
||||
1. Analyze the repository using `git filter-repo` or `git-sizer`:
|
||||
|
||||
- `git filter-repo`:
|
||||
|
||||
```shell
|
||||
git filter-repo --analyze
|
||||
head filter-repo/analysis/*-{all,deleted}-sizes.txt
|
||||
```
|
||||
|
||||
- `git-sizer`:
|
||||
|
||||
```shell
|
||||
git-sizer
|
||||
```
|
||||
|
||||
1. Purge the history of your repository using one of the following `git filter-repo` options:
|
||||
|
||||
- `--path` and `--invert-paths` to purge specific files:
|
||||
|
||||
```shell
|
||||
git filter-repo --path path/to/file.ext --invert-paths
|
||||
```
|
||||
|
||||
- `--strip-blobs-bigger-than` to purge all files larger than for example 10M:
|
||||
|
||||
```shell
|
||||
git filter-repo --strip-blobs-bigger-than 10M
|
||||
```
|
||||
|
||||
For more examples, see the
|
||||
[`git filter-repo` documentation](https://htmlpreview.github.io/?https://github.com/newren/git-filter-repo/blob/docs/html/git-filter-repo.html#EXAMPLES).
|
||||
|
||||
1. Back up the `commit-map`:
|
||||
|
||||
```shell
|
||||
cp filter-repo/commit-map ./_filter_repo_commit_map_$(date +%s)
|
||||
```
|
||||
|
||||
1. Unset the mirror flag:
|
||||
|
||||
```shell
|
||||
git config --unset remote.origin.mirror
|
||||
```
|
||||
|
||||
1. Force push the changes:
|
||||
|
||||
```shell
|
||||
git push origin --force 'refs/heads/*'
|
||||
git push origin --force 'refs/tags/*'
|
||||
git push origin --force 'refs/replace/*'
|
||||
```
|
||||
|
||||
For more information about references, see
|
||||
[Git references used by Gitaly](../../../development/gitaly.md#git-references-used-by-gitaly).
|
||||
|
||||
NOTE:
|
||||
This step fails for [protected branches](../repository/branches/protected.md) and
|
||||
[protected tags](../protected_tags.md). To proceed, temporarily remove protections.
|
||||
|
||||
1. Wait at least 30 minutes before the next step.
|
||||
1. Run the [clean up repository](#clean-up-repository) process. This process only cleans up objects
|
||||
that are more than 30 minutes old. For more information, see [space not being freed after cleanup](#space-not-being-freed-after-cleanup).
|
||||
For more information, see [use Git to purge files from repository history](../../../topics/git/repository.md#purge-files-from-repository-history).
|
||||
|
||||
### Clean up repository
|
||||
|
||||
|
|
|
@ -3825,9 +3825,6 @@ msgstr ""
|
|||
msgid "AdminSelfHostedModels|API token"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|API token (if needed)"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|Accept GitLab Testing Agreement"
|
||||
msgstr ""
|
||||
|
||||
|
@ -3837,18 +3834,12 @@ msgstr ""
|
|||
msgid "AdminSelfHostedModels|Add and manage models that can be used for GitLab AI features."
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|Add self-hosted language models to use as backups for GitLab Duo features."
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|Add self-hosted model"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|Add self-hosted models"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|An API key is set"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|An error occurred while deleting your self-hosted model. Please try again."
|
||||
msgstr ""
|
||||
|
||||
|
@ -3861,15 +3852,9 @@ msgstr ""
|
|||
msgid "AdminSelfHostedModels|Configure GitLab Duo by adding and managing your own %{self_hosted_models_link_start}self-hosted models%{self_hosted_models_link_end}. To get started, you must first accept the %{gitlab_testing_agreement_link_start}GitLab Testing Agreement%{gitlab_testing_agreement_link_end}."
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|Create model"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|Create self-hosted model"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|Define your set of self-hosted models"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|Delete self-hosted model"
|
||||
msgstr ""
|
||||
|
||||
|
@ -3921,12 +3906,6 @@ msgstr ""
|
|||
msgid "AdminSelfHostedModels|Name"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|Name the deployment (must be unique)"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|New self-hosted model"
|
||||
msgstr ""
|
||||
|
||||
msgid "AdminSelfHostedModels|Once the model is no longer in use, you can return here to delete it."
|
||||
msgstr ""
|
||||
|
||||
|
@ -38781,9 +38760,6 @@ msgstr ""
|
|||
msgid "Package type must be NuGet"
|
||||
msgstr ""
|
||||
|
||||
msgid "Package type must be Terraform Module"
|
||||
msgstr ""
|
||||
|
||||
msgid "PackageRegistry|%{linkStart}Wildcards%{linkEnd} such as `my-package-*` are supported."
|
||||
msgstr ""
|
||||
|
||||
|
@ -51102,18 +51078,6 @@ msgstr ""
|
|||
msgid "Selecting a GitLab user will add a link to the GitLab user in the descriptions of issues and comments (e.g. \"By %{link_open}@johnsmith%{link_close}\"). It will also associate and/or assign these issues and comments with the selected user."
|
||||
msgstr ""
|
||||
|
||||
msgid "Self-Hosted Model was created"
|
||||
msgstr ""
|
||||
|
||||
msgid "Self-Hosted Model was deleted"
|
||||
msgstr ""
|
||||
|
||||
msgid "Self-Hosted Model was updated"
|
||||
msgstr ""
|
||||
|
||||
msgid "Self-hosted models dropdown"
|
||||
msgstr ""
|
||||
|
||||
msgid "Send"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -7,5 +7,20 @@ module QA
|
|||
QA::Page::Group::Menu.perform(&:go_to_epics)
|
||||
EE::Page::Group::WorkItem::Epic::Index.perform(&:work_item_epics_enabled?)
|
||||
end
|
||||
|
||||
def resource_accessable?(resource_web_url)
|
||||
return unless Runtime::Address.valid?(resource_web_url)
|
||||
|
||||
Support::Retrier.retry_until(sleep_interval: 3, max_attempts: 5, raise_on_failure: false) do
|
||||
response_check = Support::API.get(resource_web_url)
|
||||
response_check.code == 200
|
||||
end
|
||||
end
|
||||
|
||||
def update_web_url(group, epic)
|
||||
# work item epics have a web url containing /-/work_items/ but depending on FF status, it may not be
|
||||
# accessible and would be rerouted to /-/epics/
|
||||
epic.web_url = "#{group.web_url}/-/epics/#{epic.iid}" unless resource_accessable?(epic.web_url)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,6 +11,14 @@ module QA
|
|||
current_date.next_month.strftime("%Y/%m/%d")
|
||||
end
|
||||
|
||||
def current_date_yyyy_mm_dd_iso
|
||||
current_date.to_date.iso8601
|
||||
end
|
||||
|
||||
def next_month_yyyy_mm_dd_iso
|
||||
current_date.next_month.to_date.iso8601
|
||||
end
|
||||
|
||||
def thirteen_days_from_now_yyyy_mm_dd
|
||||
(current_date + 13).strftime("%Y/%m/%d")
|
||||
end
|
||||
|
|
|
@ -284,7 +284,6 @@ spec/frontend/ide/components/merge_requests/item_spec.js
|
|||
spec/frontend/ide/components/merge_requests/list_spec.js
|
||||
spec/frontend/ide/components/nav_dropdown_button_spec.js
|
||||
spec/frontend/ide/components/new_dropdown/index_spec.js
|
||||
spec/frontend/ide/components/shared/commit_message_field_spec.js
|
||||
spec/frontend/ide/ide_router_extension_spec.js
|
||||
spec/frontend/ide/ide_router_spec.js
|
||||
spec/frontend/ide/sync_router_and_store_spec.js
|
||||
|
|
|
@ -62,33 +62,6 @@ FactoryBot.define do
|
|||
end
|
||||
end
|
||||
|
||||
# TODO: Remove with the rollout of the FF terraform_extract_terraform_package_model
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/490007
|
||||
factory :terraform_module_package_legacy do
|
||||
sequence(:name) { |n| "module-#{n}/system" }
|
||||
version { '1.0.0' }
|
||||
package_type { :terraform_module }
|
||||
|
||||
transient do
|
||||
without_package_files { false }
|
||||
end
|
||||
|
||||
after :create do |package, evaluator|
|
||||
unless evaluator.without_package_files
|
||||
create :package_file, :terraform_module, package: package
|
||||
end
|
||||
end
|
||||
|
||||
trait :with_build do
|
||||
after :create do |package|
|
||||
user = package.project.creator
|
||||
pipeline = create(:ci_pipeline, user: user)
|
||||
create(:ci_build, user: user, pipeline: pipeline)
|
||||
create :package_build_info, package: package, pipeline: pipeline
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
factory :nuget_package do
|
||||
sequence(:name) { |n| "NugetPackage#{n}" }
|
||||
sequence(:version) { |n| "1.0.#{n}" }
|
||||
|
|
|
@ -67,72 +67,5 @@ RSpec.describe ::Packages::TerraformModule::PackagesFinder, feature_category: :p
|
|||
it { is_expected.to eq([package2]) }
|
||||
end
|
||||
end
|
||||
|
||||
context 'when terraform_extract_terraform_package_model is disabled' do
|
||||
# rubocop:disable Cop/AvoidBecomes -- implementing inheritance for Terraform packages https://gitlab.com/gitlab-org/gitlab/-/issues/435834
|
||||
let_it_be_with_reload(:package1) { package1.becomes(::Packages::Package) }
|
||||
let_it_be(:package2) { package2.becomes(::Packages::Package) }
|
||||
# rubocop:enable Cop/AvoidBecomes
|
||||
|
||||
before do
|
||||
stub_feature_flags(terraform_extract_terraform_package_model: false)
|
||||
end
|
||||
|
||||
context 'without project' do
|
||||
let(:project) { nil }
|
||||
|
||||
it { is_expected.to be_empty }
|
||||
|
||||
context 'with package_name' do
|
||||
let(:params) { { package_name: package1.name } }
|
||||
|
||||
it { is_expected.to be_empty }
|
||||
end
|
||||
end
|
||||
|
||||
context 'without package_name' do
|
||||
let(:params) { { package_name: nil } }
|
||||
|
||||
it { is_expected.to be_empty }
|
||||
end
|
||||
|
||||
context 'with package_name' do
|
||||
let(:params) { { package_name: package1.name } }
|
||||
|
||||
it 'returns packages with the given name ordered by version desc' do
|
||||
is_expected.to eq([package2, package1])
|
||||
end
|
||||
|
||||
context 'with package_version' do
|
||||
let(:params) { { package_name: package1.name, package_version: package1.version } }
|
||||
|
||||
it { is_expected.to eq([package1]) }
|
||||
end
|
||||
|
||||
context 'when package is not installable' do
|
||||
before do
|
||||
package1.update_column(:status, 3)
|
||||
end
|
||||
|
||||
it { is_expected.to eq([package2]) }
|
||||
end
|
||||
|
||||
context 'when package has no version' do
|
||||
before do
|
||||
package1.update_column(:version, nil)
|
||||
end
|
||||
|
||||
it { is_expected.to eq([package2]) }
|
||||
end
|
||||
|
||||
context 'when package is not a terraform module' do
|
||||
before do
|
||||
package1.update_column(:package_type, 1)
|
||||
end
|
||||
|
||||
it { is_expected.to eq([package2]) }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,145 +0,0 @@
|
|||
import { shallowMount } from '@vue/test-utils';
|
||||
import { nextTick } from 'vue';
|
||||
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
|
||||
import CommitMessageField from '~/ide/components/shared/commit_message_field.vue';
|
||||
|
||||
const DEFAULT_PROPS = {
|
||||
text: 'foo text',
|
||||
placeholder: 'foo placeholder',
|
||||
};
|
||||
|
||||
describe('CommitMessageField', () => {
|
||||
let wrapper;
|
||||
|
||||
const createComponent = (props = {}) => {
|
||||
wrapper = extendedWrapper(
|
||||
shallowMount(CommitMessageField, {
|
||||
propsData: {
|
||||
...DEFAULT_PROPS,
|
||||
...props,
|
||||
},
|
||||
attachTo: document.body,
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
const findTextArea = () => wrapper.find('textarea');
|
||||
const findHighlights = () => wrapper.findByTestId('highlights');
|
||||
const findHighlightsText = () => wrapper.findByTestId('highlights-text');
|
||||
const findHighlightsMark = () => wrapper.findByTestId('highlights-mark');
|
||||
const findHighlightsTexts = () => wrapper.findAllByTestId('highlights-text');
|
||||
const findHighlightsMarks = () => wrapper.findAllByTestId('highlights-mark');
|
||||
|
||||
const fillText = async (text) => {
|
||||
wrapper.setProps({ text });
|
||||
await nextTick();
|
||||
};
|
||||
|
||||
it('emits input event on input', () => {
|
||||
const value = 'foo';
|
||||
|
||||
createComponent();
|
||||
findTextArea().setValue(value);
|
||||
expect(wrapper.emitted('input')[0][0]).toEqual(value);
|
||||
});
|
||||
|
||||
describe('focus classes', () => {
|
||||
beforeEach(async () => {
|
||||
createComponent();
|
||||
findTextArea().trigger('focus');
|
||||
await nextTick();
|
||||
});
|
||||
|
||||
it('is added on textarea focus', () => {
|
||||
expect(wrapper.attributes('class').split(' ')).toEqual(
|
||||
expect.arrayContaining(['gl-outline-none', 'focus:gl-focus']),
|
||||
);
|
||||
});
|
||||
|
||||
it('is removed on textarea blur', async () => {
|
||||
findTextArea().trigger('blur');
|
||||
await nextTick();
|
||||
|
||||
expect(wrapper.attributes('class').split(' ')).not.toEqual(
|
||||
expect.arrayContaining(['gl-outline-none', 'focus:gl-focus']),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('highlights', () => {
|
||||
describe('subject line', () => {
|
||||
it('does not highlight less than 50 characters', async () => {
|
||||
const text = 'text less than 50 chars';
|
||||
|
||||
createComponent();
|
||||
await fillText(text);
|
||||
|
||||
expect(findHighlightsText().text()).toEqual(text);
|
||||
expect(findHighlightsMark().text()).toBe('');
|
||||
});
|
||||
|
||||
it('highlights characters over 50 length', async () => {
|
||||
const text =
|
||||
'text less than 50 chars that should not highlighted. text more than 50 should be highlighted';
|
||||
|
||||
createComponent();
|
||||
await fillText(text);
|
||||
|
||||
expect(findHighlightsText().text()).toEqual(text.slice(0, 50));
|
||||
expect(findHighlightsMark().text()).toEqual(text.slice(50));
|
||||
});
|
||||
});
|
||||
|
||||
describe('body text', () => {
|
||||
it('does not highlight body text less tan 72 characters', async () => {
|
||||
const text = 'subject line\nbody content';
|
||||
|
||||
createComponent();
|
||||
await fillText(text);
|
||||
|
||||
expect(findHighlightsTexts()).toHaveLength(2);
|
||||
expect(findHighlightsMarks().at(1).attributes('style')).toEqual('display: none;');
|
||||
});
|
||||
|
||||
it('highlights body text more than 72 characters', async () => {
|
||||
const text =
|
||||
'subject line\nbody content that will be highlighted when it is more than 72 characters in length';
|
||||
|
||||
createComponent();
|
||||
await fillText(text);
|
||||
|
||||
expect(findHighlightsTexts()).toHaveLength(2);
|
||||
expect(findHighlightsMarks().at(1).attributes('style')).not.toEqual('display: none;');
|
||||
expect(findHighlightsMarks().at(1).element.textContent).toEqual(' in length');
|
||||
});
|
||||
|
||||
it('highlights body text & subject line', async () => {
|
||||
const text =
|
||||
'text less than 50 chars that should not highlighted\nbody content that will be highlighted when it is more than 72 characters in length';
|
||||
|
||||
createComponent();
|
||||
await fillText(text);
|
||||
|
||||
expect(findHighlightsTexts()).toHaveLength(2);
|
||||
expect(findHighlightsMarks()).toHaveLength(2);
|
||||
expect(findHighlightsMarks().at(0).element.textContent).toEqual('d');
|
||||
expect(findHighlightsMarks().at(1).element.textContent).toEqual(' in length');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('scrolling textarea', () => {
|
||||
it('updates transform of highlights', async () => {
|
||||
const yCoord = 50;
|
||||
|
||||
createComponent();
|
||||
await fillText('subject line\n\n\n\n\n\n\n\n\n\n\nbody content');
|
||||
|
||||
wrapper.vm.$el.querySelector('textarea').scrollTo(0, yCoord);
|
||||
await nextTick();
|
||||
|
||||
expect(wrapper.vm.scrollTop).toEqual(yCoord);
|
||||
expect(findHighlights().attributes('style')).toEqual('transform: translate3d(0, -50px, 0);');
|
||||
});
|
||||
});
|
||||
});
|
|
@ -27,7 +27,7 @@ RSpec.describe Ci::JobsHelper, feature_category: :continuous_integration do
|
|||
"artifact_help_url" => "/help/user/gitlab_com/index.md#gitlab-cicd",
|
||||
"deployment_help_url" => "/help/user/project/clusters/deploy_to_cluster.md#troubleshooting",
|
||||
"runner_settings_url" => "/#{project.full_path}/-/runners#js-runners-settings",
|
||||
"retry_outdated_job_docs_url" => "/help/ci/pipelines/settings.md#retry-outdated-jobs",
|
||||
"retry_outdated_job_docs_url" => "/help/ci/pipelines/settings.md#prevent-outdated-deployment-jobs",
|
||||
"pipeline_test_report_url" => "/#{project.full_path}/-/pipelines/#{job.pipeline.id}/test_report",
|
||||
"log_viewer_path" => "/#{project.full_path}/-/jobs/#{job.id}/viewer",
|
||||
"job_gid" => "gid://gitlab/Ci::Build/#{job.id}"
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
require 'spec_helper'
|
||||
|
||||
RSpec.describe ProfilesHelper, feature_category: :user_profile do
|
||||
include SafeFormatHelper
|
||||
|
||||
describe '#commit_email_select_options' do
|
||||
it 'returns an array with private commit email along with all the verified emails' do
|
||||
user = create(:user)
|
||||
|
@ -14,7 +16,7 @@ RSpec.describe ProfilesHelper, feature_category: :user_profile do
|
|||
|
||||
emails = [
|
||||
[s_('Use primary email (%{email})') % { email: user.email }, ''],
|
||||
[s_("Profiles|Use a private email - %{email}").html_safe % { email: private_email }, Gitlab::PrivateCommitEmail::TOKEN],
|
||||
[safe_format(s_("Profiles|Use a private email - %{email}"), email: private_email), Gitlab::PrivateCommitEmail::TOKEN],
|
||||
user.email,
|
||||
confirmed_email1.email,
|
||||
confirmed_email2.email
|
||||
|
|
|
@ -95,21 +95,6 @@ RSpec.describe Namespace::TraversalHierarchy, type: :model, feature_category: :g
|
|||
end
|
||||
end
|
||||
|
||||
context 'when sync_traversal_ids_nowait feature flag is disabled' do
|
||||
before do
|
||||
stub_feature_flags(sync_traversal_ids_nowait: false)
|
||||
end
|
||||
|
||||
it_behaves_like 'locked row', timeout: false do
|
||||
let(:recorded_queries) { ActiveRecord::QueryRecorder.new }
|
||||
let(:row) { root }
|
||||
|
||||
before do
|
||||
recorded_queries.record { subject }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when deadlocked' do
|
||||
before do
|
||||
allow(root).to receive(:lock!) { raise ActiveRecord::Deadlocked }
|
||||
|
|
|
@ -21,11 +21,6 @@ RSpec.describe Packages::Package, type: :model, feature_category: :package_regis
|
|||
it { is_expected.to have_one(:maven_metadatum).inverse_of(:package) }
|
||||
it { is_expected.to have_one(:nuget_metadatum).inverse_of(:package) }
|
||||
it { is_expected.to have_one(:npm_metadatum).inverse_of(:package) }
|
||||
|
||||
# TODO: Remove with the rollout of the FF terraform_extract_terraform_package_model
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/490007
|
||||
it { is_expected.to have_one(:terraform_module_metadatum).inverse_of(:package) }
|
||||
|
||||
it { is_expected.to have_many(:nuget_symbols).inverse_of(:package) }
|
||||
it { is_expected.to have_many(:matching_package_protection_rules).through(:project).source(:package_protection_rules) }
|
||||
end
|
||||
|
@ -142,21 +137,6 @@ RSpec.describe Packages::Package, type: :model, feature_category: :package_regis
|
|||
it { is_expected.not_to allow_value("@scope%2e%2e%fpackage").for(:name) }
|
||||
it { is_expected.not_to allow_value("@scope/sub/package").for(:name) }
|
||||
end
|
||||
|
||||
# TODO: Remove with the rollout of the FF terraform_extract_terraform_package_model
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/490007
|
||||
context 'terraform module package' do
|
||||
subject { build_stubbed(:terraform_module_package_legacy) }
|
||||
|
||||
it { is_expected.to allow_value('my-module/my-system').for(:name) }
|
||||
it { is_expected.to allow_value('my/module').for(:name) }
|
||||
it { is_expected.not_to allow_value('my-module').for(:name) }
|
||||
it { is_expected.not_to allow_value('My-Module').for(:name) }
|
||||
it { is_expected.not_to allow_value('my_module').for(:name) }
|
||||
it { is_expected.not_to allow_value('my.module').for(:name) }
|
||||
it { is_expected.not_to allow_value('../../../my-module').for(:name) }
|
||||
it { is_expected.not_to allow_value('%2e%2e%2fmy-module').for(:name) }
|
||||
end
|
||||
end
|
||||
|
||||
describe '#version' do
|
||||
|
@ -190,10 +170,6 @@ RSpec.describe Packages::Package, type: :model, feature_category: :package_regis
|
|||
|
||||
it_behaves_like 'validating version to be SemVer compliant for', :npm_package
|
||||
|
||||
# TODO: Remove with the rollout of the FF terraform_extract_terraform_package_model
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/490007
|
||||
it_behaves_like 'validating version to be SemVer compliant for', :terraform_module_package_legacy
|
||||
|
||||
context 'nuget package' do
|
||||
subject { build_stubbed(:nuget_package) }
|
||||
|
||||
|
@ -1078,19 +1054,5 @@ RSpec.describe Packages::Package, type: :model, feature_category: :package_regis
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when terraform_extract_terraform_package_model is disabled' do
|
||||
before do
|
||||
stub_feature_flags(terraform_extract_terraform_package_model: false)
|
||||
end
|
||||
|
||||
context 'for terraform module' do
|
||||
let(:format) { :terraform_module }
|
||||
|
||||
it 'maps to Packages::Package' do
|
||||
is_expected.to eq(described_class)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,13 +6,6 @@ RSpec.describe Packages::TerraformModule::Metadatum, type: :model, feature_categ
|
|||
describe 'relationships' do
|
||||
it { is_expected.to belong_to(:package) }
|
||||
it { is_expected.to belong_to(:project) }
|
||||
|
||||
# TODO: Remove with the rollout of the FF terraform_extract_terraform_package_model
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/480692
|
||||
it do
|
||||
is_expected.to belong_to(:legacy_package).conditions(package_type: :terraform_module)
|
||||
.class_name('Packages::Package').inverse_of(:terraform_module_metadatum).with_foreign_key(:package_id)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'validations' do
|
||||
|
@ -20,19 +13,6 @@ RSpec.describe Packages::TerraformModule::Metadatum, type: :model, feature_categ
|
|||
it { is_expected.to validate_presence_of(:project) }
|
||||
it { is_expected.to validate_presence_of(:fields) }
|
||||
|
||||
# TODO: Remove with the rollout of the FF terraform_extract_terraform_package_model
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/issues/480692
|
||||
it { is_expected.not_to validate_presence_of(:legacy_package) }
|
||||
|
||||
context 'when terraform_extract_terraform_package_model is disabled' do
|
||||
before do
|
||||
stub_feature_flags(terraform_extract_terraform_package_model: false)
|
||||
end
|
||||
|
||||
it { is_expected.to validate_presence_of(:legacy_package) }
|
||||
it { is_expected.not_to validate_presence_of(:package) }
|
||||
end
|
||||
|
||||
it { expect(described_class).to validate_jsonb_schema(['terraform_module_metadata']) }
|
||||
|
||||
describe '#metadata' do
|
||||
|
@ -82,20 +62,6 @@ RSpec.describe Packages::TerraformModule::Metadatum, type: :model, feature_categ
|
|||
build(:terraform_module_metadatum, package: package)
|
||||
end.to raise_error(ActiveRecord::AssociationTypeMismatch)
|
||||
end
|
||||
|
||||
context 'when terraform_extract_terraform_package_model is disabled' do
|
||||
before do
|
||||
stub_feature_flags(terraform_extract_terraform_package_model: false)
|
||||
end
|
||||
|
||||
it 'adds the validation error' do
|
||||
metadatum = build(:terraform_module_metadatum, legacy_package: package, package: nil,
|
||||
project: package.project)
|
||||
|
||||
expect(metadatum).not_to be_valid
|
||||
expect(metadatum.errors.to_a).to include('Package type must be Terraform Module')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -17,51 +17,19 @@ RSpec.describe Packages::TerraformModule::Metadata::CreateService, feature_categ
|
|||
expect { execute }.to change { Packages::TerraformModule::Metadatum.count }.by(1)
|
||||
expect(package.terraform_module_metadatum.fields).to eq(metadata_hash)
|
||||
end
|
||||
|
||||
context 'when terraform_extract_terraform_package_model is disabled' do
|
||||
let_it_be(:package) { create(:terraform_module_package_legacy) }
|
||||
|
||||
before do
|
||||
stub_feature_flags(terraform_extract_terraform_package_model: false)
|
||||
end
|
||||
|
||||
it 'creates a new metadata' do
|
||||
expect { execute }.to change { Packages::TerraformModule::Metadatum.count }.by(1)
|
||||
expect(package.terraform_module_metadatum.fields).to eq(metadata_hash)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with existing metadata' do
|
||||
context 'when terraform_extract_terraform_package_model is enabled' do
|
||||
before do
|
||||
create(:terraform_module_metadatum, package: package)
|
||||
end
|
||||
|
||||
it 'updates the existing metadata' do
|
||||
expect(package.terraform_module_metadatum.fields).not_to eq(metadata_hash)
|
||||
|
||||
expect { execute }.not_to change { Packages::TerraformModule::Metadatum.count }
|
||||
expect(execute).to be_success
|
||||
expect(package.terraform_module_metadatum.fields).to eq(metadata_hash)
|
||||
end
|
||||
before do
|
||||
create(:terraform_module_metadatum, package: package)
|
||||
end
|
||||
|
||||
context 'when terraform_extract_terraform_package_model is disabled' do
|
||||
let_it_be(:package) { create(:terraform_module_package_legacy) }
|
||||
it 'updates the existing metadata' do
|
||||
expect(package.terraform_module_metadatum.fields).not_to eq(metadata_hash)
|
||||
|
||||
before do
|
||||
create(:terraform_module_metadatum, legacy_package: package)
|
||||
stub_feature_flags(terraform_extract_terraform_package_model: false)
|
||||
end
|
||||
|
||||
it 'updates the existing metadata' do
|
||||
expect(package.terraform_module_metadatum.fields).not_to eq(metadata_hash)
|
||||
|
||||
expect { execute }.not_to change { Packages::TerraformModule::Metadatum.count }
|
||||
expect(execute).to be_success
|
||||
expect(package.terraform_module_metadatum.fields).to eq(metadata_hash)
|
||||
end
|
||||
expect { execute }.not_to change { Packages::TerraformModule::Metadatum.count }
|
||||
expect(execute).to be_success
|
||||
expect(package.terraform_module_metadatum.fields).to eq(metadata_hash)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -78,25 +46,6 @@ RSpec.describe Packages::TerraformModule::Metadata::CreateService, feature_categ
|
|||
expect { execute }.not_to change { Packages::TerraformModule::Metadatum.count }
|
||||
expect(execute).to be_error
|
||||
end
|
||||
|
||||
context 'when terraform_extract_terraform_package_model is disabled' do
|
||||
let_it_be(:package) { create(:terraform_module_package_legacy) }
|
||||
|
||||
before do
|
||||
stub_feature_flags(terraform_extract_terraform_package_model: false)
|
||||
end
|
||||
|
||||
it 'does not create a new metadata and tracks the exception' do
|
||||
expect(Gitlab::ErrorTracking).to receive(:track_exception).with(
|
||||
instance_of(ActiveRecord::RecordInvalid),
|
||||
class: described_class.name,
|
||||
package_id: package.id
|
||||
)
|
||||
|
||||
expect { execute }.not_to change { Packages::TerraformModule::Metadatum.count }
|
||||
expect(execute).to be_error
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -139,6 +139,20 @@ RSpec.describe Projects::DestroyService, :aggregate_failures, :event_store_publi
|
|||
end
|
||||
end
|
||||
|
||||
context 'when the deleting user does not have access' do
|
||||
before do
|
||||
project.update!(pending_delete: true)
|
||||
end
|
||||
|
||||
it 'unsets the pending_delete on project' do
|
||||
expect(destroy_project(project, create(:user))).to be(false)
|
||||
|
||||
project.reload
|
||||
|
||||
expect(project.pending_delete).to be_falsey
|
||||
end
|
||||
end
|
||||
|
||||
context "deleting a project with merge requests" do
|
||||
let!(:merge_request) { create(:merge_request, source_project: project) }
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ RSpec.describe Projects::InactiveProjectsDeletionCronWorker, feature_category: :
|
|||
describe "#perform" do
|
||||
subject(:worker) { described_class.new }
|
||||
|
||||
let_it_be(:admin_bot) { create(:user, :admin_bot) }
|
||||
let_it_be(:admin_bot) { ::Users::Internal.admin_bot }
|
||||
let_it_be(:non_admin_user) { create(:user) }
|
||||
let_it_be(:new_blank_project) do
|
||||
create_project_with_statistics.tap do |project|
|
||||
|
@ -120,7 +120,8 @@ RSpec.describe Projects::InactiveProjectsDeletionCronWorker, feature_category: :
|
|||
worker.perform
|
||||
end
|
||||
|
||||
it 'invokes Projects::DestroyService for projects that are inactive even after being notified' do
|
||||
it 'invokes Projects::DestroyService for projects that are inactive even after being notified',
|
||||
:enable_admin_mode do
|
||||
Gitlab::Redis::SharedState.with do |redis|
|
||||
redis.hset(
|
||||
'inactive_projects_deletion_warning_email_notified',
|
||||
|
@ -135,7 +136,7 @@ RSpec.describe Projects::InactiveProjectsDeletionCronWorker, feature_category: :
|
|||
|
||||
worker.perform
|
||||
|
||||
expect(inactive_large_project.reload.pending_delete).to eq(true)
|
||||
expect(Project.exists?(inactive_large_project.id)).to be(false)
|
||||
|
||||
Gitlab::Redis::SharedState.with do |redis|
|
||||
expect(
|
||||
|
|
Loading…
Reference in New Issue