Skip to content
Snippets Groups Projects
Commit 134fe182 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 6a7cc8c1
No related branches found
No related tags found
No related merge requests found
Showing
with 135 additions and 92 deletions
Loading
Loading
@@ -5,9 +5,11 @@ import initNotes from '~/init_notes';
import snippetEmbed from '~/snippet/snippet_embed';
 
document.addEventListener('DOMContentLoaded', () => {
new LineHighlighter(); // eslint-disable-line no-new
new BlobViewer(); // eslint-disable-line no-new
initNotes();
new ZenMode(); // eslint-disable-line no-new
snippetEmbed();
if (!gon.features.snippetsVue) {
new LineHighlighter(); // eslint-disable-line no-new
new BlobViewer(); // eslint-disable-line no-new
initNotes();
new ZenMode(); // eslint-disable-line no-new
snippetEmbed();
}
});
/*
* These styles are specific to the gl-toast component.
* Documentation: https://design.gitlab.com/components/toasts
* Note: Styles below are nested in order to override some of vue-toasted's default styling
*/
.toasted-container {
max-width: $toast-max-width;
@include media-breakpoint-down(xs) {
width: 100%;
padding-right: $toast-padding-right;
}
.toasted.gl-toast {
border-radius: $border-radius-default;
font-size: $gl-font-size;
padding: $gl-padding-8 $gl-padding $gl-padding-8 $gl-padding-24;
margin-top: $toast-default-margin;
line-height: $gl-line-height;
background-color: rgba($gray-900, $toast-background-opacity);
span {
padding-right: $gl-padding-8;
}
@include media-breakpoint-down(xs) {
.action:first-of-type {
// Ensures actions buttons are right aligned on mobile
margin-left: auto;
}
}
.action {
color: $blue-300;
margin: 0 0 0 $toast-default-margin;
text-transform: none;
font-size: $gl-font-size;
}
.toast-close {
font-size: $default-icon-size;
margin-left: $toast-default-margin;
}
}
}
// Overrides the default positioning of toasts
body .toasted-container.bottom-left {
bottom: $toast-offset;
left: $toast-offset;
}
Loading
Loading
@@ -528,16 +528,6 @@ $pagination-padding-x: 16px;
$pagination-line-height: 20px;
$pagination-disabled-color: #cdcdcd;
 
/*
* Toasts
*/
$toast-offset: 24px;
$toast-height: 48px;
$toast-max-width: 586px;
$toast-padding-right: 42px;
$toast-default-margin: 8px;
$toast-background-opacity: 0.95;
/*
* Status icons
*/
Loading
Loading
Loading
Loading
@@ -83,12 +83,14 @@ class Projects::PipelineSchedulesController < Projects::ApplicationController
def play_rate_limit
return unless current_user
 
limiter = ::Gitlab::ActionRateLimiter.new(action: :play_pipeline_schedule)
return unless limiter.throttled?([current_user, schedule], 1)
if rate_limiter.throttled?(:play_pipeline_schedule, scope: [current_user, schedule])
flash[:alert] = _('You cannot play this scheduled pipeline at the moment. Please wait a minute.')
redirect_to pipeline_schedules_path(@project)
end
end
 
flash[:alert] = _('You cannot play this scheduled pipeline at the moment. Please wait a minute.')
redirect_to pipeline_schedules_path(@project)
def rate_limiter
::Gitlab::ApplicationRateLimiter
end
 
def schedule
Loading
Loading
Loading
Loading
@@ -19,14 +19,16 @@ class Projects::RawController < Projects::ApplicationController
private
 
def show_rate_limit
limiter = ::Gitlab::ActionRateLimiter.new(action: :show_raw_controller)
if rate_limiter.throttled?(:show_raw_controller, scope: [@project, @commit, @path], threshold: raw_blob_request_limit)
rate_limiter.log_request(request, :raw_blob_request_limit, current_user)
 
return unless limiter.throttled?([@project, @commit, @path], raw_blob_request_limit)
limiter.log_request(request, :raw_blob_request_limit, current_user)
flash[:alert] = _('You cannot access the raw file. Please wait a minute.')
redirect_to project_blob_path(@project, File.join(@ref, @path)), status: :too_many_requests
end
end
 
flash[:alert] = _('You cannot access the raw file. Please wait a minute.')
redirect_to project_blob_path(@project, File.join(@ref, @path)), status: :too_many_requests
def rate_limiter
::Gitlab::ApplicationRateLimiter
end
 
def raw_blob_request_limit
Loading
Loading
Loading
Loading
@@ -32,6 +32,9 @@ class ProjectsController < Projects::ApplicationController
before_action :authorize_archive_project!, only: [:archive, :unarchive]
before_action :event_filter, only: [:show, :activity]
 
# Project Export Rate Limit
before_action :export_rate_limit, only: [:export, :download_export, :generate_new_export]
layout :determine_layout
 
def index
Loading
Loading
@@ -465,6 +468,21 @@ class ProjectsController < Projects::ApplicationController
def present_project
@project = @project.present(current_user: current_user)
end
def export_rate_limit
prefixed_action = "project_#{params[:action]}".to_sym
if rate_limiter.throttled?(prefixed_action, scope: [current_user, prefixed_action, @project])
rate_limiter.log_request(request, "#{prefixed_action}_request_limit".to_sym, current_user)
flash[:alert] = _('This endpoint has been requested too many times. Try again later.')
redirect_to edit_project_path(@project)
end
end
def rate_limiter
::Gitlab::ApplicationRateLimiter
end
end
 
ProjectsController.prepend_if_ee('EE::ProjectsController')
Loading
Loading
@@ -4,13 +4,16 @@
- breadcrumb_title @snippet.to_reference
- page_title "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets")
 
= render 'shared/snippets/header'
- if Feature.enabled?(:snippets_vue)
#js-snippet-view{ 'data-qa-selector': 'snippet_view' }
- else
= render 'shared/snippets/header'
 
.personal-snippets
%article.file-holder.snippet-file-content
= render 'shared/snippets/blob'
.personal-snippets
%article.file-holder.snippet-file-content
= render 'shared/snippets/blob'
 
.row-content-block.top-block.content-component-block
= render 'award_emoji/awards_block', awardable: @snippet, inline: true
.row-content-block.top-block.content-component-block
= render 'award_emoji/awards_block', awardable: @snippet, inline: true
 
#notes.limited-width-notes= render "shared/notes/notes_with_form", :autocomplete => false
#notes.limited-width-notes= render "shared/notes/notes_with_form", :autocomplete => false
---
title: Add Project Export request/download rate limits
merge_request: 20962
author:
type: other
---
title: Remove redundant toast.scss file and variables
merge_request: 21105
author:
type: fixed
Loading
Loading
@@ -288,6 +288,12 @@ The PgBouncer exporter allows you to measure various PgBouncer metrics.
 
[➔ Read more about the PgBouncer exporter.](pgbouncer_exporter.md)
 
### Registry exporter
The Registry exporter allows you to measure various Registry metrics.
[➔ Read more about the Registry exporter.](registry_exporter.md)
### GitLab exporter
 
The GitLab exporter allows you to measure various GitLab metrics, pulled from Redis and the database.
Loading
Loading
Loading
Loading
@@ -8,20 +8,54 @@ The [postgres exporter] allows you to measure various PostgreSQL metrics.
 
To enable the postgres exporter:
 
1. [Enable Prometheus](index.md#configuring-prometheus)
1. Edit `/etc/gitlab/gitlab.rb`
1. Add or find and uncomment the following line, making sure it's set to `true`:
1. [Enable Prometheus](index.md#configuring-prometheus).
1. Edit `/etc/gitlab/gitlab.rb` and enable `postgres_exporter`:
 
```ruby
postgres_exporter['enable'] = true
```
 
NOTE: **Note:**
If PostgreSQL is configured on a separate node, make sure that the local
address is [listed in `trust_auth_cidr_addresses`](../../high_availability/database.md#network-information) or the
exporter will not be able to connect to the database.
1. Save the file and [reconfigure GitLab][reconfigure] for the changes to
take effect
take effect.
 
Prometheus will now automatically begin collecting performance data from
the postgres exporter exposed under `localhost:9187`.
 
## Advanced configuration
In most cases, Postgres exporter will work with the defaults and you should not
need to change anything.
The following configuration options can be used to further customize the
Postgres exporter:
1. Edit `/etc/gitlab/gitlab.rb`:
```ruby
postgres_exporter['dbname'] = 'pgbouncer' # The name of the database to connect to.
postgres_exporter['user'] = 'gitlab-psql' # The user to sign in as.
postgres_exporter['password'] = '' # The user's password.
postgres_exporter['host'] = 'localhost' # The host to connect to. Values that start with '/' are for unix domain sockets (default is 'localhost').
postgres_exporter['port'] = 5432 # The port to bind to (default is '5432').
postgres_exporter['sslmode'] = 'require' # Whether or not to use SSL. Valid options are:
# 'disable' (no SSL),
# 'require' (always use SSL and skip verification, this is the default value),
# 'verify-ca' (always use SSL and verify that the certificate presented by the server was signed by a trusted CA),
# 'verify-full' (always use SSL and verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate).
postgres_exporter['fallback_application_name'] = '' # An application_name to fall back to if one isn't provided.
postgres_exporter['connect_timeout'] = '' # Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely.
postgres_exporter['sslcert'] = 'ssl.crt' # Cert file location. The file must contain PEM encoded data.
postgres_exporter['sslkey'] = 'ssl.key' # Key file location. The file must contain PEM encoded data.
postgres_exporter['sslrootcert'] = 'ssl-root.crt' # The location of the root certificate file. The file must contain PEM encoded data.
```
1. Save the file and [reconfigure GitLab][reconfigure] for the changes to take effect.
[← Back to the main Prometheus page](index.md)
 
[1131]: https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/1131
Loading
Loading
# Registry exporter
> [Introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/2884) in GitLab 11.9.
The Registry exporter allows you to measure various Registry metrics.
To enable it:
1. [Enable Prometheus](index.md#configuring-prometheus).
1. Edit `/etc/gitlab/gitlab.rb` and enable [debug mode](https://docs.docker.com/registry/#debug) for the Registry:
```ruby
registry['debug_addr'] = "localhost:5001" # localhost:5001/metrics
```
1. Save the file and [reconfigure GitLab](../../restart_gitlab.md#omnibus-gitlab-reconfigure)
for the changes to take effect.
Prometheus will now automatically begin collecting performance data from
the registry exporter exposed under `localhost:5001/metrics`.
[← Back to the main Prometheus page](index.md)
Loading
Loading
@@ -129,3 +129,9 @@ In the rails console (`rails c`), enter the following command to enable your fea
```ruby
Feature.enable(:feature_flag_name)
```
Similarly, the following command will disable a feature flag:
```ruby
Feature.disable(:feature_flag_name)
```
Loading
Loading
@@ -71,7 +71,7 @@ Once you're on the dashboard, at the top you should see a series of filters for:
- Report type
- Project
 
To the right of the filters, you should see a **Hide dismissed** toggle button ([available for GitLab.com Gold, planned for GitLab Ultimate 12.6](https://gitlab.com/gitlab-org/gitlab/issues/9102)).
To the right of the filters, you should see a **Hide dismissed** toggle button.
 
NOTE: **Note:**
The dashboard only shows projects with [security reports](#supported-reports) enabled in a group.
Loading
Loading
Loading
Loading
@@ -107,6 +107,8 @@ installed. Instances provide 1 vCPU and 25GB of HDD disk space. The default
region of the VMs is US East1.
Each instance is used only for one job, this ensures any sensitive data left on the system can't be accessed by other people their CI jobs.
 
The `gitlab-shared-runners-manager-X.gitlab.com` fleet of Runners are dedicated for GitLab projects as well as community forks of them. They use a slightly larger machine type (n1-standard-2) and have a bigger SSD disk size. They will not run untagged jobs and unlike the general fleet of shared Runners, the instances are re-used up to 40 times.
Jobs handled by the shared Runners on GitLab.com (`shared-runners-manager-X.gitlab.com`),
**will be timed out after 3 hours**, regardless of the timeout configured in a
project. Check the issues [4010] and [4070] for the reference.
Loading
Loading
Loading
Loading
@@ -144,7 +144,6 @@ project or branch name. Special characters can include:
 
- Leading underscore
- Trailing hyphen/dash
- Double hyphen/dash
 
To get around this, you can [change the group path](../../group/index.md#changing-a-groups-path),
[change the project path](../../project/settings/index.md#renaming-a-repository) or change the branch
Loading
Loading
doc/user/packages/maven_repository/img/maven_package_view.png

15.7 KiB

doc/user/packages/maven_repository/img/maven_package_view_v12_6.png

82 KiB

Loading
Loading
@@ -5,7 +5,7 @@
With the GitLab [Maven](https://maven.apache.org) Repository, every
project can have its own space to store its Maven artifacts.
 
![GitLab Maven Repository](img/maven_package_view.png)
![GitLab Maven Repository](img/maven_package_view_v12_6.png)
 
## Enabling the Maven Repository
 
Loading
Loading
doc/user/packages/npm_registry/img/npm_package_view.png

10.1 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment