Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-07-07 06:09:06 +00:00
parent 4d8bd36aa2
commit cceb99c072
53 changed files with 425 additions and 112 deletions

View File

@ -119,16 +119,12 @@ class List {
}
moveMultipleIssues({ issues, oldIndicies, newIndex, moveBeforeId, moveAfterId }) {
oldIndicies.reverse().forEach(index => {
this.issues.splice(index, 1);
});
this.issues.splice(newIndex, 0, ...issues);
boardsStore
.moveMultipleIssues({
ids: issues.map(issue => issue.id),
fromListId: null,
toListId: null,
.moveListMultipleIssues({
list: this,
issues,
oldIndicies,
newIndex,
moveBeforeId,
moveAfterId,
})
@ -170,12 +166,7 @@ class List {
}
onNewIssueResponse(issue, data) {
issue.refreshData(data);
if (this.issuesSize > 1) {
const moveBeforeId = this.issues[1].id;
boardsStore.moveIssue(issue.id, null, null, null, moveBeforeId);
}
boardsStore.onNewListIssueResponse(this, issue, data);
}
}

View File

@ -296,6 +296,15 @@ const boardsStore = {
Object.assign(this.moving, { list, issue });
},
onNewListIssueResponse(list, issue, data) {
issue.refreshData(data);
if (list.issuesSize > 1) {
const moveBeforeId = list.issues[1].id;
this.moveIssue(issue.id, null, null, null, moveBeforeId);
}
},
moveMultipleIssuesToList({ listFrom, listTo, issues, newIndex }) {
const issueTo = issues.map(issue => listTo.findIssue(issue.id));
const issueLists = issues.map(issue => issue.getLists()).flat();
@ -675,6 +684,21 @@ const boardsStore = {
});
},
moveListMultipleIssues({ list, issues, oldIndicies, newIndex, moveBeforeId, moveAfterId }) {
oldIndicies.reverse().forEach(index => {
list.issues.splice(index, 1);
});
list.issues.splice(newIndex, 0, ...issues);
return this.moveMultipleIssues({
ids: issues.map(issue => issue.id),
fromListId: null,
toListId: null,
moveBeforeId,
moveAfterId,
});
},
newIssue(id, issue) {
return axios.post(this.generateIssuesPath(id), {
issue,

View File

@ -64,7 +64,12 @@ export default {
<template>
<list-item v-bind="$attrs" :selected="selected">
<template #left-action>
<gl-form-checkbox class="gl-m-0" :checked="selected" @change="$emit('select')" />
<gl-form-checkbox
v-if="Boolean(tag.destroy_path)"
class="gl-m-0"
:checked="selected"
@change="$emit('select')"
/>
</template>
<template #left-primary>
<div class="gl-display-flex gl-align-items-center">

View File

@ -12,6 +12,7 @@ import {
} from './constants';
import {
registerHTMLToMarkdownRenderer,
addCustomEventListener,
removeCustomEventListener,
addImage,
@ -87,6 +88,7 @@ export default {
onLoad(editorApi) {
this.editorApi = editorApi;
registerHTMLToMarkdownRenderer(editorApi);
addCustomEventListener(
this.editorApi,
CUSTOM_EVENTS.openAddImageModal,

View File

@ -0,0 +1,12 @@
const buildHTMLToMarkdownRender = baseRenderer => {
return {
TEXT_NODE(node) {
return baseRenderer.getSpaceControlled(
baseRenderer.trim(baseRenderer.getSpaceCollapsedText(node.nodeValue)),
node,
);
},
};
};
export default buildHTMLToMarkdownRender;

View File

@ -1,5 +1,6 @@
import Vue from 'vue';
import ToolbarItem from '../toolbar_item.vue';
import buildHtmlToMarkdownRenderer from './build_html_to_markdown_renderer';
const buildWrapper = propsData => {
const instance = new Vue({
@ -40,3 +41,16 @@ export const removeCustomEventListener = (editorApi, event, handler) =>
export const addImage = ({ editor }, image) => editor.exec('AddImage', image);
export const getMarkdown = editorInstance => editorInstance.invoke('getMarkdown');
/**
* This function allow us to extend Toast UI HTML to Markdown renderer. It is
* a temporary measure because Toast UI does not provide an API
* to achieve this goal.
*/
export const registerHTMLToMarkdownRenderer = editorApi => {
const { renderer } = editorApi.toMarkOptions;
Object.assign(editorApi.toMarkOptions, {
renderer: renderer.constructor.factory(renderer, buildHtmlToMarkdownRenderer(renderer)),
});
};

View File

@ -2,6 +2,7 @@
class Clusters::ClustersController < Clusters::BaseController
include RoutableActions
include Metrics::Dashboard::PrometheusApiProxy
before_action :cluster, only: [:cluster_status, :show, :update, :destroy, :clear_cache]
before_action :generate_gcp_authorize_url, only: [:new]
@ -290,6 +291,29 @@ class Clusters::ClustersController < Clusters::BaseController
@gcp_cluster = cluster.present(current_user: current_user)
end
def proxyable
cluster.cluster
end
# During first iteration of dashboard variables implementation
# cluster health case was omitted. Existing service for now is tied to
# environment, which is not always present for cluster health dashboard.
# It is planned to break coupling to environment https://gitlab.com/gitlab-org/gitlab/-/issues/213833.
# It is also planned to move cluster health to metrics dashboard section https://gitlab.com/gitlab-org/gitlab/-/issues/220214
# but for now I've used dummy class to stub variable substitution service, as there are no variables
# in cluster health dashboard
def proxy_variable_substitution_service
@empty_service ||= Class.new(BaseService) do
def initialize(proxyable, params)
@proxyable, @params = proxyable, params
end
def execute
success(params: @params)
end
end
end
def user_cluster
cluster = Clusters::BuildService.new(clusterable.subject).execute
cluster.build_platform_kubernetes

View File

@ -103,6 +103,7 @@ class GroupPolicy < BasePolicy
enable :admin_list
enable :admin_issue
enable :read_metrics_dashboard_annotation
enable :read_prometheus
end
rule { maintainer }.policy do

View File

@ -26,7 +26,7 @@ module Projects
message: 'Project housekeeping failed',
project_full_path: @project.full_path,
project_id: @project.id,
error: e.message
'error.message' => e.message
)
end

View File

@ -0,0 +1,5 @@
---
title: Remove moveMultipleIssues logic from issue model
merge_request: 32243
author: nuwe1
type: other

View File

@ -0,0 +1,5 @@
---
title: Remove onNewIssueResponse logic from list model
merge_request: 32245
author: nuwe1
type: other

View File

@ -0,0 +1,5 @@
---
title: Update cluster-applications to 0.23.0
merge_request: 35691
author:
type: added

View File

@ -0,0 +1,5 @@
---
title: Fix incorrect text escaping in the Static Site Editor
merge_request: 35671
author:
type: fixed

View File

@ -0,0 +1,4 @@
title: Conditionally render Docker row checkbox
merge_request: 36000
author: gfyoung
type: fixed

View File

@ -0,0 +1,5 @@
---
title: Use error.message instead of error in importer.log
merge_request: 36104
author:
type: fixed

View File

@ -190,7 +190,6 @@ Rails.application.routes.draw do
Gitlab.ee do
get :metrics, format: :json
get :metrics_dashboard
get :'/prometheus/api/v1/*proxy_path', to: 'clusters#prometheus_proxy', as: :prometheus_api
get :environments, format: :json
end
@ -200,6 +199,7 @@ Rails.application.routes.draw do
delete '/:application', to: 'clusters/applications#destroy', as: :uninstall_applications
end
get :'/prometheus/api/v1/*proxy_path', to: 'clusters#prometheus_proxy', as: :prometheus_api
get :cluster_status, format: :json
delete :clear_cache
end

View File

@ -46,7 +46,9 @@ exceptions:
- NFS
- NGINX
- NOTE
- NPM
- ONLY
- PDF
- PGP
- PHP
- POST
@ -63,6 +65,7 @@ exceptions:
- SSH
- SSL
- SSO
- SVN
- TCP
- TIP
- TLS

View File

@ -225,6 +225,7 @@ LDAP
ldapsearch
Leiningen
Libravatar
liveness
Lograge
Logstash
lookahead

View File

@ -11,7 +11,7 @@ description: 'Learn how to use and administer GitLab, the most scalable Git-base
# GitLab Docs
Welcome to [GitLab](https://about.gitlab.com/) Documentation.
Welcome to [GitLab](https://about.gitlab.com/) documentation.
Here you can access the complete documentation for GitLab, the single application for the
[entire DevOps lifecycle](#the-entire-devops-lifecycle).
@ -20,30 +20,32 @@ Here you can access the complete documentation for GitLab, the single applicatio
No matter how you use GitLab, we have documentation for you.
| Essential Documentation | Essential Documentation |
|:-------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------|
| [**User Documentation**](user/index.md)<br/>Discover features and concepts for GitLab users. | [**Administrator documentation**](administration/index.md)<br/>Everything GitLab self-managed administrators need to know. |
| [**Contributing to GitLab**](#contributing-to-gitlab)<br/>At GitLab, everyone can contribute! | [**New to Git and GitLab?**](#new-to-git-and-gitlab)<br/>We have the resources to get you started. |
| [**Building an integration with GitLab?**](#building-an-integration-with-gitlab)<br/>Consult our automation and integration documentation. | [**Coming to GitLab from another platform?**](#coming-to-gitlab-from-another-platform)<br/>Consult our handy guides. |
| [**Install GitLab**](https://about.gitlab.com/install/)<br/>Installation options for different platforms. | [**Customers**](subscriptions/index.md)<br/>Information for new and existing customers. |
| [**Update GitLab**](update/README.md)<br/>Update your GitLab self-managed instance to the latest version. | [**Reference Architectures**](administration/reference_architectures/index.md)<br/>GitLab's reference architectures |
| [**GitLab Releases**](https://about.gitlab.com/releases/)<br/>What's new in GitLab. | |
| Essential documentation | Essential documentation |
|:-------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------|
| [**User Documentation**](user/index.md)<br/>Discover features and concepts for GitLab users. | [**Administrator documentation**](administration/index.md)<br/>Everything GitLab self-managed administrators need to know. |
| [**Contributing to GitLab**](#contributing-to-gitlab)<br/>At GitLab, everyone can contribute! | [**New to Git and GitLab?**](#new-to-git-and-gitlab)<br/>We have the resources to get you started. |
| [**Build an integration with GitLab?**](#build-an-integration-with-gitlab)<br/>Consult our automation and integration documentation. | [**Coming to GitLab from another platform?**](#coming-to-gitlab-from-another-platform)<br/>Consult our handy guides. |
| [**Install GitLab**](https://about.gitlab.com/install/)<br/>Installation options for different platforms. | [**Customers**](subscriptions/index.md)<br/>Information for new and existing customers. |
| [**Update GitLab**](update/README.md)<br/>Update your GitLab self-managed instance to the latest version. | [**Reference Architectures**](administration/reference_architectures/index.md)<br/>GitLab's reference architectures |
| [**GitLab Releases**](https://about.gitlab.com/releases/)<br/>What's new in GitLab. | |
## Popular Documentation
## Popular topics
Have a look at some of our most popular documentation resources:
Have a look at some of our most popular topics:
| Popular Topic | Description |
|:----------------------------------------------------------------|:-----------------------------------------------------------------|
| [Configuring `.gitlab-ci.yml`](ci/yaml/README.md) | Complete syntax documentation for configuring your CI pipelines. |
| [GitLab CI/CD examples](ci/examples/README.md) | Get up to speed quickly with common CI/CD scenarios. |
| [GitLab Container Registry](user/packages/container_registry/index.md) | Host Docker images within GitLab. |
| [GitLab Pages](user/project/pages/index.md) | Host static websites for your projects with GitLab. |
| [GitLab.com settings](user/gitlab_com/index.md) | Settings for GitLab.com. |
| [Kubernetes integration](user/project/clusters/index.md) | Use GitLab with Kubernetes. |
| [SSH authentication](ssh/README.md) | Secure your network communications. |
| [Using Docker images](ci/docker/using_docker_images.md) | Build and test your applications with Docker. |
| [GraphQL](api/graphql/index.md) | Explore GitLab's GraphQL API. |
| Popular topic | Description |
|:-----------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------|
| [Two-factor authentication](user/profile/account/two_factor_authentication.md) | Improve the security of your GitLab account. |
| [GitLab groups](user/group/index.md) | Manage projects together. |
| [GitLab CI/CD pipeline configuration reference](ci/yaml/README.md) | Available configuration options for `.gitlab-ci.yml` files. |
| [Activate GitLab EE with a license](user/admin_area/license.md) **(STARTER ONLY)** | Activate GitLab Enterprise Edition functionality with a license. |
| [Back up and restore GitLab](raketasks/backup_restore.md) **(CORE ONLY)** | Rake tasks for backing up and restoring GitLab self-managed instances. |
| [GitLab release and maintenance policy](policy/maintenance.md) | Policies for version naming and cadence, and also upgrade recommendations. |
| [Elasticsearch integration](integration/elasticsearch.md) **(STARTER ONLY)** | Integrate Elasticsearch with GitLab to enable advanced searching. |
| [Omnibus GitLab database settings](https://docs.gitlab.com/omnibus/settings/database.html) **(CORE ONLY)** | Database settings for Omnibus GitLab self-managed instances. |
| [Omnibus GitLab NGINX settings](https://docs.gitlab.com/omnibus/settings/nginx.html) **(CORE ONLY)** | NGINX settings for Omnibus GitLab self-managed instances. |
| [Omnibus GitLab SSL configuration](https://docs.gitlab.com/omnibus/settings/ssl.html) **(CORE ONLY)** | SSL settings for Omnibus GitLab self-managed instances. |
| [GitLab.com settings](user/gitlab_com/index.md) | Settings used for GitLab.com. |
## The entire DevOps Lifecycle
@ -62,7 +64,7 @@ than ever.
The following sections provide links to documentation for each DevOps stage:
| DevOps Stage | Documentation for |
| DevOps stage | Documentation for |
|:------------------------|:------------------------------------------------------------|
| [Manage](#manage) | Statistics and analytics features. |
| [Plan](#plan) | Project planning and management features. |
@ -86,7 +88,7 @@ GitLab provides statistics and insight into ways you can maximize the value of G
The following documentation relates to the DevOps **Manage** stage:
| Manage Topics | Description |
| Manage topics | Description |
|:--------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Authentication and<br/>Authorization](administration/auth/README.md) **(CORE ONLY)** | Supported authentication and authorization providers. |
| [GitLab Value Stream Analytics](user/project/cycle_analytics.md) | Measure the time it takes to go from an [idea to production](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/#from-idea-to-production-with-gitlab) for each project you have. |
@ -107,7 +109,7 @@ management tools.
The following documentation relates to the DevOps **Plan** stage:
| Plan Topics | Description |
| Plan topics | Description |
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------|
| [Burndown Charts](user/project/milestones/burndown_charts.md) **(STARTER)** | Watch your project's progress throughout a specific milestone. |
| [Discussions](user/discussions/index.md) | Threads, comments, and resolvable threads in issues, commits, and merge requests. |
@ -144,7 +146,7 @@ The following documentation relates to the DevOps **Create** stage:
#### Projects and Groups
| Create Topics - Projects and Groups | Description |
| Create topics - Projects and Groups | Description |
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|
| [Advanced global search](user/search/advanced_global_search.md) **(STARTER)** | Leverage Elasticsearch for faster, more advanced code search across your entire GitLab instance. |
| [Advanced syntax search](user/search/advanced_search_syntax.md) **(STARTER)** | Use advanced queries for more targeted search results. |
@ -169,7 +171,7 @@ The following documentation relates to the DevOps **Create** stage:
#### Repositories
| Create Topics - Repositories | Description |
| Create topics - Repositories | Description |
|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|
| [Branches](user/project/repository/branches/index.md) and the [default branch](user/project/repository/branches/index.md#default-branch) | How to use branches in GitLab. |
| [Commits](user/project/repository/index.md#commits) and [signing commits](user/project/repository/gpg_signed_commits/index.md) | Work with commits, and use GPG to sign your commits. |
@ -192,7 +194,7 @@ The following documentation relates to the DevOps **Create** stage:
#### Merge Requests
| Create Topics - Merge Requests | Description |
| Create topics - Merge Requests | Description |
|:--------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
| [Checking out merge requests locally](user/project/merge_requests/reviewing_and_managing_merge_requests.md#checkout-merge-requests-locally) | Tips for working with merge requests locally. |
| [Cherry-picking](user/project/merge_requests/cherry_pick_changes.md) | Use GitLab for cherry-picking changes. |
@ -208,7 +210,7 @@ The following documentation relates to the DevOps **Create** stage:
#### Integration and Automation
| Create Topics - Integration and Automation | Description |
| Create topics - Integration and Automation | Description |
|:------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------|
| [GitLab API](api/README.md) | Integrate GitLab via a simple and powerful API. |
| [GitLab Integration](integration/README.md) | Integrate with multiple third-party services with GitLab to allow external issue trackers and external authentication. |
@ -235,7 +237,7 @@ scales to run your tests faster.
The following documentation relates to the DevOps **Verify** stage:
| Verify Topics | Description |
| Verify topics | Description |
|:----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------|
| [Code Quality reports](user/project/merge_requests/code_quality.md) **(STARTER)** | Analyze source code quality. |
| [GitLab CI/CD](ci/README.md) | Explore the features and capabilities of Continuous Integration with GitLab. |
@ -258,7 +260,7 @@ packages, which can be easily consumed as a dependency in downstream projects.
The following documentation relates to the DevOps **Package** stage:
| Package Topics | Description |
| Package topics | Description |
|:----------------------------------------------------------------|:-------------------------------------------------------|
| [Container Registry](user/packages/container_registry/index.md) | The GitLab Container Registry enables every project in GitLab to have its own space to store [Docker](https://www.docker.com/) images. |
| [Dependency Proxy](user/packages/dependency_proxy/index.md) **(PREMIUM)** | The GitLab Dependency Proxy sets up a local proxy for frequently used upstream images/packages. |
@ -280,7 +282,7 @@ confidently and securely with GitLabs built-in Continuous Delivery and Deploy
The following documentation relates to the DevOps **Release** stage:
| Release Topics | Description |
| Release topics | Description |
|:------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------|
| [Auto Deploy](topics/autodevops/stages.md#auto-deploy) | Configure GitLab for the deployment of your application. |
| [Canary Deployments](user/project/canary_deployments.md) **(PREMIUM)** | Employ a popular CI strategy where a small portion of the fleet is updated to the new version first. |
@ -306,7 +308,7 @@ configuration. Then customize everything from buildpacks to CI/CD.
The following documentation relates to the DevOps **Configure** stage:
| Configure Topics | Description |
| Configure topics | Description |
|:-----------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------|
| [Auto DevOps](topics/autodevops/index.md) | Automatically employ a complete DevOps lifecycle. |
| [Create Kubernetes clusters](user/project/clusters/add_remove_clusters.md#create-new-cluster) | Use Kubernetes and GitLab. |
@ -335,7 +337,7 @@ instant how code changes impact your production environment.
The following documentation relates to the DevOps **Monitor** stage:
| Monitor Topics | Description |
| Monitor topics | Description |
|:------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------|
| [GitLab Performance Monitoring](administration/monitoring/performance/index.md) **(CORE ONLY)** | Use Prometheus and Grafana to monitor the performance of your GitLab instance. |
| [GitLab Prometheus](administration/monitoring/prometheus/index.md) **(CORE ONLY)** | Configure the bundled Prometheus to collect various metrics from your GitLab instance. |
@ -360,7 +362,7 @@ high-level view on projects and groups, and start remediation processes when nee
The following documentation relates to the DevOps **Secure** stage:
| Secure Topics | Description |
| Secure topics | Description |
|:------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------|
| [Compliance Dashboard](user/compliance/compliance_dashboard/index.md) **(ULTIMATE)** | View the most recent Merge Request activity in a group. |
| [Container Scanning](user/application_security/container_scanning/index.md) **(ULTIMATE)** | Use Clair to scan Docker images for known vulnerabilities. |
@ -442,7 +444,7 @@ If you are coming to GitLab from another platform, you'll find the following inf
</a>
</div>
## Building an integration with GitLab
## Build an integration with GitLab
There are many ways to integrate with GitLab, including:

View File

@ -5,7 +5,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
type: reference
---
# GitLab CI/CD Pipeline Configuration Reference
# GitLab CI/CD pipeline configuration reference
GitLab CI/CD [pipelines](../pipelines/index.md) are configured using a YAML file called `.gitlab-ci.yml` within each project.

View File

@ -2,7 +2,7 @@
type: concepts
---
# GitLab Release and Maintenance Policy
# GitLab release and maintenance policy
GitLab has strict policies governing version naming, as well as release pace for major, minor,
patch, and security releases. New releases are usually announced on the [GitLab blog](https://about.gitlab.com/releases/categories/releases/).

View File

@ -1,4 +1,4 @@
# Backing up and restoring GitLab **(CORE ONLY)**
# Back up and restore GitLab **(CORE ONLY)**
GitLab provides Rake tasks for backing up and restoring GitLab instances.

View File

@ -5,7 +5,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
type: howto
---
# Activate all GitLab Enterprise Edition functionality with a license **(STARTER ONLY)**
# Activate GitLab EE with a license **(STARTER ONLY)**
To activate all GitLab Enterprise Edition (EE) functionality, you need to upload
a license. Once you've received your license from GitLab Inc., you can upload it

View File

@ -58,12 +58,15 @@ prerequisites:
If you're using custom Helm values for Cilium, you must enable Hubble
with flow metrics for each namespace by adding the following lines to
your [Hubble values](../../clusters/applications.md#install-cilium-using-gitlab-cicd):
your [Cilium values](../../clusters/applications.md#install-cilium-using-gitlab-cicd):
```yaml
metrics:
enabled:
- 'flow:sourceContext=namespace;destinationContext=namespace'
global:
hubble:
enabled: true
metrics:
enabled:
- 'flow:sourceContext=namespace;destinationContext=namespace'
```
The **Container Network Policy** section displays the following information

View File

@ -988,23 +988,21 @@ Major upgrades might require additional setup steps, please consult
the official [upgrade guide](https://docs.cilium.io/en/stable/install/upgrade/) for more
information.
By default, Cilium will drop all disallowed packets upon policy
deployment. The audit mode is scheduled for release in
[Cilium 1.8](https://github.com/cilium/cilium/pull/9970). In the audit
mode, disallowed packets will not be dropped, and audit
notifications will be generated instead. GitLab provides alternative Docker
images for Cilium with the audit patch included. You can switch to the
custom build and enable the audit mode by adding the following to
By default, Cilium drops all disallowed packets upon policy
deployment. In
[auditmode](https://docs.cilium.io/en/v1.8/gettingstarted/policy-creation/?highlight=policy-audit#enable-policy-audit-mode),
however, Cilium doesn't drop disallowed packets. You can use
`policy-verdict` log to observe policy-related decisions. You can
enable audit mode by adding the following to
`.gitlab/managed-apps/cilium/values.yaml`:
```yaml
global:
registry: registry.gitlab.com/gitlab-org/defend/cilium
config:
policyAuditMode: true
agent:
monitor:
eventTypes: ["drop", "audit"]
eventTypes: ["drop", "policy-verdict"]
```
The Cilium monitor log for traffic is logged out by the
@ -1026,22 +1024,24 @@ The [Hubble](https://github.com/cilium/hubble) monitoring daemon is
enabled by default and it's set to collect per namespace flow
metrics. This metrics are accessible on the [Threat Monitoring](../application_security/threat_monitoring/index.md)
dashboard. You can disable Hubble by adding the following to
`.gitlab/managed-apps/config.yaml`:
`.gitlab/managed-apps/cilium/values.yaml`:
```yaml
cilium:
installed: true
global:
hubble:
installed: false
enabled: false
```
You can also adjust Helm values for Hubble via
`.gitlab/managed-apps/cilium/hubble-values.yaml`:
`.gitlab/managed-apps/cilium/values.yaml`:
```yaml
metrics:
enabled:
- 'flow:sourceContext=namespace;destinationContext=namespace'
global:
hubble:
enabled: true
metrics:
enabled:
- 'flow:sourceContext=namespace;destinationContext=namespace'
```
NOTE: **Note:**

View File

@ -5,9 +5,9 @@ group: Access
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/#designated-technical-writers
---
# Two-Factor Authentication
# Two-factor authentication
Two-factor Authentication (2FA) provides an additional level of security to your
Two-factor authentication (2FA) provides an additional level of security to your
GitLab account. Once enabled, in addition to supplying your username and
password to login, you'll be prompted for a code generated by your one time password
authenticator. For example, a password manager on one of your devices.
@ -62,7 +62,7 @@ To enable 2FA:
1. Click **Submit**.
If the pin you entered was correct, you'll see a message indicating that
Two-Factor Authentication has been enabled, and you'll be presented with a list
two-factor authentication has been enabled, and you'll be presented with a list
of [recovery codes](#recovery-codes). Make sure you download them and keep them
in a safe place.

View File

@ -1,6 +1,6 @@
apply:
stage: deploy
image: "registry.gitlab.com/gitlab-org/cluster-integration/cluster-applications:v0.20.0"
image: "registry.gitlab.com/gitlab-org/cluster-integration/cluster-applications:v0.23.0"
environment:
name: production
variables:

View File

@ -25172,6 +25172,18 @@ msgstr ""
msgid "User was successfully updated."
msgstr ""
msgid "UserLists|Define a set of users to be used within feature flag strategies"
msgstr ""
msgid "UserLists|There are no users"
msgstr ""
msgid "UserLists|User ID"
msgstr ""
msgid "UserLists|User IDs"
msgstr ""
msgid "UserList|Delete %{name}?"
msgstr ""

View File

@ -3,7 +3,7 @@
require 'airborne'
module QA
context 'Manage with IP rate limits', :requires_admin do
RSpec.describe 'Manage with IP rate limits', :requires_admin do
describe 'Users API' do
let(:api_client) { Runtime::API::Client.new(:gitlab, ip_limits: true) }
let(:request) { Runtime::API::Request.new(api_client, '/users') }

View File

@ -3,7 +3,7 @@
require 'airborne'
module QA
context 'Manage' do
RSpec.describe 'Manage' do
describe 'Users API' do
before(:context) do
@api_client = Runtime::API::Client.new(:gitlab)

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
context 'Configure', :orchestrated, :mattermost do
RSpec.describe 'Configure', :orchestrated, :mattermost do
describe 'Mattermost support' do
it 'user creates a group with a mattermost team' do
Flow::Login.sign_in

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
context 'Manage' do
RSpec.describe 'Manage' do
describe 'Project transfer between groups' do
it 'user transfers a project between groups' do
Flow::Login.sign_in

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
context 'Manage', :smoke do
RSpec.describe 'Manage', :smoke do
describe 'basic user login' do
it 'user logs in using basic credentials and logs out' do
Flow::Login.sign_in

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
context 'Manage', :orchestrated, :ldap_no_tls, :ldap_tls do
RSpec.describe 'Manage', :orchestrated, :ldap_no_tls, :ldap_tls do
describe 'LDAP login' do
it 'user logs into GitLab using LDAP credentials' do
Flow::Login.sign_in

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
context 'Manage', :orchestrated, :mattermost do
RSpec.describe 'Manage', :orchestrated, :mattermost do
describe 'Mattermost login' do
it 'user logs into Mattermost using GitLab OAuth' do
Flow::Login.sign_in

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
context 'Manage', :orchestrated, :instance_saml do
RSpec.describe 'Manage', :orchestrated, :instance_saml do
describe 'Instance wide SAML SSO' do
it 'User logs in to gitlab with SAML SSO' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
shared_examples 'registration and login' do
RSpec.shared_examples 'registration and login' do
it 'user registers and logs in' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
@ -13,13 +13,13 @@ module QA
end
end
context 'Manage', :skip_signup_disabled do
RSpec.describe 'Manage', :skip_signup_disabled do
describe 'standard' do
it_behaves_like 'registration and login'
end
end
context 'Manage', :orchestrated, :ldap_no_tls, :skip_signup_disabled do
RSpec.describe 'Manage', :orchestrated, :ldap_no_tls, :skip_signup_disabled do
describe 'while LDAP is enabled' do
it_behaves_like 'registration and login'
end

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
context 'Manage' do
RSpec.describe 'Manage' do
describe 'Add project member' do
it 'user adds project member' do
Flow::Login.sign_in

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
context 'Manage', :smoke do
RSpec.describe 'Manage', :smoke do
describe 'Project creation' do
it 'user creates a new project' do
Flow::Login.sign_in

View File

@ -3,7 +3,7 @@
require 'nokogiri'
module QA
context 'Manage', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/212145', type: :stale } do
RSpec.describe 'Manage', quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/212145', type: :stale } do
describe 'Check for broken images', :requires_admin do
before(:context) do
admin = QA::Resource::User.new.tap do |user|

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
context 'Manage', :github, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/26952', type: :bug } do
RSpec.describe 'Manage', :github, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/issues/26952', type: :bug } do
describe 'Project import from GitHub' do
let(:imported_project) do
Resource::ProjectImportedFromGithub.fabricate! do |project|

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
context 'Manage' do
RSpec.describe 'Manage' do
describe 'Repository tags' do
let(:project) do
Resource::Project.fabricate_via_api! do |project|

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
context 'Manage' do
RSpec.describe 'Manage' do
describe 'Project activity' do
it 'user creates an event in the activity page upon Git push' do
Flow::Login.sign_in

View File

@ -171,6 +171,29 @@ RSpec.describe Admin::ClustersController do
end
end
describe 'GET #prometheus_proxy' do
let(:user) { admin }
let(:proxyable) do
create(:cluster, :instance, :provided_by_gcp)
end
it_behaves_like 'metrics dashboard prometheus api proxy' do
context 'with anonymous user' do
let(:prometheus_body) { nil }
before do
sign_out(admin)
end
it 'returns 404' do
get :prometheus_proxy, params: prometheus_proxy_params
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
end
describe 'POST #create_gcp' do
let(:legacy_abac_param) { 'true' }
let(:params) do

View File

@ -192,6 +192,35 @@ RSpec.describe Groups::ClustersController do
end
end
describe 'GET #prometheus_proxy' do
let(:proxyable) do
create(:cluster, :provided_by_gcp, cluster_type: :group_type, groups: [group])
end
it_behaves_like 'metrics dashboard prometheus api proxy' do
let(:proxyable_params) do
{
id: proxyable.id.to_s,
group_id: group.name
}
end
context 'with anonymous user' do
let(:prometheus_body) { nil }
before do
sign_out(user)
end
it 'returns 404' do
get :prometheus_proxy, params: prometheus_proxy_params
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
end
describe 'POST create for new cluster' do
let(:legacy_abac_param) { 'true' }
let(:params) do

View File

@ -200,6 +200,36 @@ RSpec.describe Projects::ClustersController do
end
end
describe 'GET #prometheus_proxy' do
let(:proxyable) do
create(:cluster, :provided_by_gcp, projects: [project])
end
it_behaves_like 'metrics dashboard prometheus api proxy' do
let(:proxyable_params) do
{
id: proxyable.id.to_s,
namespace_id: project.namespace.full_path,
project_id: project.name
}
end
context 'with anonymous user' do
let(:prometheus_body) { nil }
before do
sign_out(user)
end
it 'redirects to signin page' do
get :prometheus_proxy, params: prometheus_proxy_params
expect(response).to redirect_to(new_user_session_path)
end
end
end
end
describe 'POST create for new cluster' do
let(:legacy_abac_param) { 'true' }
let(:params) do

View File

@ -54,6 +54,14 @@ describe('tags list row', () => {
expect(findCheckbox().exists()).toBe(true);
});
it("does not exist when the row can't be deleted", () => {
const customTag = { ...tag, destroy_path: '' };
mountComponent({ ...defaultProps, tag: customTag });
expect(findCheckbox().exists()).toBe(false);
});
it('is wired to the selected prop', () => {
mountComponent({ ...defaultProps, selected: true });

View File

@ -2,18 +2,35 @@ import {
generateToolbarItem,
addCustomEventListener,
removeCustomEventListener,
registerHTMLToMarkdownRenderer,
addImage,
getMarkdown,
} from '~/vue_shared/components/rich_content_editor/services/editor_service';
import buildHTMLToMarkdownRenderer from '~/vue_shared/components/rich_content_editor/services/build_html_to_markdown_renderer';
jest.mock('~/vue_shared/components/rich_content_editor/services/build_html_to_markdown_renderer');
describe('Editor Service', () => {
const mockInstance = {
eventManager: { addEventType: jest.fn(), removeEventHandler: jest.fn(), listen: jest.fn() },
editor: { exec: jest.fn() },
invoke: jest.fn(),
};
const event = 'someCustomEvent';
const handler = jest.fn();
let mockInstance;
let event;
let handler;
beforeEach(() => {
mockInstance = {
eventManager: { addEventType: jest.fn(), removeEventHandler: jest.fn(), listen: jest.fn() },
editor: { exec: jest.fn() },
invoke: jest.fn(),
toMarkOptions: {
renderer: {
constructor: {
factory: jest.fn(),
},
},
},
};
event = 'someCustomEvent';
handler = jest.fn();
});
describe('generateToolbarItem', () => {
const config = {
@ -74,4 +91,33 @@ describe('Editor Service', () => {
expect(mockInstance.invoke).toHaveBeenCalledWith('getMarkdown');
});
});
describe('registerHTMLToMarkdownRenderer', () => {
let baseRenderer;
const htmlToMarkdownRenderer = {};
const extendedRenderer = {};
beforeEach(() => {
baseRenderer = mockInstance.toMarkOptions.renderer;
buildHTMLToMarkdownRenderer.mockReturnValueOnce(htmlToMarkdownRenderer);
baseRenderer.constructor.factory.mockReturnValueOnce(extendedRenderer);
registerHTMLToMarkdownRenderer(mockInstance);
});
it('builds a new instance of the HTML to Markdown renderer', () => {
expect(buildHTMLToMarkdownRenderer).toHaveBeenCalledWith(baseRenderer);
});
it('extends base renderer with the HTML to Markdown renderer', () => {
expect(baseRenderer.constructor.factory).toHaveBeenCalledWith(
baseRenderer,
htmlToMarkdownRenderer,
);
});
it('replaces the default renderer with extended renderer', () => {
expect(mockInstance.toMarkOptions.renderer).toBe(extendedRenderer);
});
});
});

View File

@ -13,6 +13,7 @@ import {
addCustomEventListener,
removeCustomEventListener,
addImage,
registerHTMLToMarkdownRenderer,
} from '~/vue_shared/components/rich_content_editor/services/editor_service';
jest.mock('~/vue_shared/components/rich_content_editor/services/editor_service', () => ({
@ -20,6 +21,7 @@ jest.mock('~/vue_shared/components/rich_content_editor/services/editor_service',
addCustomEventListener: jest.fn(),
removeCustomEventListener: jest.fn(),
addImage: jest.fn(),
registerHTMLToMarkdownRenderer: jest.fn(),
}));
describe('Rich Content Editor', () => {
@ -86,16 +88,24 @@ describe('Rich Content Editor', () => {
});
describe('when editor is loaded', () => {
it('adds the CUSTOM_EVENTS.openAddImageModal custom event listener', () => {
const mockEditorApi = { eventManager: { addEventType: jest.fn(), listen: jest.fn() } };
findEditor().vm.$emit('load', mockEditorApi);
let mockEditorApi;
beforeEach(() => {
mockEditorApi = { eventManager: { addEventType: jest.fn(), listen: jest.fn() } };
findEditor().vm.$emit('load', mockEditorApi);
});
it('adds the CUSTOM_EVENTS.openAddImageModal custom event listener', () => {
expect(addCustomEventListener).toHaveBeenCalledWith(
mockEditorApi,
CUSTOM_EVENTS.openAddImageModal,
wrapper.vm.onOpenAddImageModal,
);
});
it('registers HTML to markdown renderer', () => {
expect(registerHTMLToMarkdownRenderer).toHaveBeenCalledWith(mockEditorApi);
});
});
describe('when editor is destroyed', () => {

View File

@ -0,0 +1,24 @@
import buildHTMLToMarkdownRenderer from '~/vue_shared/components/rich_content_editor/services/build_html_to_markdown_renderer';
describe('HTMLToMarkdownRenderer', () => {
let baseRenderer;
let htmlToMarkdownRenderer;
const NODE = { nodeValue: 'mock_node' };
beforeEach(() => {
baseRenderer = {
trim: jest.fn(input => `trimmed ${input}`),
getSpaceCollapsedText: jest.fn(input => `space collapsed ${input}`),
getSpaceControlled: jest.fn(input => `space controlled ${input}`),
};
htmlToMarkdownRenderer = buildHTMLToMarkdownRenderer(baseRenderer);
});
describe('TEXT_NODE visitor', () => {
it('composes getSpaceControlled, getSpaceCollapsedText, and trim services', () => {
expect(htmlToMarkdownRenderer.TEXT_NODE(NODE)).toBe(
`space controlled trimmed space collapsed ${NODE.nodeValue}`,
);
});
});
});

View File

@ -72,6 +72,26 @@ RSpec.describe Projects::AfterImportService do
end
end
context 'when housekeeping service lease is taken' do
let(:exception) { Projects::HousekeepingService::LeaseTaken.new }
it 'logs the error message' do
allow_next_instance_of(Projects::HousekeepingService) do |instance|
expect(instance).to receive(:execute).and_raise(exception)
end
expect(Gitlab::Import::Logger).to receive(:info).with(
{
message: 'Project housekeeping failed',
project_full_path: project.full_path,
project_id: project.id,
'error.message' => exception.to_s
}).and_call_original
subject.execute
end
end
context 'when after import action throw retriable exception one time' do
let(:exception) { GRPC::DeadlineExceeded.new }

View File

@ -18,7 +18,7 @@ RSpec.shared_context 'GroupPolicy context' do
]
end
let(:read_group_permissions) { %i[read_label read_list read_milestone read_board] }
let(:reporter_permissions) { %i[admin_label read_container_image read_metrics_dashboard_annotation] }
let(:reporter_permissions) { %i[admin_label read_container_image read_metrics_dashboard_annotation read_prometheus] }
let(:developer_permissions) { %i[admin_milestone create_metrics_dashboard_annotation delete_metrics_dashboard_annotation update_metrics_dashboard_annotation] }
let(:maintainer_permissions) do
%i[