Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
d19a19ce85
commit
a1a8632740
|
@ -256,7 +256,7 @@
|
|||
- "lib/gitlab/markdown_cache/active_record/**/*"
|
||||
- "config/prometheus/common_metrics.yml" # Used by Gitlab::DatabaseImporters::CommonMetrics::Importer
|
||||
- "{,ee/,jh/}app/models/project_statistics.rb" # Used to calculate sizes in migration specs
|
||||
- "GITALY_SERVER_VERSION" # Has interactions with background migrations:https://gitlab.com/gitlab-org/gitlab/-/issues/336538
|
||||
- "GITALY_SERVER_VERSION" # Has interactions with background migrations:https://gitlab.com/gitlab-org/gitlab/-/issues/336538
|
||||
# CI changes
|
||||
- ".gitlab-ci.yml"
|
||||
- ".gitlab/ci/**/*"
|
||||
|
@ -1679,7 +1679,7 @@
|
|||
- <<: *if-dot-com-gitlab-org-merge-request
|
||||
changes: *code-patterns
|
||||
when: manual
|
||||
allow_failure: true # manual jobs needs to be allowed to fail, otherwise they block the pipeline
|
||||
allow_failure: true # manual jobs needs to be allowed to fail, otherwise they block the pipeline
|
||||
- when: on_success
|
||||
allow_failure: true
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ workhorse:verify:
|
|||
stage: test
|
||||
needs: []
|
||||
script:
|
||||
- make -C workhorse # test build
|
||||
- make -C workhorse # test build
|
||||
- make -C workhorse verify
|
||||
|
||||
.workhorse:test:
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
documentation](doc/development/changelog.md) for instructions on adding your own
|
||||
entry.
|
||||
|
||||
## 14.6.1 (2022-01-04)
|
||||
|
||||
### Fixed (2 changes)
|
||||
|
||||
- [Ignore new line differences when deciding whether to squash MR](gitlab-org/gitlab@9d25380756bbc11ad5d18ea268b0ed0b60bf92fb) ([merge request](gitlab-org/gitlab!77499))
|
||||
- [Fix re-use of extensions between instances](gitlab-org/gitlab@0ad3357123bbb72493b965b0ab769dab81890397) ([merge request](gitlab-org/gitlab!77499))
|
||||
|
||||
## 14.6.0 (2021-12-21)
|
||||
|
||||
### Added (76 changes)
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import $ from 'jquery';
|
||||
import { sprintf, __ } from '~/locale';
|
||||
import AccessorUtilities from './lib/utils/accessor';
|
||||
import { loadCSSFile } from './lib/utils/css_utils';
|
||||
|
||||
export default class ProjectSelectComboButton {
|
||||
constructor(select) {
|
||||
this.projectSelectInput = $(select);
|
||||
this.newItemBtn = $('.new-project-item-link');
|
||||
this.newItemBtn = $('.js-new-project-item-link');
|
||||
this.resourceType = this.newItemBtn.data('type');
|
||||
this.resourceLabel = this.newItemBtn.data('label');
|
||||
this.formattedText = this.deriveTextVariants();
|
||||
|
@ -80,9 +81,18 @@ export default class ProjectSelectComboButton {
|
|||
setNewItemBtnAttributes(project) {
|
||||
if (project) {
|
||||
this.newItemBtn.attr('href', project.url);
|
||||
this.newItemBtn.text(`${this.formattedText.defaultTextPrefix} in ${project.name}`);
|
||||
this.newItemBtn.text(
|
||||
sprintf(__('New %{type} in %{project}'), {
|
||||
type: this.resourceLabel,
|
||||
project: project.name,
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
this.newItemBtn.text(`Select project to create ${this.formattedText.presetTextSuffix}`);
|
||||
this.newItemBtn.text(
|
||||
sprintf(__('Select project to create %{type}'), {
|
||||
type: this.formattedText.presetTextSuffix,
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,15 +109,12 @@ export default class ProjectSelectComboButton {
|
|||
}
|
||||
|
||||
deriveTextVariants() {
|
||||
const defaultTextPrefix = this.resourceLabel;
|
||||
|
||||
// the trailing slice call depluralizes each of these strings (e.g. new-issues -> new-issue)
|
||||
const localStorageItemType = `new-${this.resourceType.split('_').join('-').slice(0, -1)}`;
|
||||
const presetTextSuffix = this.resourceType.split('_').join(' ').slice(0, -1);
|
||||
|
||||
return {
|
||||
localStorageItemType, // new-issue / new-merge-request
|
||||
defaultTextPrefix, // New issue / New merge request
|
||||
presetTextSuffix, // issue / merge request
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ import { GlToast } from '@gitlab/ui';
|
|||
import Vue from 'vue';
|
||||
import VueApollo from 'vue-apollo';
|
||||
import createDefaultClient from '~/lib/graphql';
|
||||
import { visitUrl } from '~/lib/utils/url_utility';
|
||||
import { updateOutdatedUrl } from '~/runner/runner_search_utils';
|
||||
import AdminRunnersApp from './admin_runners_app.vue';
|
||||
|
||||
Vue.use(GlToast);
|
||||
|
@ -14,6 +16,15 @@ export const initAdminRunners = (selector = '#js-admin-runners') => {
|
|||
return null;
|
||||
}
|
||||
|
||||
// Redirect outdated URLs
|
||||
const updatedUrlQuery = updateOutdatedUrl();
|
||||
if (updatedUrlQuery) {
|
||||
visitUrl(updatedUrlQuery);
|
||||
|
||||
// Prevent mounting the rest of the app, redirecting now.
|
||||
return null;
|
||||
}
|
||||
|
||||
// TODO `activeRunnersCount` should be implemented using a GraphQL API
|
||||
// https://gitlab.com/gitlab-org/gitlab/-/issues/333806
|
||||
const {
|
||||
|
|
|
@ -28,7 +28,15 @@ export default {
|
|||
|
||||
<template>
|
||||
<div>
|
||||
<runner-status-badge :runner="runner" size="sm" />
|
||||
<runner-paused-badge v-if="paused" size="sm" />
|
||||
<runner-status-badge
|
||||
:runner="runner"
|
||||
size="sm"
|
||||
class="gl-display-inline-block gl-max-w-full gl-text-truncate"
|
||||
/>
|
||||
<runner-paused-badge
|
||||
v-if="paused"
|
||||
size="sm"
|
||||
class="gl-display-inline-block gl-max-w-full gl-text-truncate"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -4,11 +4,10 @@ import { __, s__, sprintf } from '~/locale';
|
|||
import { getTimeago } from '~/lib/utils/datetime_utility';
|
||||
import {
|
||||
I18N_ONLINE_RUNNER_TIMEAGO_DESCRIPTION,
|
||||
I18N_NOT_CONNECTED_RUNNER_DESCRIPTION,
|
||||
I18N_NEVER_CONTACTED_RUNNER_DESCRIPTION,
|
||||
I18N_OFFLINE_RUNNER_TIMEAGO_DESCRIPTION,
|
||||
I18N_STALE_RUNNER_DESCRIPTION,
|
||||
STATUS_ONLINE,
|
||||
STATUS_NOT_CONNECTED,
|
||||
STATUS_NEVER_CONTACTED,
|
||||
STATUS_OFFLINE,
|
||||
STATUS_STALE,
|
||||
|
@ -45,12 +44,11 @@ export default {
|
|||
timeAgo: this.contactedAtTimeAgo,
|
||||
}),
|
||||
};
|
||||
case STATUS_NOT_CONNECTED:
|
||||
case STATUS_NEVER_CONTACTED:
|
||||
return {
|
||||
variant: 'muted',
|
||||
label: s__('Runners|not connected'),
|
||||
tooltip: I18N_NOT_CONNECTED_RUNNER_DESCRIPTION,
|
||||
label: s__('Runners|never contacted'),
|
||||
tooltip: I18N_NEVER_CONTACTED_RUNNER_DESCRIPTION,
|
||||
};
|
||||
case STATUS_OFFLINE:
|
||||
return {
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
STATUS_PAUSED,
|
||||
STATUS_ONLINE,
|
||||
STATUS_OFFLINE,
|
||||
STATUS_NOT_CONNECTED,
|
||||
STATUS_NEVER_CONTACTED,
|
||||
STATUS_STALE,
|
||||
PARAM_KEY_STATUS,
|
||||
} from '../../constants';
|
||||
|
@ -16,7 +16,7 @@ const options = [
|
|||
{ value: STATUS_PAUSED, title: s__('Runners|Paused') },
|
||||
{ value: STATUS_ONLINE, title: s__('Runners|Online') },
|
||||
{ value: STATUS_OFFLINE, title: s__('Runners|Offline') },
|
||||
{ value: STATUS_NOT_CONNECTED, title: s__('Runners|Not connected') },
|
||||
{ value: STATUS_NEVER_CONTACTED, title: s__('Runners|Never contacted') },
|
||||
{ value: STATUS_STALE, title: s__('Runners|Stale') },
|
||||
];
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ export const I18N_PROJECT_RUNNER_DESCRIPTION = s__('Runners|Associated with one
|
|||
export const I18N_ONLINE_RUNNER_TIMEAGO_DESCRIPTION = s__(
|
||||
'Runners|Runner is online; last contact was %{timeAgo}',
|
||||
);
|
||||
export const I18N_NOT_CONNECTED_RUNNER_DESCRIPTION = s__(
|
||||
'Runners|This runner has never connected to this instance',
|
||||
export const I18N_NEVER_CONTACTED_RUNNER_DESCRIPTION = s__(
|
||||
'Runners|This runner has never contacted this instance',
|
||||
);
|
||||
export const I18N_OFFLINE_RUNNER_TIMEAGO_DESCRIPTION = s__(
|
||||
'Runners|No recent contact from this runner; last contact was %{timeAgo}',
|
||||
|
@ -60,7 +60,6 @@ export const STATUS_ACTIVE = 'ACTIVE';
|
|||
export const STATUS_PAUSED = 'PAUSED';
|
||||
|
||||
export const STATUS_ONLINE = 'ONLINE';
|
||||
export const STATUS_NOT_CONNECTED = 'NOT_CONNECTED';
|
||||
export const STATUS_NEVER_CONTACTED = 'NEVER_CONTACTED';
|
||||
export const STATUS_OFFLINE = 'OFFLINE';
|
||||
export const STATUS_STALE = 'STALE';
|
||||
|
|
|
@ -16,6 +16,7 @@ import {
|
|||
PARAM_KEY_BEFORE,
|
||||
DEFAULT_SORT,
|
||||
RUNNER_PAGE_SIZE,
|
||||
STATUS_NEVER_CONTACTED,
|
||||
} from './constants';
|
||||
|
||||
/**
|
||||
|
@ -79,6 +80,33 @@ const getPaginationFromParams = (params) => {
|
|||
};
|
||||
};
|
||||
|
||||
// Outdated URL parameters
|
||||
const STATUS_NOT_CONNECTED = 'NOT_CONNECTED';
|
||||
|
||||
/**
|
||||
* Returns an updated URL for old (or deprecated) admin runner URLs.
|
||||
*
|
||||
* Use for redirecting users to currently used URLs.
|
||||
*
|
||||
* @param {String?} URL
|
||||
* @returns Updated URL if outdated, `null` otherwise
|
||||
*/
|
||||
export const updateOutdatedUrl = (url = window.location.href) => {
|
||||
const urlObj = new URL(url);
|
||||
const query = urlObj.search;
|
||||
|
||||
const params = queryToObject(query, { gatherArrays: true });
|
||||
|
||||
const runnerType = params[PARAM_KEY_STATUS]?.[0] || null;
|
||||
if (runnerType === STATUS_NOT_CONNECTED) {
|
||||
const updatedParams = {
|
||||
[PARAM_KEY_STATUS]: [STATUS_NEVER_CONTACTED],
|
||||
};
|
||||
return setUrlParams(updatedParams, url, false, true, true);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Takes a URL query and transforms it into a "search" object
|
||||
* @param {String?} query
|
||||
|
|
|
@ -24,7 +24,7 @@ module Ci
|
|||
span_class = 'gl-text-gray-600'
|
||||
end
|
||||
when :not_connected, :never_contacted
|
||||
title = s_("Runners|New runner, has not connected yet")
|
||||
title = s_("Runners|New runner, has not contacted yet")
|
||||
icon = 'warning-solid'
|
||||
when :offline
|
||||
title = s_("Runners|Runner is offline, last contact was %{runner_contact} ago") % { runner_contact: time_ago_in_words(runner.contacted_at) }
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
- if current_user
|
||||
.page-title-controls
|
||||
= render 'shared/new_project_item_select', path: 'issues/new', label: "New issue", with_feature_enabled: 'issues', type: :issues
|
||||
= render 'shared/new_project_item_select', path: 'issues/new', label: _("issue"), with_feature_enabled: 'issues', type: :issues
|
||||
|
||||
.top-area
|
||||
= render 'shared/issuable/nav', type: :issues, display_count: !@no_filters_set
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
- if current_user
|
||||
.page-title-controls.ml-0.mb-3.ml-sm-auto.mb-sm-0
|
||||
= render 'shared/new_project_item_select', path: 'merge_requests/new', label: "New merge request", with_feature_enabled: 'merge_requests', type: :merge_requests
|
||||
= render 'shared/new_project_item_select', path: 'merge_requests/new', label: _("merge request"), with_feature_enabled: 'merge_requests', type: :merge_requests
|
||||
|
||||
.top-area
|
||||
= render 'shared/issuable/nav', type: :merge_requests, display_count: !@no_filters_set
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
- if @can_bulk_update
|
||||
= render_if_exists 'shared/issuable/bulk_update_button', type: :issues
|
||||
|
||||
= render 'shared/new_project_item_select', path: 'issues/new', label: "New issue", type: :issues, with_feature_enabled: 'issues', with_shared: false, include_projects_in_subgroups: true
|
||||
= render 'shared/new_project_item_select', path: 'issues/new', label: _("issue"), type: :issues, with_feature_enabled: 'issues', with_shared: false, include_projects_in_subgroups: true
|
||||
|
||||
= render 'shared/issuable/search_bar', type: :issues
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
- if @can_bulk_update
|
||||
= render_if_exists 'shared/issuable/bulk_update_button', type: :merge_requests
|
||||
|
||||
= render 'shared/new_project_item_select', path: 'merge_requests/new', label: "New merge request", type: :merge_requests, with_feature_enabled: 'merge_requests', with_shared: false, include_projects_in_subgroups: true
|
||||
= render 'shared/new_project_item_select', path: 'merge_requests/new', label: _("merge request"), type: :merge_requests, with_feature_enabled: 'merge_requests', with_shared: false, include_projects_in_subgroups: true
|
||||
|
||||
= render 'shared/issuable/search_bar', type: :merge_requests
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- if any_projects?(@projects)
|
||||
.project-item-select-holder.btn-group.gl-ml-auto.gl-mr-auto.gl-relative.gl-overflow-hidden{ class: 'gl-display-flex!' }
|
||||
%a.btn.gl-button.btn-confirm.new-project-item-link.block-truncated.qa-new-project-item-link{ href: '', data: { label: local_assigns[:label], type: local_assigns[:type] }, class: "gl-m-0!" }
|
||||
%a.btn.gl-button.btn-confirm.js-new-project-item-link.block-truncated.qa-new-project-item-link{ href: '', data: { label: local_assigns[:label], type: local_assigns[:type] }, class: "gl-m-0!" }
|
||||
= loading_icon(color: 'light')
|
||||
= project_select_tag :project_path, class: "project-item-select gl-absolute! gl-visibility-hidden", data: { include_groups: local_assigns[:include_groups], order_by: 'last_activity_at', relative_path: local_assigns[:path], with_shared: local_assigns[:with_shared], include_projects_in_subgroups: local_assigns[:include_projects_in_subgroups] }, with_feature_enabled: local_assigns[:with_feature_enabled]
|
||||
%button.btn.dropdown-toggle.btn-confirm.btn-md.gl-button.gl-dropdown-toggle.dropdown-toggle-split.new-project-item-select-button.qa-new-project-item-select-button.gl-p-0.gl-w-100{ class: "gl-m-0!", 'aria-label': _('Toggle project select') }
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
- if has_button
|
||||
.text-center
|
||||
- if project_select_button
|
||||
= render 'shared/new_project_item_select', path: 'issues/new', label: _('New issue'), type: :issues, with_feature_enabled: 'issues'
|
||||
= render 'shared/new_project_item_select', path: 'issues/new', label: _('issue'), type: :issues, with_feature_enabled: 'issues'
|
||||
- elsif show_new_issue_link?(@project)
|
||||
= link_to _('New issue'), button_path, class: 'gl-button btn btn-confirm', id: 'new_issue_link'
|
||||
|
||||
|
|
|
@ -40,6 +40,6 @@
|
|||
- if has_button
|
||||
.text-center
|
||||
- if project_select_button
|
||||
= render 'shared/new_project_item_select', path: 'merge_requests/new', label: _('New merge request'), type: :merge_requests, with_feature_enabled: 'merge_requests'
|
||||
= render 'shared/new_project_item_select', path: 'merge_requests/new', label: _('merge request'), type: :merge_requests, with_feature_enabled: 'merge_requests'
|
||||
- else
|
||||
= link_to _('New merge request'), button_path, class: 'gl-button btn btn-confirm', title: _('New merge request'), id: 'new_merge_request_link'
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
- name: "Pseudonymizer" # The name of the feature to be deprecated
|
||||
announcement_milestone: "14.7" # The milestone when this feature was first announced as deprecated.
|
||||
announcement_date: "2021-01-22" # The date of the milestone release when this feature was first announced as deprecated. This should almost always be the 22nd of a month (YYYY-MM-22), unless you did an out of band blog post.
|
||||
removal_milestone: "15.0" # The milestone when this feature is planned to be removed
|
||||
removal_date: "2021-06-22" # This should almost always be the 22nd of a month (YYYY-MM-22), the date of the milestone release when this feature is planned to be removed.
|
||||
body: | # Do not modify this line, instead modify the lines below.
|
||||
The Pseudonymizer feature is generally unused,
|
||||
can cause production issues with large databases,
|
||||
and can interfere with object storage development.
|
||||
It is now considered deprecated, and will be removed in GitLab 15.0.
|
||||
documentation_url: "https://docs.gitlab.com/ee/administration/pseudonymizer.html"
|
||||
issue_url: "https://gitlab.com/gitlab-org/gitlab/-/issues/219952"
|
|
@ -14,42 +14,43 @@ the package will assume the defaults as noted below.
|
|||
See the table below for the list of ports that the Omnibus GitLab assigns
|
||||
by default:
|
||||
|
||||
| Component | On by default | Communicates via | Alternative | Connection port |
|
||||
|:-------------------:|:-------------:|:----------------:|:-----------:|:------------------------------------------:|
|
||||
| GitLab Rails | Yes | Port | X | 80 or 443 |
|
||||
| GitLab Shell | Yes | Port | X | 22 |
|
||||
| PostgreSQL | Yes | Socket | Port (5432) | X |
|
||||
| Redis | Yes | Socket | Port (6379) | X |
|
||||
| Puma | Yes | Socket | Port (8080) | X |
|
||||
| GitLab Workhorse | Yes | Socket | Port (8181) | X |
|
||||
| NGINX status | Yes | Port | X | 8060 |
|
||||
| Prometheus | Yes | Port | X | 9090 |
|
||||
| Node exporter | Yes | Port | X | 9100 |
|
||||
| Redis exporter | Yes | Port | X | 9121 |
|
||||
| PostgreSQL exporter | Yes | Port | X | 9187 |
|
||||
| PgBouncer exporter | No | Port | X | 9188 |
|
||||
| GitLab Exporter | Yes | Port | X | 9168 |
|
||||
| Sidekiq exporter | Yes | Port | X | 8082 |
|
||||
| Puma exporter | No | Port | X | 8083 |
|
||||
| Geo PostgreSQL | No | Socket | Port (5431) | X |
|
||||
| Redis Sentinel | No | Port | X | 26379 |
|
||||
| Incoming email | No | Port | X | 143 |
|
||||
| Elastic search | No | Port | X | 9200 |
|
||||
| GitLab Pages | No | Port | X | 80 or 443 |
|
||||
| GitLab Registry | No* | Port | X | 80, 443 or 5050 |
|
||||
| GitLab Registry | No | Port | X | 5000 |
|
||||
| LDAP | No | Port | X | Depends on the component configuration |
|
||||
| Kerberos | No | Port | X | 8443 or 8088 |
|
||||
| OmniAuth | Yes | Port | X | Depends on the component configuration |
|
||||
| SMTP | No | Port | X | 465 |
|
||||
| Remote syslog | No | Port | X | 514 |
|
||||
| Mattermost | No | Port | X | 8065 |
|
||||
| Mattermost | No | Port | X | 80 or 443 |
|
||||
| PgBouncer | No | Port | X | 6432 |
|
||||
| Consul | No | Port | X | 8300, 8301(UDP), 8500, 8600[^Consul-notes] |
|
||||
| Patroni | No | Port | X | 8008 |
|
||||
| GitLab KAS | No | Port | X | 8150 |
|
||||
| Gitaly | No | Port | X | 8075 |
|
||||
| Component | On by default | Communicates via | Alternative | Connection port |
|
||||
|:--------------------:|:-------------:|:----------------:|:-----------:|:------------------------------------------:|
|
||||
| GitLab Rails | Yes | Port | X | 80 or 443 |
|
||||
| GitLab Shell | Yes | Port | X | 22 |
|
||||
| PostgreSQL | Yes | Socket | Port (5432) | X |
|
||||
| Redis | Yes | Socket | Port (6379) | X |
|
||||
| Puma | Yes | Socket | Port (8080) | X |
|
||||
| GitLab Workhorse | Yes | Socket | Port (8181) | X |
|
||||
| NGINX status | Yes | Port | X | 8060 |
|
||||
| Prometheus | Yes | Port | X | 9090 |
|
||||
| Node exporter | Yes | Port | X | 9100 |
|
||||
| Redis exporter | Yes | Port | X | 9121 |
|
||||
| PostgreSQL exporter | Yes | Port | X | 9187 |
|
||||
| PgBouncer exporter | No | Port | X | 9188 |
|
||||
| GitLab Exporter | Yes | Port | X | 9168 |
|
||||
| Sidekiq exporter | Yes | Port | X | 8082 |
|
||||
| Sidekiq health check | No | Port | X | 8092[^Sidekiq-health] |
|
||||
| Puma exporter | No | Port | X | 8083 |
|
||||
| Geo PostgreSQL | No | Socket | Port (5431) | X |
|
||||
| Redis Sentinel | No | Port | X | 26379 |
|
||||
| Incoming email | No | Port | X | 143 |
|
||||
| Elastic search | No | Port | X | 9200 |
|
||||
| GitLab Pages | No | Port | X | 80 or 443 |
|
||||
| GitLab Registry | No* | Port | X | 80, 443 or 5050 |
|
||||
| GitLab Registry | No | Port | X | 5000 |
|
||||
| LDAP | No | Port | X | Depends on the component configuration |
|
||||
| Kerberos | No | Port | X | 8443 or 8088 |
|
||||
| OmniAuth | Yes | Port | X | Depends on the component configuration |
|
||||
| SMTP | No | Port | X | 465 |
|
||||
| Remote syslog | No | Port | X | 514 |
|
||||
| Mattermost | No | Port | X | 8065 |
|
||||
| Mattermost | No | Port | X | 80 or 443 |
|
||||
| PgBouncer | No | Port | X | 6432 |
|
||||
| Consul | No | Port | X | 8300, 8301(UDP), 8500, 8600[^Consul-notes] |
|
||||
| Patroni | No | Port | X | 8008 |
|
||||
| GitLab KAS | No | Port | X | 8150 |
|
||||
| Gitaly | No | Port | X | 8075 |
|
||||
|
||||
Legend:
|
||||
|
||||
|
@ -70,3 +71,5 @@ NOTE:
|
|||
In some cases, the GitLab Registry will be automatically enabled by default. Please see [our documentation](../packages/container_registry.md) for more details
|
||||
|
||||
[^Consul-notes]: If using additional Consul functionality, more ports may need to be opened. See the [official documentation](https://www.consul.io/docs/install/ports#ports-table) for the list.
|
||||
|
||||
[^Sidekiq-health]: If Sidekiq health check settings are not set, they will default to the Sidekiq metrics exporter settings. This default is deprecated and is set to be removed in [GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/347509).
|
||||
|
|
|
@ -7,6 +7,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
# Integrity check Rake task **(FREE SELF)**
|
||||
|
||||
GitLab provides Rake tasks to check the integrity of various components.
|
||||
See also the [check GitLab configuration Rake task](maintenance.md#check-gitlab-configuration).
|
||||
|
||||
## Repository integrity
|
||||
|
||||
|
@ -118,9 +119,9 @@ and these checks verify them against current files.
|
|||
|
||||
Integrity checks are supported for the following types of file:
|
||||
|
||||
- CI artifacts (Available from version 10.7.0)
|
||||
- LFS objects (Available from version 10.6.0)
|
||||
- User uploads (Available from version 10.6.0)
|
||||
- CI artifacts (introduced in GitLab 10.7.0)
|
||||
- LFS objects (introduced in GitLab 10.6.0)
|
||||
- User uploads (introduced in GitLab 10.6.0)
|
||||
|
||||
**Omnibus Installation**
|
||||
|
||||
|
|
|
@ -106,6 +106,8 @@ The `gitlab:check` Rake task runs the following Rake tasks:
|
|||
- `gitlab:gitlab_shell:check`
|
||||
- `gitlab:gitaly:check`
|
||||
- `gitlab:sidekiq:check`
|
||||
- `gitlab:incoming_email:check`
|
||||
- `gitlab:ldap:check`
|
||||
- `gitlab:app:check`
|
||||
|
||||
It checks that each component was set up according to the installation guide and suggest fixes
|
||||
|
|
|
@ -21,8 +21,6 @@ you want using steps 1 and 2 from the GitLab downloads page.
|
|||
1. Generate the Sidekiq configuration:
|
||||
|
||||
```ruby
|
||||
sidekiq['listen_address'] = "10.10.1.48"
|
||||
|
||||
## Optional: Enable extra Sidekiq processes
|
||||
sidekiq_cluster['enable'] = true
|
||||
sidekiq['queue_groups'] = [
|
||||
|
@ -128,6 +126,34 @@ you want using steps 1 and 2 from the GitLab downloads page.
|
|||
external_url 'https://gitlab.example.com'
|
||||
```
|
||||
|
||||
1. (Optional) If you want to collect Sidekiq metrics, enable the Sidekiq metrics server.
|
||||
To make metrics available from `localhost:8082/metrics`, set the following values:
|
||||
|
||||
```ruby
|
||||
sidekiq['metrics_enabled'] = true
|
||||
sidekiq['listen_address'] = "localhost"
|
||||
sidekiq['listen_port'] = "8082"
|
||||
|
||||
# Optionally log all the metrics server logs to log/sidekiq_exporter.log
|
||||
sidekiq['exporter_log_enabled'] = true
|
||||
```
|
||||
|
||||
1. (Optional) If you use health check probes to observe Sidekiq,
|
||||
set a separate port for health checks.
|
||||
Configuring health checks is only necessary if there is something that actually probes them.
|
||||
For more information about health checks, see the [Sidekiq health check page](sidekiq_health_check.md).
|
||||
Enable health checks for Sidekiq:
|
||||
|
||||
```ruby
|
||||
sidekiq['health_checks_enabled'] = true
|
||||
sidekiq['health_checks_listen_address'] = "localhost"
|
||||
sidekiq['health_checks_listen_port'] = "8092"
|
||||
```
|
||||
|
||||
NOTE:
|
||||
If health check settings are not set, they will default to the metrics exporter settings.
|
||||
This default is deprecated and is set to be removed in [GitLab 15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/347509).
|
||||
|
||||
1. Run `gitlab-ctl reconfigure`.
|
||||
|
||||
You will need to restart the Sidekiq nodes after an update has occurred and database
|
||||
|
@ -196,7 +222,13 @@ gitlab_rails['auto_migrate'] = false
|
|||
#######################################
|
||||
### Sidekiq configuration ###
|
||||
#######################################
|
||||
sidekiq['listen_address'] = "10.10.1.48"
|
||||
sidekiq['metrics_enabled'] = true
|
||||
sidekiq['exporter_log_enabled'] = false
|
||||
sidekiq['listen_port'] = "8082"
|
||||
|
||||
sidekiq['health_checks_enabled'] = true
|
||||
sidekiq['health_checks_listen_address'] = "localhost"
|
||||
sidekiq['health_checks_listen_port'] = "8092"
|
||||
|
||||
#######################################
|
||||
### Monitoring configuration ###
|
||||
|
@ -230,3 +262,4 @@ Related Sidekiq configuration:
|
|||
1. [Extra Sidekiq processes](operations/extra_sidekiq_processes.md)
|
||||
1. [Extra Sidekiq routing](operations/extra_sidekiq_routing.md)
|
||||
1. [Using the GitLab-Sidekiq chart](https://docs.gitlab.com/charts/charts/gitlab/sidekiq/)
|
||||
1. [Sidekiq health checks](sidekiq_health_check.md)
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
---
|
||||
stage: Enablement
|
||||
group: Distribution
|
||||
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
|
||||
---
|
||||
|
||||
# Sidekiq Health Check **(FREE SELF)**
|
||||
|
||||
GitLab provides liveness and readiness probes to indicate service health and
|
||||
reachability to the Sidekiq cluster. These endpoints
|
||||
[can be provided to schedulers like Kubernetes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
|
||||
to hold traffic until the system is ready or restart the container as needed.
|
||||
|
||||
The health check server can be set up when [configuring Sidekiq](sidekiq.md).
|
||||
|
||||
## Readiness
|
||||
|
||||
The readiness probe checks whether the Sidekiq workers are ready to process jobs.
|
||||
|
||||
```plaintext
|
||||
GET /readiness
|
||||
```
|
||||
|
||||
Assuming you set up Sidekiq's address and port to be `localhost` and `8092` respectively,
|
||||
here's an example request:
|
||||
|
||||
```shell
|
||||
curl "http://localhost:8092/readiness"
|
||||
```
|
||||
|
||||
On success, the endpoint returns a `200` HTTP status code, and a response like the following:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "ok"
|
||||
}
|
||||
```
|
||||
|
||||
## Liveness
|
||||
|
||||
Checks whether the Sidekiq cluster is running.
|
||||
|
||||
```plaintext
|
||||
GET /liveness
|
||||
```
|
||||
|
||||
Assuming you set up Sidekiq's address and port to be `localhost` and `8092` respectively,
|
||||
here's an example request:
|
||||
|
||||
```shell
|
||||
curl "http://localhost:8092/liveness"
|
||||
```
|
||||
|
||||
On success, the endpoint returns a `200` HTTP status code, and a response like the following:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "ok"
|
||||
}
|
||||
```
|
|
@ -62,6 +62,7 @@ GET /issues?state=opened
|
|||
| `created_after` | datetime | no | Return issues created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) |
|
||||
| `created_before` | datetime | no | Return issues created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) |
|
||||
| `due_date` | string | no | Return issues that have no due date, are overdue, or whose due date is this week, this month, or between two weeks ago and next month. Accepts: `0` (no due date), `overdue`, `week`, `month`, `next_month_and_previous_two_weeks`. _([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/233420) in GitLab 13.3)_ |
|
||||
| `epic_id` **(PREMIUM)** | integer | no | Return issues associated with the given epic ID. `None` returns issues that are not associated with an epic. `Any` returns issues that are associated with an epic. _([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46887) in GitLab 13.6)_
|
||||
| `iids[]` | integer array | no | Return only the issues having the given `iid` |
|
||||
| `in` | string | no | Modify the scope of the `search` attribute. `title`, `description`, or a string joining them with comma. Default is `title,description` |
|
||||
| `issue_type` | string | no | Filter to a given type of issue. One of `issue`, `incident`, or `test_case`. _([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/260375) in GitLab 13.12)_ |
|
||||
|
@ -264,6 +265,7 @@ GET /groups/:id/issues?state=opened
|
|||
| `created_after` | datetime | no | Return issues created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) |
|
||||
| `created_before` | datetime | no | Return issues created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) |
|
||||
| `due_date` | string | no | Return issues that have no due date, are overdue, or whose due date is this week, this month, or between two weeks ago and next month. Accepts: `0` (no due date), `overdue`, `week`, `month`, `next_month_and_previous_two_weeks`. _([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/233420) in GitLab 13.3)_ |
|
||||
| `epic_id` **(PREMIUM)** | integer | no | Return issues associated with the given epic ID. `None` returns issues that are not associated with an epic. `Any` returns issues that are associated with an epic. _([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46887) in GitLab 13.6)_
|
||||
| `id` | integer/string | yes | The ID or [URL-encoded path of the group](index.md#namespaced-path-encoding) owned by the authenticated user |
|
||||
| `iids[]` | integer array | no | Return only the issues having the given `iid` |
|
||||
| `issue_type` | string | no | Filter to a given type of issue. One of `issue`, `incident`, or `test_case`. _([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/260375) in GitLab 13.12)_ |
|
||||
|
@ -463,6 +465,7 @@ GET /projects/:id/issues?state=opened
|
|||
| `created_after` | datetime | no | Return issues created on or after the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) |
|
||||
| `created_before` | datetime | no | Return issues created on or before the given time. Expected in ISO 8601 format (`2019-03-15T08:00:00Z`) |
|
||||
| `due_date` | string | no | Return issues that have no due date, are overdue, or whose due date is this week, this month, or between two weeks ago and next month. Accepts: `0` (no due date), `overdue`, `week`, `month`, `next_month_and_previous_two_weeks`. _([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/233420) in GitLab 13.3)_ |
|
||||
| `epic_id` **(PREMIUM)** | integer | no | Return issues associated with the given epic ID. `None` returns issues that are not associated with an epic. `Any` returns issues that are associated with an epic. _([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46887) in GitLab 13.6)_
|
||||
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) owned by the authenticated user |
|
||||
| `iids[]` | integer array | no | Return only the issues having the given `iid` |
|
||||
| `issue_type` | string | no | Filter to a given type of issue. One of `issue`, `incident`, or `test_case`. _([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/260375) in GitLab 13.12)_ |
|
||||
|
|
|
@ -41,6 +41,7 @@ GET /issues_statistics?confidential=true
|
|||
| `author_username` | string | no | Return issues created by the given `username`. Similar to `author_id` and mutually exclusive with `author_id`. |
|
||||
| `assignee_id` | integer | no | Return issues assigned to the given user `id`. Mutually exclusive with `assignee_username`. `None` returns unassigned issues. `Any` returns issues with an assignee. |
|
||||
| `assignee_username` | string array | no | Return issues assigned to the given `username`. Similar to `assignee_id` and mutually exclusive with `assignee_id`. In GitLab CE `assignee_username` array should only contain a single value or an invalid parameter error is returned otherwise. |
|
||||
| `epic_id` **(PREMIUM)** | integer | no | Return issues associated with the given epic ID. `None` returns issues that are not associated with an epic. `Any` returns issues that are associated with an epic. _([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46887) in GitLab 13.6)_
|
||||
| `my_reaction_emoji` | string | no | Return issues reacted by the authenticated user by the given `emoji`. `None` returns issues not given a reaction. `Any` returns issues given at least one reaction. |
|
||||
| `iids[]` | integer array | no | Return only the issues having the given `iid` |
|
||||
| `search` | string | no | Search issues against their `title` and `description` |
|
||||
|
|
|
@ -43,6 +43,8 @@ During registration, by enabling proper scopes, you can limit the range of
|
|||
resources which the `application` can access. Upon creation, you obtain the
|
||||
`application` credentials: _Application ID_ and _Client Secret_ - **keep them secure**.
|
||||
|
||||
For a list of scopes in GitLab, see [the provider documentation](../integration/oauth_provider.md#authorized-applications).
|
||||
|
||||
### Prevent CSRF attacks
|
||||
|
||||
To [protect redirect-based flows](https://tools.ietf.org/id/draft-ietf-oauth-security-topics-13.html#rec_redirect),
|
||||
|
@ -97,7 +99,7 @@ Before starting the flow, generate the `STATE`, the `CODE_VERIFIER` and the `COD
|
|||
|
||||
This page asks the user to approve the request from the app to access their
|
||||
account based on the scopes specified in `REQUESTED_SCOPES`. The user is then
|
||||
redirected back to the specified `REDIRECT_URI`. The [scope parameter](https://github.com/doorkeeper-gem/doorkeeper/wiki/Using-Scopes#requesting-particular-scopes)
|
||||
redirected back to the specified `REDIRECT_URI`. The [scope parameter](../integration/oauth_provider.md#authorized-applications)
|
||||
is a space-separated list of scopes associated with the user.
|
||||
For example,`scope=read_user+profile` requests the `read_user` and `profile` scopes.
|
||||
The redirect includes the authorization `code`, for example:
|
||||
|
@ -177,7 +179,7 @@ be used as a CSRF token.
|
|||
|
||||
This page asks the user to approve the request from the app to access their
|
||||
account based on the scopes specified in `REQUESTED_SCOPES`. The user is then
|
||||
redirected back to the specified `REDIRECT_URI`. The [scope parameter](https://github.com/doorkeeper-gem/doorkeeper/wiki/Using-Scopes#requesting-particular-scopes)
|
||||
redirected back to the specified `REDIRECT_URI`. The [scope parameter](../integration/oauth_provider.md#authorized-applications)
|
||||
is a space-separated list of scopes associated with the user.
|
||||
For example,`scope=read_user+profile` requests the `read_user` and `profile` scopes.
|
||||
The redirect includes the authorization `code`, for example:
|
||||
|
@ -265,7 +267,7 @@ https://gitlab.example.com/oauth/authorize?client_id=APP_ID&redirect_uri=REDIREC
|
|||
|
||||
This prompts the user to approve the applications access to their account
|
||||
based on the scopes specified in `REQUESTED_SCOPES` and then redirect back to
|
||||
the `REDIRECT_URI` you provided. The [scope parameter](https://github.com/doorkeeper-gem/doorkeeper/wiki/Using-Scopes#requesting-particular-scopes)
|
||||
the `REDIRECT_URI` you provided. The [scope parameter](../integration/oauth_provider.md#authorized-applications)
|
||||
is a space-separated list of scopes you want to have access to (for example, `scope=read_user+profile`
|
||||
would request `read_user` and `profile` scopes). The redirect
|
||||
includes a fragment with `access_token` as well as token details in GET
|
||||
|
|
|
@ -244,6 +244,16 @@ In milestone 15.0, we will remove the `pipelines` attribute from the API respons
|
|||
Announced: 2021-11-22
|
||||
Planned removal: 2022-05-22
|
||||
|
||||
### Pseudonymizer
|
||||
|
||||
The Pseudonymizer feature is generally unused,
|
||||
can cause production issues with large databases,
|
||||
and can interfere with object storage development.
|
||||
It is now considered deprecated, and will be removed in GitLab 15.0.
|
||||
|
||||
Announced: 2021-01-22
|
||||
Planned removal: 2021-06-22
|
||||
|
||||
### REST API Runner will not contain `paused`
|
||||
|
||||
The GitLab Runner REST and GraphQL API endpoints will not return `paused` or `active` as a status in GitLab 15.0.
|
||||
|
|
|
@ -85,7 +85,7 @@ Certain releases may require different migrations to be
|
|||
finished before you update to the newer version.
|
||||
|
||||
[Batched migrations](#batched-background-migrations) are a migration type available in GitLab 14.0 and later.
|
||||
Background migrations and batched migrations not the same, so you should check that both are
|
||||
Background migrations and batched migrations are not the same, so you should check that both are
|
||||
complete before updating.
|
||||
|
||||
Decrease the time required to complete these migrations by increasing the number of
|
||||
|
|
|
@ -131,6 +131,10 @@ On failure, the endpoint returns a `503` HTTP status code.
|
|||
|
||||
This check is being exempt from Rack Attack.
|
||||
|
||||
## Sidekiq
|
||||
|
||||
Learn how to configure the [Sidekiq health checks](../../../administration/sidekiq_health_check.md).
|
||||
|
||||
<!-- ## Troubleshooting
|
||||
|
||||
Include any troubleshooting steps that you can foresee. If you know beforehand what issues
|
||||
|
|
|
@ -29,7 +29,7 @@ before_script:
|
|||
- ruby -v # Print out ruby version for debugging
|
||||
# Uncomment next line if your rails app needs a JS runtime:
|
||||
# - apt-get update -q && apt-get install nodejs -yqq
|
||||
- bundle config set path 'vendor' # Install dependencies into ./vendor/ruby
|
||||
- bundle config set path 'vendor' # Install dependencies into ./vendor/ruby
|
||||
- bundle install -j $(nproc)
|
||||
|
||||
# Optional - Delete if not using `rubocop`
|
||||
|
|
|
@ -23484,6 +23484,9 @@ msgstr ""
|
|||
msgid "New %{issueType}"
|
||||
msgstr ""
|
||||
|
||||
msgid "New %{type} in %{project}"
|
||||
msgstr ""
|
||||
|
||||
msgid "New Application"
|
||||
msgstr ""
|
||||
|
||||
|
@ -30537,10 +30540,13 @@ msgstr ""
|
|||
msgid "Runners|Name"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|Never contacted"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|New registration token generated!"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|New runner, has not connected yet"
|
||||
msgid "Runners|New runner, has not contacted yet"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|No contact from this runner in over 3 months"
|
||||
|
@ -30552,9 +30558,6 @@ msgstr ""
|
|||
msgid "Runners|Not available to run jobs"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|Not connected"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|Offline"
|
||||
msgstr ""
|
||||
|
||||
|
@ -30669,7 +30672,7 @@ msgstr ""
|
|||
msgid "Runners|The runner will be permanently deleted and no longer available for projects or groups in the instance. Are you sure you want to continue?"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|This runner has never connected to this instance"
|
||||
msgid "Runners|This runner has never contacted this instance"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|This runner is associated with one or more projects."
|
||||
|
@ -30738,7 +30741,7 @@ msgstr ""
|
|||
msgid "Runners|locked"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|not connected"
|
||||
msgid "Runners|never contacted"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|offline"
|
||||
|
@ -31987,6 +31990,9 @@ msgstr ""
|
|||
msgid "Select project to choose zone"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select project to create %{type}"
|
||||
msgstr ""
|
||||
|
||||
msgid "Select project to create issue"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -192,17 +192,21 @@ RSpec.describe "Admin Runners" do
|
|||
expect(page).not_to have_content 'runner-a-2'
|
||||
end
|
||||
|
||||
it 'shows correct runner when type is selected and search term is entered' do
|
||||
create(:ci_runner, :instance, description: 'runner-connected', contacted_at: Time.now)
|
||||
create(:ci_runner, :instance, description: 'runner-not-connected', contacted_at: nil)
|
||||
it 'shows correct runner when status filter is entered' do
|
||||
never_connected = create(:ci_runner, :instance, description: 'runner-never-contacted', contacted_at: nil)
|
||||
create(:ci_runner, :instance, description: 'runner-contacted', contacted_at: Time.now)
|
||||
|
||||
visit admin_runners_path
|
||||
|
||||
# use the string "Not" to avoid using space and trigger an early selection
|
||||
input_filtered_search_filter_is_only('Status', 'Not')
|
||||
# use the string "Never" to avoid using space and trigger an early selection
|
||||
input_filtered_search_filter_is_only('Status', 'Never')
|
||||
|
||||
expect(page).not_to have_content 'runner-connected'
|
||||
expect(page).to have_content 'runner-not-connected'
|
||||
expect(page).to have_content 'runner-never-contacted'
|
||||
expect(page).not_to have_content 'runner-contacted'
|
||||
|
||||
within "[data-testid='runner-row-#{never_connected.id}']" do
|
||||
expect(page).to have_selector '.badge', text: 'never contacted'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -378,6 +382,14 @@ RSpec.describe "Admin Runners" do
|
|||
end
|
||||
end
|
||||
|
||||
context "when visiting outdated URLs" do
|
||||
it 'updates NOT_CONNECTED runner status to NEVER_CONNECTED' do
|
||||
visit admin_runners_path('status[]': 'NOT_CONNECTED')
|
||||
|
||||
expect(page).to have_current_path(admin_runners_path('status[]': 'NEVER_CONTACTED') )
|
||||
end
|
||||
end
|
||||
|
||||
describe 'runners registration' do
|
||||
let!(:token) { Gitlab::CurrentSettings.runners_registration_token }
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ RSpec.describe 'Dashboard Issues' do
|
|||
find('#select2-drop-mask', visible: false)
|
||||
execute_script("$('#select2-drop-mask').remove();")
|
||||
|
||||
find('.new-project-item-link').click
|
||||
find('.js-new-project-item-link').click
|
||||
|
||||
expect(page).to have_current_path("#{project_path}/-/issues/new")
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ RSpec.describe 'Dashboard > Milestones' do
|
|||
first('.select2-result-label').click
|
||||
end
|
||||
|
||||
find('.new-project-item-link').click
|
||||
find('.js-new-project-item-link').click
|
||||
|
||||
expect(current_path).to eq(new_group_milestone_path(group))
|
||||
end
|
||||
|
|
|
@ -67,7 +67,7 @@ RSpec.describe 'Group merge requests page' do
|
|||
end
|
||||
|
||||
it 'shows projects only with merge requests feature enabled', :js do
|
||||
find('.new-project-item-link').click
|
||||
find('.js-new-project-item-link').click
|
||||
|
||||
page.within('.select2-results') do
|
||||
expect(page).to have_content(project.name_with_namespace)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="project-item-select-holder">
|
||||
<input class="project-item-select" data-group-id="12345" data-relative-path="issues/new" />
|
||||
<a class="new-project-item-link" data-label="New issue" data-type="issues" href="">
|
||||
<a class="js-new-project-item-link" data-label="issue" data-type="issues" href="">
|
||||
<span class="gl-spinner"></span>
|
||||
</a>
|
||||
<a class="new-project-item-select-button">
|
||||
|
|
|
@ -28,7 +28,7 @@ describe('Project Select Combo Button', () => {
|
|||
|
||||
loadFixtures(fixturePath);
|
||||
|
||||
testContext.newItemBtn = document.querySelector('.new-project-item-link');
|
||||
testContext.newItemBtn = document.querySelector('.js-new-project-item-link');
|
||||
testContext.projectSelectInput = document.querySelector('.project-item-select');
|
||||
});
|
||||
|
||||
|
@ -120,7 +120,6 @@ describe('Project Select Combo Button', () => {
|
|||
const returnedVariants = testContext.method();
|
||||
|
||||
expect(returnedVariants.localStorageItemType).toBe('new-merge-request');
|
||||
expect(returnedVariants.defaultTextPrefix).toBe('New merge request');
|
||||
expect(returnedVariants.presetTextSuffix).toBe('merge request');
|
||||
});
|
||||
|
||||
|
@ -131,7 +130,6 @@ describe('Project Select Combo Button', () => {
|
|||
const returnedVariants = testContext.method();
|
||||
|
||||
expect(returnedVariants.localStorageItemType).toBe('new-issue');
|
||||
expect(returnedVariants.defaultTextPrefix).toBe('New issue');
|
||||
expect(returnedVariants.presetTextSuffix).toBe('issue');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -69,7 +69,9 @@ describe('RunnerList', () => {
|
|||
const { id, description, version, ipAddress, shortSha } = mockRunners[0];
|
||||
|
||||
// Badges
|
||||
expect(findCell({ fieldKey: 'status' }).text()).toMatchInterpolatedText('not connected paused');
|
||||
expect(findCell({ fieldKey: 'status' }).text()).toMatchInterpolatedText(
|
||||
'never contacted paused',
|
||||
);
|
||||
|
||||
// Runner summary
|
||||
expect(findCell({ fieldKey: 'summary' }).text()).toContain(
|
||||
|
|
|
@ -6,7 +6,6 @@ import {
|
|||
STATUS_ONLINE,
|
||||
STATUS_OFFLINE,
|
||||
STATUS_STALE,
|
||||
STATUS_NOT_CONNECTED,
|
||||
STATUS_NEVER_CONTACTED,
|
||||
} from '~/runner/constants';
|
||||
|
||||
|
@ -50,20 +49,7 @@ describe('RunnerTypeBadge', () => {
|
|||
expect(getTooltip().value).toBe('Runner is online; last contact was 1 minute ago');
|
||||
});
|
||||
|
||||
it('renders not connected state', () => {
|
||||
createComponent({
|
||||
runner: {
|
||||
contactedAt: null,
|
||||
status: STATUS_NOT_CONNECTED,
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper.text()).toBe('not connected');
|
||||
expect(findBadge().props('variant')).toBe('muted');
|
||||
expect(getTooltip().value).toMatch('This runner has never connected');
|
||||
});
|
||||
|
||||
it('renders never contacted state as not connected, for backwards compatibility', () => {
|
||||
it('renders never contacted state', () => {
|
||||
createComponent({
|
||||
runner: {
|
||||
contactedAt: null,
|
||||
|
@ -71,9 +57,9 @@ describe('RunnerTypeBadge', () => {
|
|||
},
|
||||
});
|
||||
|
||||
expect(wrapper.text()).toBe('not connected');
|
||||
expect(wrapper.text()).toBe('never contacted');
|
||||
expect(findBadge().props('variant')).toBe('muted');
|
||||
expect(getTooltip().value).toMatch('This runner has never connected');
|
||||
expect(getTooltip().value).toMatch('This runner has never contacted');
|
||||
});
|
||||
|
||||
it('renders offline state', () => {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { RUNNER_PAGE_SIZE } from '~/runner/constants';
|
||||
import {
|
||||
searchValidator,
|
||||
updateOutdatedUrl,
|
||||
fromUrlQueryToSearch,
|
||||
fromSearchToUrl,
|
||||
fromSearchToVariables,
|
||||
|
@ -190,6 +191,23 @@ describe('search_params.js', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('updateOutdatedUrl', () => {
|
||||
it('returns null for urls that do not need updating', () => {
|
||||
expect(updateOutdatedUrl('http://test.host/')).toBe(null);
|
||||
expect(updateOutdatedUrl('http://test.host/?a=b')).toBe(null);
|
||||
});
|
||||
|
||||
it('returns updated url for updating NOT_CONNECTED to NEVER_CONTACTED', () => {
|
||||
expect(updateOutdatedUrl('http://test.host/admin/runners?status[]=NOT_CONNECTED')).toBe(
|
||||
'http://test.host/admin/runners?status[]=NEVER_CONTACTED',
|
||||
);
|
||||
|
||||
expect(updateOutdatedUrl('http://test.host/admin/runners?status[]=NOT_CONNECTED&a=b')).toBe(
|
||||
'http://test.host/admin/runners?status[]=NEVER_CONTACTED&a=b',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('fromUrlQueryToSearch', () => {
|
||||
examples.forEach(({ name, urlQuery, search }) => {
|
||||
it(`Converts ${name} to a search object`, () => {
|
||||
|
|
|
@ -12,7 +12,7 @@ RSpec.describe Ci::RunnersHelper do
|
|||
describe '#runner_status_icon', :clean_gitlab_redis_cache do
|
||||
it "returns - not contacted yet" do
|
||||
runner = create(:ci_runner)
|
||||
expect(helper.runner_status_icon(runner)).to include("not connected yet")
|
||||
expect(helper.runner_status_icon(runner)).to include("not contacted yet")
|
||||
end
|
||||
|
||||
it "returns offline text" do
|
||||
|
|
Loading…
Reference in New Issue