Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
c0b718a0db
commit
664db1da1c
2
Gemfile
2
Gemfile
|
|
@ -362,7 +362,7 @@ gem 'prometheus-client-mmap', '~> 0.16', require: 'prometheus/client'
|
|||
gem 'warning', '~> 1.3.0'
|
||||
|
||||
group :development do
|
||||
gem 'lefthook', '~> 1.2.0', require: false
|
||||
gem 'lefthook', '~> 1.2.1', require: false
|
||||
gem 'rubocop'
|
||||
gem 'solargraph', '~> 0.47.2', require: false
|
||||
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@
|
|||
{"name":"kramdown-parser-gfm","version":"1.1.0","platform":"ruby","checksum":"fb39745516427d2988543bf01fc4cf0ab1149476382393e0e9c48592f6581729"},
|
||||
{"name":"kubeclient","version":"4.9.3","platform":"ruby","checksum":"d5d38e719fbac44f396851aa57cd1b9f4f7dab4410ab680ccd21c9b741230046"},
|
||||
{"name":"launchy","version":"2.5.0","platform":"ruby","checksum":"954243c4255920982ce682f89a42e76372dba94770bf09c23a523e204bdebef5"},
|
||||
{"name":"lefthook","version":"1.2.0","platform":"ruby","checksum":"189e8c2c91eac4ed115ab67e4d9a3f6b7f280967c45c4ea5fdca7612088c73ab"},
|
||||
{"name":"lefthook","version":"1.2.1","platform":"ruby","checksum":"857c7f99fe03252e6b1fd67267e08bd700cf94e3d178c7b7bf18d79f84686abf"},
|
||||
{"name":"letter_opener","version":"1.7.0","platform":"ruby","checksum":"095bc0d58e006e5b43ea7d219e64ecf2de8d1f7d9dafc432040a845cf59b4725"},
|
||||
{"name":"letter_opener_web","version":"2.0.0","platform":"ruby","checksum":"33860ad41e1785d75456500e8ca8bba8ed71ee6eaf08a98d06bbab67c5577b6f"},
|
||||
{"name":"libyajl2","version":"1.2.0","platform":"ruby","checksum":"1117cd1e48db013b626e36269bbf1cef210538ca6d2e62d3fa3db9ded005b258"},
|
||||
|
|
|
|||
|
|
@ -835,7 +835,7 @@ GEM
|
|||
rest-client (~> 2.0)
|
||||
launchy (2.5.0)
|
||||
addressable (~> 2.7)
|
||||
lefthook (1.2.0)
|
||||
lefthook (1.2.1)
|
||||
letter_opener (1.7.0)
|
||||
launchy (~> 2.2)
|
||||
letter_opener_web (2.0.0)
|
||||
|
|
@ -1719,7 +1719,7 @@ DEPENDENCIES
|
|||
knapsack (~> 1.21.1)
|
||||
kramdown (~> 2.3.1)
|
||||
kubeclient (~> 4.9.3)
|
||||
lefthook (~> 1.2.0)
|
||||
lefthook (~> 1.2.1)
|
||||
letter_opener_web (~> 2.0.0)
|
||||
license_finder (~> 7.0)
|
||||
licensee (~> 9.15)
|
||||
|
|
|
|||
|
|
@ -538,7 +538,12 @@ class GfmAutoComplete {
|
|||
setupLabels($input) {
|
||||
const instance = this;
|
||||
const fetchData = this.fetchData.bind(this);
|
||||
const LABEL_COMMAND = { LABEL: '/label', UNLABEL: '/unlabel', RELABEL: '/relabel' };
|
||||
const LABEL_COMMAND = {
|
||||
LABEL: '/label',
|
||||
LABELS: '/labels',
|
||||
UNLABEL: '/unlabel',
|
||||
RELABEL: '/relabel',
|
||||
};
|
||||
let command = '';
|
||||
|
||||
$input.atwho({
|
||||
|
|
@ -570,13 +575,9 @@ class GfmAutoComplete {
|
|||
matcher(flag, subtext) {
|
||||
const subtextNodes = subtext.split(/\n+/g).pop().split(GfmAutoComplete.regexSubtext);
|
||||
|
||||
// Check if ~ is followed by '/label', '/relabel' or '/unlabel' commands.
|
||||
// Check if ~ is followed by '/label', '/labels', '/relabel' or '/unlabel' commands.
|
||||
command = subtextNodes.find((node) => {
|
||||
if (
|
||||
node === LABEL_COMMAND.LABEL ||
|
||||
node === LABEL_COMMAND.RELABEL ||
|
||||
node === LABEL_COMMAND.UNLABEL
|
||||
) {
|
||||
if (Object.values(LABEL_COMMAND).includes(node)) {
|
||||
return node;
|
||||
}
|
||||
return null;
|
||||
|
|
@ -621,7 +622,7 @@ class GfmAutoComplete {
|
|||
|
||||
// The `LABEL_COMMAND.RELABEL` is intentionally skipped
|
||||
// because we want to return all the labels (unfiltered) for that command.
|
||||
if (command === LABEL_COMMAND.LABEL) {
|
||||
if (command === LABEL_COMMAND.LABEL || command === LABEL_COMMAND.LABELS) {
|
||||
// Return labels with set: undefined.
|
||||
return data.filter((label) => !label.set);
|
||||
} else if (command === LABEL_COMMAND.UNLABEL) {
|
||||
|
|
|
|||
|
|
@ -1,50 +1,38 @@
|
|||
import Vue from 'vue';
|
||||
import * as Sentry from '@sentry/browser';
|
||||
import { parseBoolean } from '~/lib/utils/common_utils';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import { joinPaths } from '~/lib/utils/url_utility';
|
||||
import GitlabVersionCheckBadge from './components/gitlab_version_check_badge.vue';
|
||||
|
||||
const mountGitlabVersionCheckBadge = ({ el, status }) => {
|
||||
const { size } = el.dataset;
|
||||
const mountGitlabVersionCheckBadge = (el) => {
|
||||
const { size, version } = el.dataset;
|
||||
const actionable = parseBoolean(el.dataset.actionable);
|
||||
|
||||
return new Vue({
|
||||
el,
|
||||
render(createElement) {
|
||||
return createElement(GitlabVersionCheckBadge, {
|
||||
props: {
|
||||
size,
|
||||
actionable,
|
||||
status,
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
};
|
||||
try {
|
||||
const { severity } = JSON.parse(version);
|
||||
|
||||
export default async () => {
|
||||
const versionCheckBadges = [...document.querySelectorAll('.js-gitlab-version-check-badge')];
|
||||
// If no severity (status) data don't worry about rendering
|
||||
if (!severity) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// If there are no version check elements, exit out
|
||||
if (versionCheckBadges?.length <= 0) {
|
||||
return new Vue({
|
||||
el,
|
||||
render(createElement) {
|
||||
return createElement(GitlabVersionCheckBadge, {
|
||||
props: {
|
||||
size,
|
||||
actionable,
|
||||
status: severity,
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
|
||||
const status = await axios
|
||||
.get(joinPaths('/', gon.relative_url_root, '/admin/version_check.json'))
|
||||
.then((res) => {
|
||||
return res.data?.severity;
|
||||
})
|
||||
.catch((e) => {
|
||||
Sentry.captureException(e);
|
||||
return null;
|
||||
});
|
||||
|
||||
// If we don't have a status there is nothing to render
|
||||
if (status) {
|
||||
return versionCheckBadges.map((el) => mountGitlabVersionCheckBadge({ el, status }));
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
export default () => {
|
||||
const versionCheckBadges = [...document.querySelectorAll('.js-gitlab-version-check-badge')];
|
||||
|
||||
return versionCheckBadges.map((el) => mountGitlabVersionCheckBadge(el));
|
||||
};
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ export default {
|
|||
},
|
||||
},
|
||||
computed: {
|
||||
containsWebPathLink() {
|
||||
return Boolean(this.packageEntity?._links?.webPath);
|
||||
},
|
||||
packageType() {
|
||||
return getPackageTypeLabel(this.packageEntity.packageType);
|
||||
},
|
||||
|
|
@ -109,6 +112,7 @@ export default {
|
|||
<template #left-primary>
|
||||
<div class="gl-display-flex gl-align-items-center gl-mr-3 gl-min-w-0">
|
||||
<router-link
|
||||
v-if="containsWebPathLink"
|
||||
:class="errorPackageStyle"
|
||||
class="gl-text-body gl-min-w-0"
|
||||
data-testid="details-link"
|
||||
|
|
@ -118,6 +122,7 @@ export default {
|
|||
>
|
||||
<gl-truncate :text="packageEntity.name" />
|
||||
</router-link>
|
||||
<gl-truncate v-else :text="packageEntity.name" />
|
||||
|
||||
<package-tags
|
||||
v-if="showTags"
|
||||
|
|
|
|||
|
|
@ -29,4 +29,7 @@ fragment PackageData on Package {
|
|||
fullPath
|
||||
webUrl
|
||||
}
|
||||
_links {
|
||||
webPath
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module VersionCheckHelper
|
||||
include Gitlab::Utils::StrongMemoize
|
||||
|
||||
def show_version_check?
|
||||
return false unless Gitlab::CurrentSettings.version_check_enabled
|
||||
return false if User.single_user&.requires_usage_stats_consent?
|
||||
|
|
@ -8,6 +10,11 @@ module VersionCheckHelper
|
|||
current_user&.can_read_all_resources?
|
||||
end
|
||||
|
||||
def gitlab_version_check
|
||||
VersionCheck.new.response
|
||||
end
|
||||
strong_memoize_attr :gitlab_version_check
|
||||
|
||||
def link_to_version
|
||||
if Gitlab.pre_release?
|
||||
commit_link = link_to(Gitlab.revision, source_host_url + namespace_project_commits_path(source_code_group, source_code_project, Gitlab.revision))
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class BlobPresenter < Gitlab::View::Presenter::Delegated
|
|||
end
|
||||
|
||||
def permalink_path
|
||||
url_helpers.project_blob_path(project, File.join(project.repository.commit.sha, blob.path))
|
||||
url_helpers.project_blob_path(project, File.join(project.repository.commit(blob.commit_id).sha, blob.path))
|
||||
end
|
||||
|
||||
def environment_formatted_external_url
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ module Ci
|
|||
private
|
||||
|
||||
def process(build)
|
||||
return enqueue(build) if Feature.enabled?(:ci_retry_job_fix, project) && build.enqueue_immediately?
|
||||
return enqueue(build) if build.enqueue_immediately?
|
||||
|
||||
if build.schedulable?
|
||||
build.schedule
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ module Ci
|
|||
check_access!(job)
|
||||
|
||||
new_job = job.clone(current_user: current_user, new_job_variables_attributes: variables)
|
||||
if Feature.enabled?(:ci_retry_job_fix, project) && enqueue_if_actionable && new_job.action?
|
||||
if enqueue_if_actionable && new_job.action?
|
||||
new_job.set_enqueue_immediately!
|
||||
end
|
||||
|
||||
|
|
@ -64,15 +64,10 @@ module Ci
|
|||
|
||||
next if new_job.failed?
|
||||
|
||||
Gitlab::OptimisticLocking.retry_lock(new_job, name: 'retry_build', &:enqueue) if Feature.disabled?(
|
||||
:ci_retry_job_fix, project)
|
||||
|
||||
AfterRequeueJobService.new(project, current_user).execute(job)
|
||||
|
||||
if Feature.enabled?(:ci_retry_job_fix, project)
|
||||
Ci::PipelineCreation::StartPipelineService.new(job.pipeline).execute
|
||||
new_job.reset
|
||||
end
|
||||
Ci::PipelineCreation::StartPipelineService.new(job.pipeline).execute
|
||||
new_job.reset
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -158,15 +158,15 @@ module QuickActions
|
|||
end
|
||||
|
||||
def map_commands(commands, method)
|
||||
commands.map do |name, arg|
|
||||
definition = self.class.definition_by_name(name)
|
||||
commands.map do |name_or_alias, arg|
|
||||
definition = self.class.definition_by_name(name_or_alias)
|
||||
next unless definition
|
||||
|
||||
case method
|
||||
when :explain
|
||||
definition.explain(self, arg)
|
||||
when :execute_message
|
||||
@execution_message[name.to_sym] || definition.execute_message(self, arg)
|
||||
@execution_message[definition.name.to_sym] || definition.execute_message(self, arg)
|
||||
end
|
||||
end.compact
|
||||
end
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
= s_('AdminArea|Components')
|
||||
- if show_version_check?
|
||||
.float-right
|
||||
.js-gitlab-version-check-badge{ data: { "size": "lg", "actionable": "true" } }
|
||||
.js-gitlab-version-check-badge{ data: { "size": "lg", "actionable": "true", "version": gitlab_version_check.to_json } }
|
||||
= link_to(sprite_icon('question'), "https://gitlab.com/gitlab-org/gitlab/-/blob/master/CHANGELOG.md", class: 'gl-ml-2', target: '_blank', rel: 'noopener noreferrer')
|
||||
%p
|
||||
= link_to _('GitLab'), general_admin_application_settings_path
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
%span= link_to_version
|
||||
- if show_version_check?
|
||||
%span.gl-mt-5.gl-mb-3.gl-ml-3
|
||||
.js-gitlab-version-check-badge{ data: { "size": "lg", "actionable": "true" } }
|
||||
.js-gitlab-version-check-badge{ data: { "size": "lg", "actionable": "true", "version": gitlab_version_check.to_json } }
|
||||
%hr
|
||||
|
||||
- unless Gitlab::CurrentSettings.help_page_hide_commercial_content?
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@
|
|||
%span.gl-font-sm.gl-text-gray-500
|
||||
#{Gitlab.version_info.major}.#{Gitlab.version_info.minor}
|
||||
%span.gl-ml-2
|
||||
.js-gitlab-version-check-badge{ data: { "size": "sm" } }
|
||||
.js-gitlab-version-check-badge{ data: { "size": "sm", "version": gitlab_version_check.to_json } }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: search_index_curation_commits
|
||||
introduced_by_url: "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/104423"
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/383093
|
||||
milestone: '15.7'
|
||||
type: ops
|
||||
group: group::global search
|
||||
default_enabled: false
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: search_index_curation_issues
|
||||
introduced_by_url: "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/104423"
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/383094
|
||||
milestone: '15.7'
|
||||
type: ops
|
||||
group: group::global search
|
||||
default_enabled: false
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
name: ci_retry_job_fix
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/100712
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/207988
|
||||
milestone: '15.6'
|
||||
type: development
|
||||
group: group::pipeline execution
|
||||
name: search_index_curation_main_index
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/104423
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/383106
|
||||
milestone: '15.7'
|
||||
type: ops
|
||||
group: group::global search
|
||||
default_enabled: false
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: search_index_curation_merge_requests
|
||||
introduced_by_url: "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/104423"
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/383095
|
||||
milestone: '15.7'
|
||||
type: ops
|
||||
group: group::global search
|
||||
default_enabled: false
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: search_index_curation_notes
|
||||
introduced_by_url: "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/104423"
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/383096
|
||||
milestone: '15.7'
|
||||
type: ops
|
||||
group: group::global search
|
||||
default_enabled: false
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: search_index_curation_users
|
||||
introduced_by_url: "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/104423"
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/383097
|
||||
milestone: '15.7'
|
||||
type: ops
|
||||
group: group::global search
|
||||
default_enabled: false
|
||||
|
|
@ -121,6 +121,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
|
|||
- [Creating users](../user/profile/account/create_accounts.md): Create users manually or through authentication integrations.
|
||||
- [Libravatar](libravatar.md): Use Libravatar instead of Gravatar for user avatars.
|
||||
- [Sign-up restrictions](../user/admin_area/settings/sign_up_restrictions.md): block email addresses of specific domains, or allow only specific domains.
|
||||
- [Admin mode](../user/admin_area/settings/sign_in_restrictions.md#admin-mode): require that administrators authenticate separately to use administrative access, like `sudo`.
|
||||
- [Access restrictions](../user/admin_area/settings/visibility_and_access_controls.md#configure-enabled-git-access-protocols): Define which Git access protocols can be used to talk to GitLab (SSH, HTTP, HTTPS).
|
||||
- [Authentication and Authorization](auth/index.md): Configure external authentication with LDAP, SAML, CAS, and additional providers.
|
||||
- [Sync LDAP](auth/ldap/index.md)
|
||||
|
|
|
|||
|
|
@ -636,24 +636,6 @@ If you need to manually remove **all** job artifacts associated with multiple jo
|
|||
- `3.months.ago`
|
||||
- `1.year.ago`
|
||||
|
||||
### Error `Downloading artifacts from coordinator... not found`
|
||||
|
||||
When a job attempts to download artifacts from an earlier job, you might receive an error message similar to:
|
||||
|
||||
```plaintext
|
||||
Downloading artifacts from coordinator... not found id=12345678 responseStatus=404 Not Found
|
||||
```
|
||||
|
||||
This can be caused by a `gitlab.rb` file with the following configuration:
|
||||
|
||||
```ruby
|
||||
gitlab_rails['artifacts_object_store_background_upload'] = false
|
||||
gitlab_rails['artifacts_object_store_direct_upload'] = true
|
||||
```
|
||||
|
||||
To prevent this, comment out or remove those lines, or switch to their [default values](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template), and
|
||||
then run `sudo gitlab-ctl reconfigure`.
|
||||
|
||||
### Job artifact upload fails with error 500
|
||||
|
||||
If you are using object storage for artifacts and a job artifact fails to upload,
|
||||
|
|
|
|||
|
|
@ -62,8 +62,6 @@ to check which storage services can be integrated with GitLab.
|
|||
You can also use external object storage in a private local network. For example,
|
||||
[MinIO](https://min.io/) is a standalone object storage service that works with GitLab instances.
|
||||
|
||||
GitLab provides two different options for the uploading mechanism: "Direct upload" and "Background upload".
|
||||
|
||||
[Read more about using object storage with GitLab](../object_storage.md).
|
||||
|
||||
NOTE:
|
||||
|
|
@ -71,18 +69,10 @@ In GitLab 13.2 and later, we recommend using the
|
|||
[consolidated object storage settings](../object_storage.md#consolidated-object-storage-configuration).
|
||||
This section describes the earlier configuration format.
|
||||
|
||||
**Option 1. Direct upload**
|
||||
|
||||
1. User pushes an `lfs` file to the GitLab instance.
|
||||
1. GitLab-workhorse uploads the file directly to the external object storage.
|
||||
1. GitLab-workhorse notifies GitLab-rails that the upload process is complete.
|
||||
|
||||
**Option 2. Background upload**
|
||||
|
||||
1. User pushes an `lfs` file to the GitLab instance.
|
||||
1. GitLab-rails stores the file in the local file storage.
|
||||
1. GitLab-rails then uploads the file to the external object storage asynchronously.
|
||||
|
||||
The following general settings are supported.
|
||||
|
||||
| Setting | Description | Default |
|
||||
|
|
@ -119,9 +109,7 @@ On Omnibus GitLab installations, the settings are prefixed by `lfs_object_store_
|
|||
|
||||
1. Save the file, and then [reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure) for the changes to take effect.
|
||||
1. [Migrate any existing local LFS objects to the object storage](#migrating-to-object-storage).
|
||||
New LFS objects
|
||||
are forwarded to object storage unless
|
||||
`gitlab_rails['lfs_object_store_background_upload']` and `gitlab_rails['lfs_object_store_direct_upload']` is set to `false`.
|
||||
New LFS objects are forwarded to object storage.
|
||||
|
||||
### S3 for installations from source
|
||||
|
||||
|
|
@ -150,9 +138,7 @@ For source installations the settings are nested under `lfs:` and then
|
|||
|
||||
1. Save the file, and then [restart GitLab](../restart_gitlab.md#installations-from-source) for the changes to take effect.
|
||||
1. [Migrate any existing local LFS objects to the object storage](#migrating-to-object-storage).
|
||||
New LFS objects
|
||||
are forwarded to object storage unless
|
||||
`background_upload` and `direct_upload` is set to `false`.
|
||||
New LFS objects are forwarded to object storage.
|
||||
|
||||
### Migrating to object storage
|
||||
|
||||
|
|
@ -276,39 +262,6 @@ To delete these references:
|
|||
lfs_object.destroy
|
||||
```
|
||||
|
||||
### `Google::Apis::TransmissionError: execution expired`
|
||||
|
||||
If LFS integration is configured with Google Cloud Storage and background uploads (`background_upload: true` and `direct_upload: false`),
|
||||
Sidekiq workers may encounter this error. This is because the uploading timed out with very large files.
|
||||
LFS files up to 6 GB can be uploaded without any extra steps, otherwise you need to use the following workaround.
|
||||
|
||||
Sign in to Rails console:
|
||||
|
||||
```shell
|
||||
sudo gitlab-rails console
|
||||
```
|
||||
|
||||
Set up timeouts:
|
||||
|
||||
- These settings are only in effect for the same session. For example, they are not effective for Sidekiq workers.
|
||||
- 20 minutes (1200 sec) is enough to upload 30 GB LFS files:
|
||||
|
||||
```ruby
|
||||
::Google::Apis::ClientOptions.default.open_timeout_sec = 1200
|
||||
::Google::Apis::ClientOptions.default.read_timeout_sec = 1200
|
||||
::Google::Apis::ClientOptions.default.send_timeout_sec = 1200
|
||||
```
|
||||
|
||||
Upload LFS files manually (this process does not use Sidekiq at all):
|
||||
|
||||
```ruby
|
||||
LfsObject.where(file_store: [nil, 1]).find_each do |lfs_object|
|
||||
lfs_object.file.migrate!(ObjectStorage::Store::REMOTE) if lfs_object.file.file.exists?
|
||||
end
|
||||
```
|
||||
|
||||
See more information in [!19581](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/19581)
|
||||
|
||||
### LFS commands fail on TLS v1.3 server
|
||||
|
||||
If you configure GitLab to [disable TLS v1.2](https://docs.gitlab.com/omnibus/settings/nginx.html)
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ must be enabled, only the following providers can be used:
|
|||
- [Azure Blob storage](#azure-blob-storage)
|
||||
|
||||
When consolidated object storage is used, direct upload is enabled
|
||||
automatically. Background upload is not supported. For storage-specific
|
||||
automatically. For storage-specific
|
||||
configuration, [direct upload may become the default](https://gitlab.com/gitlab-org/gitlab/-/issues/27331)
|
||||
because it does not require a shared folder.
|
||||
|
||||
|
|
|
|||
|
|
@ -695,9 +695,10 @@ Example response:
|
|||
]
|
||||
```
|
||||
|
||||
### Post the build status to a commit
|
||||
### Set the pipeline status of a commit
|
||||
|
||||
Adds or updates a build status of a commit.
|
||||
Add or update the pipeline status of a commit. If the commit is associated with a merge request,
|
||||
the API call must target the commit in the merge request's source branch.
|
||||
|
||||
```plaintext
|
||||
POST /projects/:id/statuses/:sha
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 20 KiB |
|
|
@ -57,7 +57,7 @@ This method takes longer to import than the other methods and depends on several
|
|||
|
||||
This script was introduced in GitLab 12.6 for importing large GitLab project exports.
|
||||
|
||||
As part of this script we also disable direct and background upload to avoid situations where a huge archive is being uploaded to GCS (while being inside a transaction, which can cause idle transaction timeouts).
|
||||
As part of this script we also disable direct upload to avoid situations where a huge archive is being uploaded to GCS (while being inside a transaction, which can cause idle transaction timeouts).
|
||||
|
||||
We can run this script from the terminal:
|
||||
|
||||
|
|
|
|||
|
|
@ -40,21 +40,9 @@ When using object storage, administrators can control how those files are moved
|
|||
This move can happen in one of these ways:
|
||||
|
||||
- [Rails controller upload](#rails-controller-upload).
|
||||
- [Background upload](#background-upload).
|
||||
- [Direct upload](#direct-upload).
|
||||
|
||||
These strategies activate as per the following `<feature>.object_store.*` settings:
|
||||
|
||||
| | `background_upload` = `false` | `background_upload` = `true` |
|
||||
| ------------------------- | ----------------------------- | ------------------------------- |
|
||||
| `direct_upload` = `false` | Controller upload | Background upload |
|
||||
| `direct_upload` = `true` | Direct upload | Direct upload (takes precedence)|
|
||||
|
||||
Individual Sidekiq workers might also store files in object storage, which is not something we cover here.
|
||||
More importantly, `background_upload` does not imply _all files are uploaded by Sidekiq._
|
||||
Sidekiq workers that store files in object storage could still exist when this setting is `false`.
|
||||
Those cases are never user-initiated uploads, but they might occur in response to another user-initiated
|
||||
action, such as exporting a GitLab repository.
|
||||
|
||||
Finally, Workhorse assists most user-initiated uploads using an upload buffering mechanism to keep slow work out of Rails controllers.
|
||||
This mechanism is explained in [Workhorse assisted uploads](#workhorse-assisted-uploads),
|
||||
|
|
@ -98,12 +86,11 @@ GitLab to the object store provider. As mentioned above, there are three differe
|
|||
this HTTP request is sent.
|
||||
|
||||
- [Rails controller upload](#rails-controller-upload).
|
||||
- [Background upload](#background-upload).
|
||||
- [Direct upload](#direct-upload).
|
||||
|
||||
### Rails controller upload
|
||||
|
||||
When neither background upload nor direct upload are available, Rails uploads the file to object storage
|
||||
When direct upload is not available, Rails uploads the file to object storage
|
||||
as part of the controller `create` action. Which controller is responsible depends on the kind of file uploaded.
|
||||
|
||||
A Rails controller upload is very similar to uploading to local storage. The main difference: Rails must
|
||||
|
|
@ -115,25 +102,6 @@ keep some of the costly I/O work out of Ruby and Rails. Direct upload does a bet
|
|||
|
||||
This strategy is only suitable for small file uploads, as it is subject to Puma's 60 second request timeout.
|
||||
|
||||
### Background upload
|
||||
|
||||
WARNING:
|
||||
This strategy is deprecated in GitLab 14.9 and later, and is scheduled to [be removed in GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/26600).
|
||||
|
||||
With background uploads enabled:
|
||||
|
||||
1. Files are uploaded as if they were to reside in local storage.
|
||||
1. When Rails saves the upload metadata and the transaction completes, a Sidekiq job is scheduled.
|
||||
1. The Sidekiq job transfers the file to the object store bucket.
|
||||
- If the job completes, the upload record is updated to reflect the file's new location.
|
||||
- If the job fails or gets lost, the upload stays in local storage and has the lifecycle of a normal local storage upload.
|
||||
|
||||
As Rails and Sidekiq must cooperate to move the file to its final destination, it requires shared
|
||||
storage and as such is unsuitable for CNG installations. We do not use background upload in GitLab SaaS.
|
||||
|
||||
As background upload is an extension of local storage, it benefits from the same [Workhorse assistance](#workhorse-assisted-uploads) to
|
||||
keep costly I/O work out of Ruby and Rails.
|
||||
|
||||
### Direct upload
|
||||
|
||||
Direct upload is the recommended way to move large files into object storage in CNG installations like GitLab SaaS.
|
||||
|
|
|
|||
|
|
@ -6,10 +6,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
# Multi-node upgrades with downtime **(FREE SELF)**
|
||||
|
||||
NOTE:
|
||||
This process is a work in progress. You're welcome to provide feedback by either raising a ticket to support,
|
||||
or [commenting on this issue](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6244).
|
||||
|
||||
While you can upgrade a multi-node GitLab deployment [with zero downtime](zero_downtime.md),
|
||||
there are a number of constraints. In particular, you can upgrade to only one minor release
|
||||
at a time, for example, from 14.6 to 14.7, then to 14.8, etc.
|
||||
|
|
@ -37,9 +33,6 @@ At a high level, the process is:
|
|||
substitute the instructions for Omnibus GitLab with your cloud provider's instructions.
|
||||
1. Upgrade the GitLab application (Sidekiq, Puma) and start the application up.
|
||||
|
||||
If you are a Community Edition user, replace `gitlab-ee` with
|
||||
`gitlab-ce` in the following commands.
|
||||
|
||||
## Stop writes to the database
|
||||
|
||||
Shut down Puma and Sidekiq on all servers running these processes:
|
||||
|
|
@ -56,16 +49,7 @@ sudo gitlab-ctl stop puma
|
|||
In summary:
|
||||
|
||||
1. Check the Consul nodes are all healthy.
|
||||
1. Upgrade the GitLab package on all your Consul servers:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories) on all your Consul servers.
|
||||
1. Restart all GitLab services **one node at a time**:
|
||||
|
||||
```shell
|
||||
|
|
@ -106,15 +90,7 @@ The Praefect nodes, however, can be upgraded via an AMI redeployment process:
|
|||
|
||||
## Upgrade the Gitaly nodes not part of Gitaly cluster
|
||||
|
||||
For Gitaly servers which are not part of Gitaly cluster, update the GitLab package:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
For Gitaly servers which are not part of Gitaly cluster, [upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
If you have multiple Gitaly shards or have multiple load-balanced Gitaly nodes
|
||||
using NFS, it doesn't matter in which order you upgrade the Gitaly servers.
|
||||
|
|
@ -123,15 +99,7 @@ using NFS, it doesn't matter in which order you upgrade the Gitaly servers.
|
|||
|
||||
For unclustered PostgreSQL servers:
|
||||
|
||||
1. Upgrade the GitLab package:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. The upgrade process does not restart PostgreSQL when the binaries are upgraded.
|
||||
Restart to load the new version:
|
||||
|
|
@ -161,15 +129,7 @@ Follow the following process:
|
|||
sudo gitlab-ctl patroni members
|
||||
```
|
||||
|
||||
1. Upgrade the GitLab package on one of the replica nodes:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories) on one of the replica nodes.
|
||||
|
||||
1. Restart to load the new version:
|
||||
|
||||
|
|
@ -194,27 +154,11 @@ Follow the following process:
|
|||
If you run PgBouncer on your Rails (application) nodes, then
|
||||
PgBouncer are upgraded as part of the application server upgrade.
|
||||
|
||||
Upgrade the PgBouncer nodes:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
[Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories) on the PgBouncer nodes.
|
||||
|
||||
## Upgrade the Redis node
|
||||
|
||||
Upgrade a standalone Redis server by updating the GitLab package:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
Upgrade a standalone Redis server by [upgrading the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
## Upgrade Redis HA (using Sentinel) **(PREMIUM SELF)**
|
||||
|
||||
|
|
@ -269,15 +213,7 @@ running all database migrations. On the deploy node:
|
|||
sudo gitlab-ctl reconfigure
|
||||
```
|
||||
|
||||
1. Upgrade the GitLab package:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. If you modified `gitlab.rb` on the deploy node to bypass PgBouncer:
|
||||
1. Update `gitlab.rb` on the deploy node. Change `gitlab_rails['db_host']`
|
||||
|
|
@ -300,15 +236,7 @@ set to anything in `gitlab.rb` on these nodes.
|
|||
|
||||
They can be upgraded in parallel:
|
||||
|
||||
1. Upgrade the GitLab package:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. Ensure all services are restarted:
|
||||
|
||||
|
|
@ -318,12 +246,4 @@ They can be upgraded in parallel:
|
|||
|
||||
## Upgrade the Monitor node
|
||||
|
||||
Upgrade the GitLab package:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
[Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
|
|
|||
|
|
@ -132,18 +132,7 @@ load balancer to latest GitLab version.
|
|||
sudo touch /etc/gitlab/skip-auto-reconfigure
|
||||
```
|
||||
|
||||
1. Update the GitLab package:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
|
||||
If you are a Community Edition user, replace `gitlab-ee` with
|
||||
`gitlab-ce` in the above command.
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. Get the regular migrations and latest code in place. Before running this step,
|
||||
the deploy node's `/etc/gitlab/gitlab.rb` configuration file must have
|
||||
|
|
@ -193,17 +182,7 @@ Before you update the main GitLab application you must (in order):
|
|||
|
||||
#### Upgrade Gitaly nodes
|
||||
|
||||
Upgrade the Gitaly nodes one at a time to ensure access to Git repositories is maintained:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
|
||||
If you are a Community Edition user, replace `gitlab-ee` with `gitlab-ce` in the above command.
|
||||
[Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories) on the Gitaly nodes one at a time to ensure access to Git repositories is maintained.
|
||||
|
||||
#### Upgrade Praefect
|
||||
|
||||
|
|
@ -226,17 +205,7 @@ node first and run database migrations.
|
|||
|
||||
1. On the **Praefect deploy node**:
|
||||
|
||||
1. Upgrade the GitLab package:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
|
||||
If you are a Community Edition user, replace `gitlab-ee` with `gitlab-ce` in the command above.
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. To apply the Praefect database migrations and restart Praefect, run:
|
||||
|
||||
|
|
@ -246,13 +215,7 @@ node first and run database migrations.
|
|||
|
||||
1. On all **remaining Praefect nodes**:
|
||||
|
||||
1. Upgrade the GitLab package:
|
||||
|
||||
```shell
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
```
|
||||
|
||||
If you are a Community Edition user, replace `gitlab-ee` with `gitlab-ce` in the command above.
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. Ensure nodes are running the latest code:
|
||||
|
||||
|
|
@ -279,17 +242,7 @@ node throughout the process.
|
|||
|
||||
**PostgreSQL only nodes**
|
||||
|
||||
- Update the GitLab package
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
|
||||
If you are a Community Edition user, replace `gitlab-ee` with `gitlab-ce` in the above command.
|
||||
- [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
- Ensure nodes are running the latest code
|
||||
|
||||
|
|
@ -299,17 +252,7 @@ node throughout the process.
|
|||
|
||||
**Deploy node**
|
||||
|
||||
- Update the GitLab package
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
|
||||
If you are a Community Edition user, replace `gitlab-ee` with `gitlab-ce` in the above command.
|
||||
- [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
- If you're using PgBouncer:
|
||||
|
||||
|
|
@ -341,13 +284,7 @@ node throughout the process.
|
|||
|
||||
**All nodes _excluding_ the Deploy node**
|
||||
|
||||
- Update the GitLab package
|
||||
|
||||
```shell
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
```
|
||||
|
||||
If you are a Community Edition user, replace `gitlab-ee` with `gitlab-ce` in the above command.
|
||||
- [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
- Ensure nodes are running the latest code
|
||||
|
||||
|
|
@ -514,15 +451,7 @@ Log in to your **primary** node, executing the following:
|
|||
sudo gitlab-ctl reconfigure
|
||||
```
|
||||
|
||||
1. Update the GitLab package:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. To get the database migrations and latest code in place, run:
|
||||
|
||||
|
|
@ -552,15 +481,7 @@ On each **secondary** node, executing the following:
|
|||
sudo gitlab-ctl reconfigure
|
||||
```
|
||||
|
||||
1. Update the GitLab package:
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. To get the database migrations and latest code in place, run:
|
||||
|
||||
|
|
@ -669,15 +590,7 @@ sudo touch /etc/gitlab/skip-auto-reconfigure
|
|||
|
||||
**On primary Gitaly only nodes**
|
||||
|
||||
1. Update the GitLab package
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. Ensure nodes are running the latest code
|
||||
|
||||
|
|
@ -687,15 +600,7 @@ sudo touch /etc/gitlab/skip-auto-reconfigure
|
|||
|
||||
**On the primary "deploy node"**
|
||||
|
||||
1. Update the GitLab package
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. If you're using PgBouncer:
|
||||
|
||||
|
|
@ -737,15 +642,7 @@ sudo touch /etc/gitlab/skip-auto-reconfigure
|
|||
|
||||
**On all primary nodes _excluding_ the primary "deploy node"**
|
||||
|
||||
1. Update the GitLab package
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. Ensure nodes are running the latest code
|
||||
|
||||
|
|
@ -784,15 +681,7 @@ sudo touch /etc/gitlab/skip-auto-reconfigure
|
|||
|
||||
**On secondary Gitaly only nodes**
|
||||
|
||||
1. Update the GitLab package
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. Ensure nodes are running the latest code
|
||||
|
||||
|
|
@ -802,15 +691,7 @@ sudo touch /etc/gitlab/skip-auto-reconfigure
|
|||
|
||||
**On the secondary "deploy node"**
|
||||
|
||||
1. Update the GitLab package
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. To get the regular database migrations and latest code in place, run
|
||||
|
||||
|
|
@ -837,15 +718,7 @@ sudo touch /etc/gitlab/skip-auto-reconfigure
|
|||
|
||||
**On all secondary nodes _excluding_ the secondary "deploy node"**
|
||||
|
||||
1. Update the GitLab package
|
||||
|
||||
```shell
|
||||
# Debian/Ubuntu
|
||||
sudo apt-get update && sudo apt-get install gitlab-ee
|
||||
|
||||
# Centos/RHEL
|
||||
sudo yum install gitlab-ee
|
||||
```
|
||||
1. [Upgrade the GitLab package](package/index.md#upgrade-to-a-specific-version-using-the-official-repositories).
|
||||
|
||||
1. Ensure nodes are running the latest code
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ To enable Admin Mode through the UI:
|
|||
|
||||
To turn on Admin Mode for your current session and access potentially dangerous resources:
|
||||
|
||||
1. On the top bar, select **Enable Admin Mode**.
|
||||
1. On the top bar, select **Main menu > Enter Admin Mode**.
|
||||
1. Try to access any part of the UI with `/admin` in the URL (which requires administrator access).
|
||||
|
||||
When Admin Mode status is disabled or turned off, administrators cannot access resources unless
|
||||
|
|
@ -95,7 +95,11 @@ if they try to open a private group or project, unless they are members of that
|
|||
authentication are supported by Admin Mode. Admin Mode status is stored in the current user session and remains active until either:
|
||||
|
||||
- It is explicitly disabled.
|
||||
- It is disabled automatically after a timeout.
|
||||
- It is disabled automatically after six hours.
|
||||
|
||||
### Turn off Admin Mode for your session
|
||||
|
||||
To turn off Admin Mode for your current session, on the top bar, select **Main menu > Leave Admin mode**.
|
||||
|
||||
### Limitations of Admin Mode
|
||||
|
||||
|
|
|
|||
|
|
@ -190,6 +190,12 @@ To disable it:
|
|||
Feature.disable(:soft_email_confirmation)
|
||||
```
|
||||
|
||||
## Set up LDAP user filter
|
||||
|
||||
You can limit GitLab access to a subset of the LDAP users on your LDAP server.
|
||||
|
||||
See the [documentation on setting up an LDAP user filter](../../../administration/auth/ldap/index.md#set-up-ldap-user-filter) for more information.
|
||||
|
||||
<!-- ## Troubleshooting
|
||||
|
||||
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ Bamboo. For example, `https://bamboo.example.com/browse/PROJ-PLAN`.
|
|||
|
||||
## Update Bamboo build status in GitLab
|
||||
|
||||
You can use a script that uses the [commit status API](../../../api/commits.md#post-the-build-status-to-a-commit)
|
||||
You can use a script that uses the [commit status API](../../../api/commits.md#set-the-pipeline-status-of-a-commit)
|
||||
and Bamboo build variables to:
|
||||
|
||||
- Update the commit with the build status.
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ threads. Some quick actions might not be available to all subscription tiers.
|
|||
| `/health_status <value>` | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No | Set [health status](issues/managing_issues.md#health-status). Valid options for `<value>` are `on_track`, `needs_attention`, and `at_risk` ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213814) in GitLab 14.7). |
|
||||
| `/invite_email email1 email2` | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No | Add up to six email participants. This action is behind feature flag `issue_email_participants` and is not yet supported in issue templates. |
|
||||
| `/iteration *iteration:"iteration name"` | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No | Set iteration. For example, to set the `Late in July` iteration: `/iteration *iteration:"Late in July"` ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/196795) in GitLab 13.1). |
|
||||
| `/label ~label1 ~label2` | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | Add one or more labels. Label names can also start without a tilde (`~`), but mixed syntax is not supported. |
|
||||
| `/label ~label1 ~label2` or `/labels ~label1 ~label2` | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | Add one or more labels. Label names can also start without a tilde (`~`), but mixed syntax is not supported. |
|
||||
| `/lock` | **{check-circle}** Yes | **{check-circle}** Yes | **{dotted-circle}** No | Lock the discussions. |
|
||||
| `/link` | **{check-circle}** Yes | **{dotted-circle}** No | **{dotted-circle}** No | Add a link and description to [linked resources](../../operations/incident_management/linked_resources.md) in an incident ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/374964) in GitLab 15.5). |
|
||||
| `/merge` | **{dotted-circle}** No | **{check-circle}** Yes | **{dotted-circle}** No | Merge changes. Depending on the project setting, this may be [when the pipeline succeeds](merge_requests/merge_when_pipeline_succeeds.md), or adding to a [Merge Train](../../ci/pipelines/merge_trains.md). |
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@
|
|||
module API
|
||||
module Entities
|
||||
class IssuableReferences < Grape::Entity
|
||||
expose :short do |issuable|
|
||||
expose :short, documentation: { type: "string", example: "&6" } do |issuable|
|
||||
issuable.to_reference
|
||||
end
|
||||
|
||||
expose :relative do |issuable, options|
|
||||
expose :relative, documentation: { type: "string", example: "&6" } do |issuable, options|
|
||||
issuable.to_reference(options[:group] || options[:project])
|
||||
end
|
||||
|
||||
expose :full do |issuable|
|
||||
expose :full, documentation: { type: "string", example: "test&6" } do |issuable|
|
||||
issuable.to_reference(full: true)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ module Gitlab
|
|||
current_user.can?(:"set_#{quick_action_target.to_ability_name}_metadata", quick_action_target) &&
|
||||
find_labels.any?
|
||||
end
|
||||
command :label do |labels_param|
|
||||
command :label, :labels do |labels_param|
|
||||
run_label_command(labels: find_labels(labels_param), command: :label, updates_key: :add_label_ids)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -38,11 +38,11 @@ module Gitlab
|
|||
h2 :storage_available_alert, text: /purchased storage is available/
|
||||
|
||||
def plan_ci_limits
|
||||
plan_ci_minutes_element.span.text[%r{([^/ ]+)$}]
|
||||
plan_ci_minutes[/(\d+){2}/]
|
||||
end
|
||||
|
||||
def additional_ci_limits
|
||||
additional_ci_minutes_element.span.text[%r{([^/ ]+)$}]
|
||||
additional_ci_minutes[/(\d+){2}/]
|
||||
end
|
||||
|
||||
# Waits and Checks if storage available alert presents on the page
|
||||
|
|
|
|||
|
|
@ -86,6 +86,15 @@ RSpec.describe "User browses files", :js do
|
|||
visit(project_tree_path(project, "markdown"))
|
||||
end
|
||||
|
||||
it "redirects to the permalink URL" do
|
||||
click_link(".gitignore")
|
||||
click_link("Permalink")
|
||||
|
||||
permalink_path = project_blob_path(project, "#{project.repository.commit('markdown').sha}/.gitignore")
|
||||
|
||||
expect(page).to have_current_path(permalink_path, ignore_query: true)
|
||||
end
|
||||
|
||||
it "shows correct files and links" do
|
||||
expect(page).to have_current_path(project_tree_path(project, "markdown"), ignore_query: true)
|
||||
expect(page).to have_content("README.md")
|
||||
|
|
|
|||
|
|
@ -772,6 +772,7 @@ describe('GfmAutoComplete', () => {
|
|||
input | output
|
||||
${'~'} | ${unassignedLabels}
|
||||
${'/label ~'} | ${unassignedLabels}
|
||||
${'/labels ~'} | ${unassignedLabels}
|
||||
${'/relabel ~'} | ${unassignedLabels}
|
||||
${'/unlabel ~'} | ${[]}
|
||||
`('$input shows $output.length labels', expectLabels);
|
||||
|
|
@ -786,6 +787,7 @@ describe('GfmAutoComplete', () => {
|
|||
input | output
|
||||
${'~'} | ${allLabels}
|
||||
${'/label ~'} | ${unassignedLabels}
|
||||
${'/labels ~'} | ${unassignedLabels}
|
||||
${'/relabel ~'} | ${allLabels}
|
||||
${'/unlabel ~'} | ${assignedLabels}
|
||||
`('$input shows $output.length labels', expectLabels);
|
||||
|
|
@ -800,6 +802,7 @@ describe('GfmAutoComplete', () => {
|
|||
input | output
|
||||
${'~'} | ${assignedLabels}
|
||||
${'/label ~'} | ${[]}
|
||||
${'/labels ~'} | ${[]}
|
||||
${'/relabel ~'} | ${assignedLabels}
|
||||
${'/unlabel ~'} | ${assignedLabels}
|
||||
`('$input shows $output.length labels', expectLabels);
|
||||
|
|
|
|||
|
|
@ -1,116 +1,40 @@
|
|||
import Vue from 'vue';
|
||||
import * as Sentry from '@sentry/browser';
|
||||
import MockAdapter from 'axios-mock-adapter';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import { createWrapper } from '@vue/test-utils';
|
||||
import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures';
|
||||
import initGitlabVersionCheck from '~/gitlab_version_check';
|
||||
import {
|
||||
VERSION_CHECK_BADGE_NO_PROP_FIXTURE,
|
||||
VERSION_CHECK_BADGE_NO_SEVERITY_FIXTURE,
|
||||
VERSION_CHECK_BADGE_FIXTURE,
|
||||
} from './mock_data';
|
||||
|
||||
describe('initGitlabVersionCheck', () => {
|
||||
let originalGon;
|
||||
let mock;
|
||||
let vueApps;
|
||||
|
||||
const defaultResponse = {
|
||||
code: 200,
|
||||
res: { severity: 'success' },
|
||||
};
|
||||
|
||||
const dummyGon = {
|
||||
relative_url_root: '/',
|
||||
};
|
||||
|
||||
const createApp = async (mockResponse, htmlClass) => {
|
||||
originalGon = window.gon;
|
||||
|
||||
const response = {
|
||||
...defaultResponse,
|
||||
...mockResponse,
|
||||
};
|
||||
|
||||
mock = new MockAdapter(axios);
|
||||
mock.onGet().replyOnce(response.code, response.res);
|
||||
|
||||
setHTMLFixture(`<div class="${htmlClass}"></div>`);
|
||||
|
||||
vueApps = await initGitlabVersionCheck();
|
||||
const createApp = (fixture) => {
|
||||
setHTMLFixture(fixture);
|
||||
vueApps = initGitlabVersionCheck();
|
||||
};
|
||||
|
||||
afterEach(() => {
|
||||
mock.restore();
|
||||
window.gon = originalGon;
|
||||
resetHTMLFixture();
|
||||
});
|
||||
|
||||
describe('with no .js-gitlab-version-check-badge elements', () => {
|
||||
beforeEach(async () => {
|
||||
await createApp();
|
||||
});
|
||||
|
||||
it('does not make axios GET request', () => {
|
||||
expect(mock.history.get.length).toBe(0);
|
||||
});
|
||||
|
||||
it('does not render the Version Check Badge', () => {
|
||||
expect(vueApps).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe('with .js-gitlab-version-check-badge element but API errors', () => {
|
||||
beforeEach(async () => {
|
||||
jest.spyOn(Sentry, 'captureException');
|
||||
await createApp({ code: 500, res: null }, 'js-gitlab-version-check-badge');
|
||||
});
|
||||
|
||||
it('does make axios GET request', () => {
|
||||
expect(mock.history.get.length).toBe(1);
|
||||
expect(mock.history.get[0].url).toContain('/admin/version_check.json');
|
||||
});
|
||||
|
||||
it('logs error to Sentry', () => {
|
||||
expect(Sentry.captureException).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('does not render the Version Check Badge', () => {
|
||||
expect(vueApps).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe('with .js-gitlab-version-check-badge element and successful API call', () => {
|
||||
beforeEach(async () => {
|
||||
await createApp({}, 'js-gitlab-version-check-badge');
|
||||
});
|
||||
|
||||
it('does make axios GET request', () => {
|
||||
expect(mock.history.get.length).toBe(1);
|
||||
expect(mock.history.get[0].url).toContain('/admin/version_check.json');
|
||||
});
|
||||
|
||||
it('does render the Version Check Badge', () => {
|
||||
expect(vueApps).toHaveLength(1);
|
||||
expect(vueApps[0]).toBeInstanceOf(Vue);
|
||||
});
|
||||
});
|
||||
|
||||
describe.each`
|
||||
root | description
|
||||
${'/'} | ${'not used (uses its own (sub)domain)'}
|
||||
${'/gitlab'} | ${'custom path'}
|
||||
${'/service/gitlab'} | ${'custom path with 2 depth'}
|
||||
`('path for version_check.json', ({ root, description }) => {
|
||||
describe(`when relative url is ${description}: ${root}`, () => {
|
||||
beforeEach(async () => {
|
||||
originalGon = window.gon;
|
||||
window.gon = { ...dummyGon };
|
||||
window.gon.relative_url_root = root;
|
||||
await createApp({}, 'js-gitlab-version-check-badge');
|
||||
});
|
||||
description | fixture | badgeTexts
|
||||
${'with no version check badge el'} | ${'<div></div>'} | ${[]}
|
||||
${'with version check badge el but no prop data'} | ${VERSION_CHECK_BADGE_NO_PROP_FIXTURE} | ${[undefined]}
|
||||
${'with version check badge el but no severity data'} | ${VERSION_CHECK_BADGE_NO_SEVERITY_FIXTURE} | ${[undefined]}
|
||||
${'with version check badge el and version data'} | ${VERSION_CHECK_BADGE_FIXTURE} | ${['Up to date']}
|
||||
`('$description', ({ fixture, badgeTexts }) => {
|
||||
beforeEach(() => {
|
||||
createApp(fixture);
|
||||
});
|
||||
|
||||
it('reflects the relative url setting', () => {
|
||||
expect(mock.history.get.length).toBe(1);
|
||||
it(`correctly renders the Version Check Badge`, () => {
|
||||
const vueAppInstances = vueApps.map((v) => v && createWrapper(v));
|
||||
const renderedBadgeTexts = vueAppInstances.map((i) => i?.text());
|
||||
|
||||
const pathRegex = new RegExp(`^${root}`);
|
||||
expect(mock.history.get[0].url).toMatch(pathRegex);
|
||||
});
|
||||
expect(renderedBadgeTexts).toStrictEqual(badgeTexts);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
export const VERSION_CHECK_BADGE_NO_PROP_FIXTURE =
|
||||
'<div class="js-gitlab-version-check-badge"></div>';
|
||||
|
||||
export const VERSION_CHECK_BADGE_NO_SEVERITY_FIXTURE = `<div class="js-gitlab-version-check-badge" data-version='{ "size": "sm" }'></div>`;
|
||||
|
||||
export const VERSION_CHECK_BADGE_FIXTURE = `<div class="js-gitlab-version-check-badge" data-version='{ "severity": "success" }'></div>`;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { GlFormCheckbox, GlSprintf } from '@gitlab/ui';
|
||||
import { GlFormCheckbox, GlSprintf, GlTruncate } from '@gitlab/ui';
|
||||
import Vue, { nextTick } from 'vue';
|
||||
import VueRouter from 'vue-router';
|
||||
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
|
||||
|
|
@ -15,7 +15,13 @@ import TimeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
|
|||
import { PACKAGE_ERROR_STATUS } from '~/packages_and_registries/package_registry/constants';
|
||||
|
||||
import ListItem from '~/vue_shared/components/registry/list_item.vue';
|
||||
import { packageData, packagePipelines, packageProject, packageTags } from '../../mock_data';
|
||||
import {
|
||||
linksData,
|
||||
packageData,
|
||||
packagePipelines,
|
||||
packageProject,
|
||||
packageTags,
|
||||
} from '../../mock_data';
|
||||
|
||||
Vue.use(VueRouter);
|
||||
|
||||
|
|
@ -26,9 +32,9 @@ describe('packages_list_row', () => {
|
|||
isGroupPage: false,
|
||||
};
|
||||
|
||||
const packageWithoutTags = { ...packageData(), project: packageProject() };
|
||||
const packageWithoutTags = { ...packageData(), project: packageProject(), ...linksData };
|
||||
const packageWithTags = { ...packageWithoutTags, tags: { nodes: packageTags() } };
|
||||
const packageCannotDestroy = { ...packageData(), canDestroy: false };
|
||||
const packageCannotDestroy = { ...packageData(), ...linksData, canDestroy: false };
|
||||
|
||||
const findPackageTags = () => wrapper.findComponent(PackageTags);
|
||||
const findPackagePath = () => wrapper.findComponent(PackagePath);
|
||||
|
|
@ -41,6 +47,7 @@ describe('packages_list_row', () => {
|
|||
const findCreatedDateText = () => wrapper.findByTestId('created-date');
|
||||
const findTimeAgoTooltip = () => wrapper.findComponent(TimeagoTooltip);
|
||||
const findBulkDeleteAction = () => wrapper.findComponent(GlFormCheckbox);
|
||||
const findPackageName = () => wrapper.findComponent(GlTruncate);
|
||||
|
||||
const mountComponent = ({
|
||||
packageEntity = packageWithoutTags,
|
||||
|
|
@ -81,6 +88,22 @@ describe('packages_list_row', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('does not have a link to navigate to the details page', () => {
|
||||
mountComponent({
|
||||
packageEntity: {
|
||||
...packageWithoutTags,
|
||||
_links: {
|
||||
webPath: null,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(findPackageLink().exists()).toBe(false);
|
||||
expect(findPackageName().props()).toMatchObject({
|
||||
text: '@gitlab-org/package-15',
|
||||
});
|
||||
});
|
||||
|
||||
describe('tags', () => {
|
||||
it('renders package tags when a package has tags', () => {
|
||||
mountComponent({ packageEntity: packageWithTags });
|
||||
|
|
|
|||
|
|
@ -118,6 +118,13 @@ export const packageVersions = () => [
|
|||
},
|
||||
];
|
||||
|
||||
export const linksData = {
|
||||
_links: {
|
||||
webPath: '/gitlab-org/package-15',
|
||||
__typeName: 'PackageLinks',
|
||||
},
|
||||
};
|
||||
|
||||
export const packageData = (extend) => ({
|
||||
__typename: 'Package',
|
||||
id: 'gid://gitlab/Packages::Package/111',
|
||||
|
|
@ -376,6 +383,7 @@ export const packagesListQuery = ({ type = 'group', extend = {}, extendPaginatio
|
|||
nodes: [
|
||||
{
|
||||
...packageData(),
|
||||
...linksData,
|
||||
project: packageProject(),
|
||||
tags: { nodes: packageTags() },
|
||||
pipelines: {
|
||||
|
|
@ -387,6 +395,7 @@ export const packagesListQuery = ({ type = 'group', extend = {}, extendPaginatio
|
|||
project: packageProject(),
|
||||
tags: { nodes: [] },
|
||||
pipelines: { nodes: [] },
|
||||
...linksData,
|
||||
},
|
||||
],
|
||||
pageInfo: pagination(extendPagination),
|
||||
|
|
|
|||
|
|
@ -34,4 +34,16 @@ RSpec.describe VersionCheckHelper do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#gitlab_version_check' do
|
||||
before do
|
||||
allow_next_instance_of(VersionCheck) do |instance|
|
||||
allow(instance).to receive(:response).and_return({ "severity" => "success" })
|
||||
end
|
||||
end
|
||||
|
||||
it 'returns an instance of the VersionCheck class' do
|
||||
expect(helper.gitlab_version_check).to eq({ "severity" => "success" })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ RSpec.describe BlobPresenter do
|
|||
end
|
||||
|
||||
describe '#permalink_path' do
|
||||
it { expect(presenter.permalink_path).to eq("/#{project.full_path}/-/blob/#{project.repository.commit.sha}/files/ruby/regex.rb") }
|
||||
it { expect(presenter.permalink_path).to eq("/#{project.full_path}/-/blob/#{project.repository.commit(blob.commit_id).sha}/files/ruby/regex.rb") }
|
||||
end
|
||||
|
||||
context 'environment has been deployed' do
|
||||
|
|
|
|||
|
|
@ -19,31 +19,25 @@ RSpec.describe Ci::ProcessBuildService, '#execute' do
|
|||
end
|
||||
end
|
||||
|
||||
shared_context 'with ci_retry_job_fix disabled' do
|
||||
before do
|
||||
stub_feature_flags(ci_retry_job_fix: false)
|
||||
end
|
||||
end
|
||||
|
||||
context 'for single build' do
|
||||
let!(:build) { create(:ci_build, *[trait].compact, :created, **conditions, pipeline: pipeline) }
|
||||
|
||||
where(:trait, :conditions, :current_status, :after_status, :retry_after_status, :retry_disabled_after_status) do
|
||||
nil | { when: :on_success } | 'success' | 'pending' | 'pending' | 'pending'
|
||||
nil | { when: :on_success } | 'skipped' | 'pending' | 'pending' | 'pending'
|
||||
nil | { when: :on_success } | 'failed' | 'skipped' | 'skipped' | 'skipped'
|
||||
nil | { when: :on_failure } | 'success' | 'skipped' | 'skipped' | 'skipped'
|
||||
nil | { when: :on_failure } | 'skipped' | 'skipped' | 'skipped' | 'skipped'
|
||||
nil | { when: :on_failure } | 'failed' | 'pending' | 'pending' | 'pending'
|
||||
nil | { when: :always } | 'success' | 'pending' | 'pending' | 'pending'
|
||||
nil | { when: :always } | 'skipped' | 'pending' | 'pending' | 'pending'
|
||||
nil | { when: :always } | 'failed' | 'pending' | 'pending' | 'pending'
|
||||
:actionable | { when: :manual } | 'success' | 'manual' | 'pending' | 'manual'
|
||||
:actionable | { when: :manual } | 'skipped' | 'manual' | 'pending' | 'manual'
|
||||
:actionable | { when: :manual } | 'failed' | 'skipped' | 'skipped' | 'skipped'
|
||||
:schedulable | { when: :delayed } | 'success' | 'scheduled' | 'pending' | 'scheduled'
|
||||
:schedulable | { when: :delayed } | 'skipped' | 'scheduled' | 'pending' | 'scheduled'
|
||||
:schedulable | { when: :delayed } | 'failed' | 'skipped' | 'skipped' | 'skipped'
|
||||
where(:trait, :conditions, :current_status, :after_status, :retry_after_status) do
|
||||
nil | { when: :on_success } | 'success' | 'pending' | 'pending'
|
||||
nil | { when: :on_success } | 'skipped' | 'pending' | 'pending'
|
||||
nil | { when: :on_success } | 'failed' | 'skipped' | 'skipped'
|
||||
nil | { when: :on_failure } | 'success' | 'skipped' | 'skipped'
|
||||
nil | { when: :on_failure } | 'skipped' | 'skipped' | 'skipped'
|
||||
nil | { when: :on_failure } | 'failed' | 'pending' | 'pending'
|
||||
nil | { when: :always } | 'success' | 'pending' | 'pending'
|
||||
nil | { when: :always } | 'skipped' | 'pending' | 'pending'
|
||||
nil | { when: :always } | 'failed' | 'pending' | 'pending'
|
||||
:actionable | { when: :manual } | 'success' | 'manual' | 'pending'
|
||||
:actionable | { when: :manual } | 'skipped' | 'manual' | 'pending'
|
||||
:actionable | { when: :manual } | 'failed' | 'skipped' | 'skipped'
|
||||
:schedulable | { when: :delayed } | 'success' | 'scheduled' | 'pending'
|
||||
:schedulable | { when: :delayed } | 'skipped' | 'scheduled' | 'pending'
|
||||
:schedulable | { when: :delayed } | 'failed' | 'skipped' | 'skipped'
|
||||
end
|
||||
|
||||
with_them do
|
||||
|
|
@ -57,14 +51,6 @@ RSpec.describe Ci::ProcessBuildService, '#execute' do
|
|||
it 'updates the job status to retry_after_status' do
|
||||
expect { subject }.to change { build.status }.to(retry_after_status)
|
||||
end
|
||||
|
||||
context 'when feature flag ci_retry_job_fix is disabled' do
|
||||
include_context 'with ci_retry_job_fix disabled'
|
||||
|
||||
it "updates the job status to retry_disabled_after_status" do
|
||||
expect { subject }.to change { build.status }.to(retry_disabled_after_status)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -84,15 +70,15 @@ RSpec.describe Ci::ProcessBuildService, '#execute' do
|
|||
|
||||
let!(:other_build) { create(:ci_build, :created, when: :on_success, pipeline: pipeline) }
|
||||
|
||||
where(:trait, :build_when, :current_status, :after_status, :retry_after_status, :retry_disabled_after_status) do
|
||||
nil | :on_success | 'success' | 'pending' | 'pending' | 'pending'
|
||||
nil | :on_success | 'skipped' | 'skipped' | 'skipped' | 'skipped'
|
||||
nil | :manual | 'success' | 'manual' | 'pending' | 'manual'
|
||||
nil | :manual | 'skipped' | 'skipped' | 'skipped' | 'skipped'
|
||||
nil | :delayed | 'success' | 'manual' | 'pending' | 'manual'
|
||||
nil | :delayed | 'skipped' | 'skipped' | 'skipped' | 'skipped'
|
||||
:schedulable | :delayed | 'success' | 'scheduled' | 'pending' | 'scheduled'
|
||||
:schedulable | :delayed | 'skipped' | 'skipped' | 'skipped' | 'skipped'
|
||||
where(:trait, :build_when, :current_status, :after_status, :retry_after_status) do
|
||||
nil | :on_success | 'success' | 'pending' | 'pending'
|
||||
nil | :on_success | 'skipped' | 'skipped' | 'skipped'
|
||||
nil | :manual | 'success' | 'manual' | 'pending'
|
||||
nil | :manual | 'skipped' | 'skipped' | 'skipped'
|
||||
nil | :delayed | 'success' | 'manual' | 'pending'
|
||||
nil | :delayed | 'skipped' | 'skipped' | 'skipped'
|
||||
:schedulable | :delayed | 'success' | 'scheduled' | 'pending'
|
||||
:schedulable | :delayed | 'skipped' | 'skipped' | 'skipped'
|
||||
end
|
||||
|
||||
with_them do
|
||||
|
|
@ -106,14 +92,6 @@ RSpec.describe Ci::ProcessBuildService, '#execute' do
|
|||
it 'updates the job status to retry_after_status' do
|
||||
expect { subject }.to change { build.status }.to(retry_after_status)
|
||||
end
|
||||
|
||||
context 'when feature flag ci_retry_job_fix is disabled' do
|
||||
include_context 'with ci_retry_job_fix disabled'
|
||||
|
||||
it "updates the job status to retry_disabled_after_status" do
|
||||
expect { subject }.to change { build.status }.to(retry_disabled_after_status)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -48,12 +48,6 @@ RSpec.describe Ci::RetryJobService do
|
|||
end
|
||||
end
|
||||
|
||||
shared_context 'with ci_retry_job_fix disabled' do
|
||||
before do
|
||||
stub_feature_flags(ci_retry_job_fix: false)
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'clones the job' do
|
||||
let(:job) { job_to_clone }
|
||||
|
||||
|
|
@ -284,14 +278,6 @@ RSpec.describe Ci::RetryJobService do
|
|||
|
||||
with_them do
|
||||
it_behaves_like 'checks enqueue_immediately?'
|
||||
|
||||
context 'when feature flag is disabled' do
|
||||
include_context 'with ci_retry_job_fix disabled'
|
||||
|
||||
it_behaves_like 'checks enqueue_immediately?' do
|
||||
let(:enqueue_immediately) { false }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -384,15 +370,6 @@ RSpec.describe Ci::RetryJobService do
|
|||
expect(subject).to be_success
|
||||
expect(new_job.status).to eq after_status
|
||||
end
|
||||
|
||||
context 'when feature flag is disabled' do
|
||||
include_context 'with ci_retry_job_fix disabled'
|
||||
|
||||
it 'enqueues the new job' do
|
||||
expect(subject).to be_success
|
||||
expect(new_job).to be_pending
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -435,15 +412,6 @@ RSpec.describe Ci::RetryJobService do
|
|||
expect(subject).to be_success
|
||||
expect(new_job.status).to eq after_status
|
||||
end
|
||||
|
||||
context 'when feature flag is disabled' do
|
||||
include_context 'with ci_retry_job_fix disabled'
|
||||
|
||||
it 'enqueues the new job' do
|
||||
expect(subject).to be_success
|
||||
expect(new_job).to be_pending
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -487,19 +455,6 @@ RSpec.describe Ci::RetryJobService do
|
|||
end
|
||||
|
||||
it_behaves_like 'checks enqueue_immediately?'
|
||||
|
||||
context 'when feature flag is disabled' do
|
||||
include_context 'with ci_retry_job_fix disabled'
|
||||
|
||||
it 'enqueues the new job' do
|
||||
expect(subject).to be_success
|
||||
expect(new_job).to be_pending
|
||||
end
|
||||
|
||||
it_behaves_like 'checks enqueue_immediately?' do
|
||||
let(:enqueue_immediately) { false }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2491,6 +2491,16 @@ RSpec.describe QuickActions::InterpretService do
|
|||
expect(message).to eq('One or more contacts were successfully removed.')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when using an alias' do
|
||||
it 'returns the correct execution message' do
|
||||
content = "/labels ~#{bug.title}"
|
||||
|
||||
_, _, message = service.execute(content, issue)
|
||||
|
||||
expect(message).to eq("Added ~\"Bug\" label.")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#explain' do
|
||||
|
|
|
|||
|
|
@ -144,6 +144,12 @@ RSpec.shared_examples 'issuable quick actions' do
|
|||
expect(noteable.labels&.last&.id == feature_label.id).to eq(can_use_quick_action)
|
||||
}
|
||||
),
|
||||
QuickAction.new(
|
||||
action_text: "/labels ~feature",
|
||||
expectation: ->(noteable, can_use_quick_action) {
|
||||
expect(noteable.labels&.last&.id == feature_label.id).to eq(can_use_quick_action)
|
||||
}
|
||||
),
|
||||
QuickAction.new(
|
||||
action_text: "/unlabel",
|
||||
expectation: unlabel_expectation
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ require (
|
|||
golang.org/x/net v0.1.0
|
||||
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c
|
||||
golang.org/x/tools v0.1.12
|
||||
google.golang.org/grpc v1.50.1
|
||||
google.golang.org/grpc v1.51.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
honnef.co/go/tools v0.3.3
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2260,8 +2260,8 @@ google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu
|
|||
google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY=
|
||||
google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
|
||||
google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
|
||||
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
|
|
|
|||
Loading…
Reference in New Issue