summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-05 12:07:48 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-05 12:07:48 +0000
commit5a6b36b60502c50ab59c0bc3c345793b70a3d548 (patch)
tree7cf2effbd48359b44970f8f345cfa12ce6843dfd
parenta76d34e6716aa8267111ecdcd21416e9dec3a08d (diff)
downloadgitlab-ce-5a6b36b60502c50ab59c0bc3c345793b70a3d548.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.gitlab/ci/docs.gitlab-ci.yml4
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock4
-rw-r--r--app/assets/javascripts/clusters_list/store/actions.js29
-rw-r--r--config/initializers/9_fast_gettext.rb7
-rw-r--r--config/initializers_before_autoloader/001_fast_gettext.rb8
-rw-r--r--doc/administration/audit_events.md1
-rw-r--r--doc/administration/high_availability/object_storage.md12
-rw-r--r--doc/development/documentation/index.md63
-rw-r--r--doc/user/project/releases/index.md12
-rwxr-xr-xscripts/lint-doc.sh34
-rw-r--r--spec/presenters/projects/prometheus/alert_presenter_spec.rb3
12 files changed, 149 insertions, 30 deletions
diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml
index 2e4d13448ae..08c0efe40db 100644
--- a/.gitlab/ci/docs.gitlab-ci.yml
+++ b/.gitlab/ci/docs.gitlab-ci.yml
@@ -50,10 +50,6 @@ docs lint:
needs: []
script:
- scripts/lint-doc.sh
- # Lint Markdown
- - markdownlint --config .markdownlint.json 'doc/**/*.md'
- # Lint content (error-level text-scoped rules only)
- - vale --minAlertLevel error --ignore-syntax doc
# Prepare docs for build
- mv doc/ /tmp/gitlab-docs/content/$DOCS_GITLAB_REPO_SUFFIX
- cd /tmp/gitlab-docs
diff --git a/Gemfile b/Gemfile
index 96e02c42d28..3f38cb7d62c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -301,7 +301,7 @@ gem 'sentry-raven', '~> 2.9'
gem 'premailer-rails', '~> 1.10.3'
# LabKit: Tracing and Correlation
-gem 'gitlab-labkit', '0.10.0'
+gem 'gitlab-labkit', '0.10.1'
# I18n
gem 'ruby_parser', '~> 3.8', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index 0748cb0e56b..d46550a252d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -380,7 +380,7 @@ GEM
github-markup (1.7.0)
gitlab-chronic (0.10.5)
numerizer (~> 0.2)
- gitlab-labkit (0.10.0)
+ gitlab-labkit (0.10.1)
actionpack (>= 5.0.0, < 6.1.0)
activesupport (>= 5.0.0, < 6.1.0)
grpc (~> 1.19)
@@ -1232,7 +1232,7 @@ DEPENDENCIES
gitaly (~> 1.86.0)
github-markup (~> 1.7.0)
gitlab-chronic (~> 0.10.5)
- gitlab-labkit (= 0.10.0)
+ gitlab-labkit (= 0.10.1)
gitlab-license (~> 1.0)
gitlab-mail_room (~> 0.0.3)
gitlab-markup (~> 1.7.0)
diff --git a/app/assets/javascripts/clusters_list/store/actions.js b/app/assets/javascripts/clusters_list/store/actions.js
index 39fd9fdf625..79bc9932438 100644
--- a/app/assets/javascripts/clusters_list/store/actions.js
+++ b/app/assets/javascripts/clusters_list/store/actions.js
@@ -1,17 +1,36 @@
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
+import Poll from '~/lib/utils/poll';
import axios from '~/lib/utils/axios_utils';
+import Visibility from 'visibilityjs';
import flash from '~/flash';
import { __ } from '~/locale';
import * as types from './mutation_types';
export const fetchClusters = ({ state, commit }) => {
- return axios
- .get(state.endpoint)
- .then(({ data }) => {
+ const poll = new Poll({
+ resource: {
+ fetchClusters: endpoint => axios.get(endpoint),
+ },
+ data: state.endpoint,
+ method: 'fetchClusters',
+ successCallback: ({ data }) => {
commit(types.SET_CLUSTERS_DATA, convertObjectPropsToCamelCase(data, { deep: true }));
commit(types.SET_LOADING_STATE, false);
- })
- .catch(() => flash(__('An error occurred while loading clusters')));
+ },
+ errorCallback: () => flash(__('An error occurred while loading clusters')),
+ });
+
+ if (!Visibility.hidden()) {
+ poll.makeRequest();
+ }
+
+ Visibility.change(() => {
+ if (!Visibility.hidden()) {
+ poll.restart();
+ } else {
+ poll.stop();
+ }
+ });
};
// prevent babel-plugin-rewire from generating an invalid default during karma tests
diff --git a/config/initializers/9_fast_gettext.rb b/config/initializers/9_fast_gettext.rb
index fd0167aa476..f836e6e971d 100644
--- a/config/initializers/9_fast_gettext.rb
+++ b/config/initializers/9_fast_gettext.rb
@@ -1,9 +1,2 @@
-FastGettext.add_text_domain 'gitlab',
- path: File.join(Rails.root, 'locale'),
- type: :po,
- ignore_fuzzy: true
-FastGettext.default_text_domain = 'gitlab'
FastGettext.default_available_locales = Gitlab::I18n.available_locales
-FastGettext.default_locale = :en
-
I18n.available_locales = Gitlab::I18n.available_locales
diff --git a/config/initializers_before_autoloader/001_fast_gettext.rb b/config/initializers_before_autoloader/001_fast_gettext.rb
new file mode 100644
index 00000000000..ede38450582
--- /dev/null
+++ b/config/initializers_before_autoloader/001_fast_gettext.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+FastGettext.add_text_domain 'gitlab',
+ path: File.join(Rails.root, 'locale'),
+ type: :po,
+ ignore_fuzzy: true
+FastGettext.default_text_domain = 'gitlab'
+FastGettext.default_locale = :en
diff --git a/doc/administration/audit_events.md b/doc/administration/audit_events.md
index cc8135a86c4..2b068e64901 100644
--- a/doc/administration/audit_events.md
+++ b/doc/administration/audit_events.md
@@ -81,6 +81,7 @@ From there, you can see the following actions:
- Release milestone associations changed
- Permission to approve merge requests by committers was updated ([introduced](https://gitlab.com/gitlab-org/gitlab/issues/7531) in GitLab 12.9)
- Permission to approve merge requests by authors was updated ([introduced](https://gitlab.com/gitlab-org/gitlab/issues/7531) in GitLab 12.9)
+- Number of required approvals was updated ([introduced](https://gitlab.com/gitlab-org/gitlab/issues/7531) in GitLab 12.9)
### Instance events **(PREMIUM ONLY)**
diff --git a/doc/administration/high_availability/object_storage.md b/doc/administration/high_availability/object_storage.md
index 6ec34ea2f5d..dc451757a1c 100644
--- a/doc/administration/high_availability/object_storage.md
+++ b/doc/administration/high_availability/object_storage.md
@@ -4,22 +4,26 @@ type: reference
# Cloud Object Storage
-GitLab supports utilizing a Cloud Object Storage service over [NFS](nfs.md) for holding
+GitLab supports utilizing a Cloud Object Storage service rather than [NFS](nfs.md) for holding
numerous types of data. This is recommended in larger setups as object storage is
-typically much more performant and reliable.
+typically much more performant, reliable, and scalable.
For configuring GitLab to use Object Storage refer to the following guides:
1. Make sure the [`git` user home directory](https://docs.gitlab.com/omnibus/settings/configuration.html#moving-the-home-directory-for-a-user) is on local disk.
1. Configure [database lookup of SSH keys](../operations/fast_ssh_key_lookup.md)
to eliminate the need for a shared `authorized_keys` file.
+1. Configure [object storage for backups](../../raketasks/backup_restore.md#uploading-backups-to-a-remote-cloud-storage).
1. Configure [object storage for job artifacts](../job_artifacts.md#using-object-storage)
including [incremental logging](../job_logs.md#new-incremental-logging-architecture).
1. Configure [object storage for LFS objects](../lfs/lfs_administration.md#storing-lfs-objects-in-remote-object-storage).
1. Configure [object storage for uploads](../uploads.md#using-object-storage-core-only).
1. Configure [object storage for merge request diffs](../merge_request_diffs.md#using-object-storage).
-1. Configure [object storage for packages](../packages/index.md#using-object-storage) (optional feature).
-1. Configure [object storage for dependency proxy](../packages/dependency_proxy.md#using-object-storage) (optional feature).
+1. Configure [object storage for container registry](../packages/container_registry.md#container-registry-storage-driver) (optional feature).
+1. Configure [object storage for Mattermost](https://docs.mattermost.com/administration/config-settings.html#file-storage) (optional feature).
+1. Configure [object storage for packages](../packages/index.md#using-object-storage) (optional feature). **(PREMIUM ONLY)**
+1. Configure [object storage for dependency proxy](../packages/dependency_proxy.md#using-object-storage) (optional feature). **(ULTIMATE ONLY)**
+1. Configure [object storage for Pseudonymizer](../pseudonymizer.md#configuration) (optional feature). **(ULTIMATE ONLY)**
NOTE: **Note:**
One current feature of GitLab that still requires a shared directory (NFS) is
diff --git a/doc/development/documentation/index.md b/doc/development/documentation/index.md
index 4fcdd8a1fb0..694acc16a97 100644
--- a/doc/development/documentation/index.md
+++ b/doc/development/documentation/index.md
@@ -393,15 +393,14 @@ merge request with new or changed docs is submitted, are:
- [`docs lint`](https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab/ci/docs.gitlab-ci.yml#L48):
Runs several tests on the content of the docs themselves:
- [`lint-doc.sh` script](https://gitlab.com/gitlab-org/gitlab/blob/master/scripts/lint-doc.sh)
- checks that:
+ runs the following checks and linters:
- All cURL examples use the long flags (ex: `--header`, not `-H`).
- The `CHANGELOG.md` does not contain duplicate versions.
- No files in `doc/` are executable.
- No new `README.md` was added.
- - [markdownlint](#markdownlint).
- - Nanoc tests, which you can [run locally](#previewing-the-changes-live) before
- pushing to GitLab by executing the command `bundle exec nanoc check internal_links`
- (or `internal_anchors`) on your local [`gitlab-docs`](https://gitlab.com/gitlab-org/gitlab-docs) directory:
+ - [markdownlint](#markdownlint).
+ - [Vale](#vale).
+ - Nanoc tests:
- [`internal_links`](https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab/ci/docs.gitlab-ci.yml#L67)
checks that all internal links (ex: `[link](../index.md)`) are valid.
- [`internal_anchors`](https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab/ci/docs.gitlab-ci.yml#L69)
@@ -410,6 +409,60 @@ merge request with new or changed docs is submitted, are:
- If any code or the `doc/README.md` file is changed, a full pipeline will run, which
runs tests for [`/help`](#gitlab-help-tests).
+### Running tests & lint checks locally
+
+Apart from [previewing your changes locally](#previewing-the-changes-live), you can also run all lint checks
+and Nanoc tests locally.
+
+#### Nanoc tests
+
+To execute Nanoc tests locally:
+
+1. Navigate to the [`gitlab-docs`](https://gitlab.com/gitlab-org/gitlab-docs) directory.
+1. Run:
+
+ ```shell
+ # Check for broken internal links
+ bundle exec nanoc check internal_links
+
+ # Check for broken external links (might take a lot of time to complete).
+ # This test is set to be allowed to fail and is run only in the gitlab-docs project CI
+ bundle exec nanoc check internal_anchors
+ ```
+
+#### Lint checks
+
+Lint checks are performed by the [`lint-doc.sh`](https://gitlab.com/gitlab-org/gitlab/blob/master/scripts/lint-doc.sh)
+script and can be executed as follows:
+
+1. Navigate to the `gitlab` directory.
+1. Run:
+
+ ```shell
+ MD_DOC_PATH=path/to/my_doc.md scripts/lint-doc.sh
+ ```
+
+Where `MD_DOC_PATH` points to the file or directory you would like to run lint checks for.
+If you omit it completely, it will default to the `doc/` directory.
+The output should be similar to:
+
+```
+=> Linting documents at path /path/to/gitlab as <user>...
+=> Checking for cURL short options...
+=> Checking for CHANGELOG.md duplicate entries...
+=> Checking /path/to/gitlab/doc for executable permissions...
+=> Checking for new README.md files...
+=> Linting markdown style...
+=> Linting prose...
+✔ 0 errors, 0 warnings and 0 suggestions in 1 file.
+✔ Linting passed
+```
+
+Note that this requires you to either have the required lint tools installed on your machine,
+or a working Docker installation, in which case an image with these tools pre-installed will be used.
+
+For more information on available linters refer to the [linting](#linting) section.
+
### Linting
To help adhere to the [documentation style guidelines](styleguide.md), and improve the content
diff --git a/doc/user/project/releases/index.md b/doc/user/project/releases/index.md
index 8294bb4f6e2..f6e35ab03db 100644
--- a/doc/user/project/releases/index.md
+++ b/doc/user/project/releases/index.md
@@ -28,6 +28,18 @@ There are several ways to create a Release:
Start by giving a [description](#release-description) to the Release and
including its [assets](#release-assets), as follows.
+## Release versioning
+
+Release versions are manually assigned by the user in the Release title. GitLab uses [Semantic Versioning](https://semver.org/) for our releases, and we recommend you do too. Use `(Major).(Minor).(Patch)`, as detailed in the [GitLab Policy for Versioning](../../../policy/maintenance.md#versioning).
+
+For example, for GitLab version `10.5.7`:
+
+- `10` represents the major version. The major release was `10.0.0`, but often referred to as `10.0`.
+- `5` represents the minor version. The minor release was `10.5.0`, but often referred to as `10.5`.
+- `7` represents the patch number.
+
+Any part of the version number can be multiple digits, for example, `13.10.11`.
+
### Release description
Every Release has a description. You can add any text you like, but we recommend
diff --git a/scripts/lint-doc.sh b/scripts/lint-doc.sh
index 69c7a56c34f..5477002eb43 100755
--- a/scripts/lint-doc.sh
+++ b/scripts/lint-doc.sh
@@ -48,5 +48,39 @@ then
exit 1
fi
+MD_DOC_PATH=${MD_DOC_PATH:-doc/**/*.md}
+
+function run_locally_or_in_docker() {
+ local cmd=$1
+ local args=$2
+
+ if hash ${cmd} 2>/dev/null
+ then
+ $cmd $args
+ elif hash docker 2>/dev/null
+ then
+ docker run -t -v ${PWD}:/gitlab -w /gitlab --rm registry.gitlab.com/gitlab-org/gitlab-docs:lint ${cmd} ${args}
+ else
+ echo
+ echo " ✖ ERROR: '${cmd}' not found. Install '${cmd}' or Docker to proceed." >&2
+ echo
+ exit 1
+ fi
+
+ if [ $? -ne 0 ]
+ then
+ echo
+ echo " ✖ ERROR: '${cmd}' failed with errors." >&2
+ echo
+ exit 1
+ fi
+}
+
+echo '=> Linting markdown style...'
+run_locally_or_in_docker 'markdownlint' "--config .markdownlint.json ${MD_DOC_PATH}"
+
+echo '=> Linting prose...'
+run_locally_or_in_docker 'vale' "--minAlertLevel error --ignore-syntax ${MD_DOC_PATH}"
+
echo "✔ Linting passed"
exit 0
diff --git a/spec/presenters/projects/prometheus/alert_presenter_spec.rb b/spec/presenters/projects/prometheus/alert_presenter_spec.rb
index ddf0934573f..85c73aa3533 100644
--- a/spec/presenters/projects/prometheus/alert_presenter_spec.rb
+++ b/spec/presenters/projects/prometheus/alert_presenter_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
describe Projects::Prometheus::AlertPresenter do
- let_it_be(:project) { create(:project) }
+ let_it_be(:project, reload: true) { create(:project) }
let(:presenter) { described_class.new(alert) }
let(:payload) { {} }
@@ -174,7 +174,6 @@ describe Projects::Prometheus::AlertPresenter do
context 'create issue setting enabled' do
before do
create(:project_incident_management_setting, project: project, create_issue: true)
- project.reload
end
it { is_expected.to eq(true) }