Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab/ci/docs.gitlab-ci.yml1
-rw-r--r--app/helpers/markup_helper.rb4
-rw-r--r--app/views/dashboard/todos/_todo.html.haml2
-rw-r--r--db/docs/notes.yml2
-rw-r--r--db/docs/snippet_repositories.yml2
-rw-r--r--db/docs/snippet_statistics.yml2
-rw-r--r--db/docs/snippet_user_mentions.yml2
-rw-r--r--db/docs/snippets.yml2
-rw-r--r--db/docs/uploads.yml2
-rw-r--r--db/init_structure.sql4
-rw-r--r--doc/.markdownlint/require_helper.js14
-rw-r--r--doc/.markdownlint/rules/tabs_blank_lines.js7
-rw-r--r--doc/.markdownlint/rules/tabs_title_markup.js3
-rw-r--r--doc/.markdownlint/rules/tabs_title_text.js7
-rw-r--r--doc/ci/runners/configure_runners.md2
-rw-r--r--doc/user/admin_area/index.md44
-rw-r--r--doc/user/admin_area/settings/continuous_integration.md2
-rw-r--r--lib/tasks/lint.rake5
-rwxr-xr-xscripts/lint-doc.sh25
-rw-r--r--spec/helpers/markup_helper_spec.rb18
20 files changed, 75 insertions, 75 deletions
diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml
index 02fc58f8580..84d810e7db7 100644
--- a/.gitlab/ci/docs.gitlab-ci.yml
+++ b/.gitlab/ci/docs.gitlab-ci.yml
@@ -65,6 +65,7 @@ docs-lint markdown:
- .default-retry
- .docs:rules:docs-lint
- .docs-markdown-lint-image
+ - .yarn-cache
stage: lint
needs: []
script:
diff --git a/app/helpers/markup_helper.rb b/app/helpers/markup_helper.rb
index 393ece6dffb..0891760be76 100644
--- a/app/helpers/markup_helper.rb
+++ b/app/helpers/markup_helper.rb
@@ -65,7 +65,7 @@ module MarkupHelper
tags = %w(a gl-emoji b strong i em pre code p span)
- if Feature.disabled?(:two_line_mention_enabled)
+ if Feature.disabled?(:two_line_mention_enabled, current_user)
includes_code = false
if is_todo
@@ -91,7 +91,7 @@ module MarkupHelper
)
)
- if is_todo && !includes_code && Feature.disabled?(:two_line_mention_enabled)
+ if is_todo && !includes_code && Feature.disabled?(:two_line_mention_enabled, current_user)
text = "<span class=\"gl-relative\">\"</span>#{text}<span class=\"gl-relative\">\"</span>"
end
# since <img> tags are stripped, this can leave empty <a> tags hanging around
diff --git a/app/views/dashboard/todos/_todo.html.haml b/app/views/dashboard/todos/_todo.html.haml
index 928352ce288..b0f21eed348 100644
--- a/app/views/dashboard/todos/_todo.html.haml
+++ b/app/views/dashboard/todos/_todo.html.haml
@@ -1,4 +1,4 @@
-- two_line_mention = Feature.enabled?(:two_line_mention_enabled)
+- two_line_mention = Feature.enabled?(:two_line_mention_enabled, current_user)
%li.todo.gl-hover-border-blue-200.gl-hover-bg-blue-50.gl-hover-cursor-pointer.gl-relative{ class: "todo-#{todo.done? ? 'done' : 'pending'}", id: dom_id(todo) }
.gl-display-flex.gl-flex-direction-column.gl-sm-flex-direction-row.gl-sm-align-items-center
diff --git a/db/docs/notes.yml b/db/docs/notes.yml
index a9268c4b352..a8dac9ccbd3 100644
--- a/db/docs/notes.yml
+++ b/db/docs/notes.yml
@@ -15,7 +15,7 @@ feature_categories:
- code_review_workflow
- portfolio_management
- service_desk
-- snippets
+- source_code_management
- team_planning
description: The object at the core of comments, discussions and system notes shown on issues, MRs and epics
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/9ba1224867665844b117fa037e1465bb706b3685
diff --git a/db/docs/snippet_repositories.yml b/db/docs/snippet_repositories.yml
index f33c3828c46..e2fd54f7c58 100644
--- a/db/docs/snippet_repositories.yml
+++ b/db/docs/snippet_repositories.yml
@@ -3,7 +3,7 @@ table_name: snippet_repositories
classes:
- SnippetRepository
feature_categories:
-- snippets
+- source_code_management
description: Stores repository information used to version control snippets.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23796
milestone: '12.8'
diff --git a/db/docs/snippet_statistics.yml b/db/docs/snippet_statistics.yml
index 74a0d29bedc..ad816a6e2e0 100644
--- a/db/docs/snippet_statistics.yml
+++ b/db/docs/snippet_statistics.yml
@@ -3,7 +3,7 @@ table_name: snippet_statistics
classes:
- SnippetStatistics
feature_categories:
-- snippets
+- source_code_management
description: Stores the repository size, commit count, and file count regarding the snippet repository.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35026
milestone: '13.2'
diff --git a/db/docs/snippet_user_mentions.yml b/db/docs/snippet_user_mentions.yml
index 8f141bd0263..099d027d145 100644
--- a/db/docs/snippet_user_mentions.yml
+++ b/db/docs/snippet_user_mentions.yml
@@ -3,7 +3,7 @@ table_name: snippet_user_mentions
classes:
- SnippetUserMention
feature_categories:
-- snippets
+- source_code_management
description: For storing mentioned users, groups, projects referenced in a snippet description.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/19009
milestone: '12.6'
diff --git a/db/docs/snippets.yml b/db/docs/snippets.yml
index 4d92b59c924..1a1719552a1 100644
--- a/db/docs/snippets.yml
+++ b/db/docs/snippets.yml
@@ -5,7 +5,7 @@ classes:
- ProjectSnippet
- Snippet
feature_categories:
-- snippets
+- source_code_management
description: GitLab snippets allow you to store and share bits of code and text with other users.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/9265de3d25715aeafd38a4ef41596dca058dc18c
milestone: "1.0.1"
diff --git a/db/docs/uploads.yml b/db/docs/uploads.yml
index 50ba713c413..88f3bd68946 100644
--- a/db/docs/uploads.yml
+++ b/db/docs/uploads.yml
@@ -8,7 +8,7 @@ feature_categories:
- importers
- portfolio_management
- projects
-- snippets
+- source_code_management
- team_planning
description: For tracking blob metadata. Single table inheritance is used to relate this table to many other tables.
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/4c622b71fd284058deee483bf0009f8179b792bc
diff --git a/db/init_structure.sql b/db/init_structure.sql
index 913b495b6fd..b83436e85f0 100644
--- a/db/init_structure.sql
+++ b/db/init_structure.sql
@@ -9644,8 +9644,10 @@ CREATE TABLE audit_events (
created_at timestamp without time zone NOT NULL,
target_type text,
target_id bigint,
+ CONSTRAINT check_492aaa021d CHECK ((char_length(entity_path) <= 5500)),
CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
- CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255))
+ CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255)),
+ CONSTRAINT check_d493ec90b5 CHECK ((char_length(target_details) <= 5500))
)
PARTITION BY RANGE (created_at);
diff --git a/doc/.markdownlint/require_helper.js b/doc/.markdownlint/require_helper.js
deleted file mode 100644
index 7d06cf67419..00000000000
--- a/doc/.markdownlint/require_helper.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * Look up the global node modules directory.
- *
- * Because we install markdownlint packages globally
- * in the Docker image where this runs, we need to
- * provide the path to the global install location
- * when referencing global functions from our own node
- * modules.
- *
- * Image:
- * https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/dockerfiles/gitlab-docs-lint-markdown.Dockerfile
- */
-const { execSync } = require('child_process');
-module.exports.globalPath = execSync('yarn global dir').toString().trim() + '/node_modules/';
diff --git a/doc/.markdownlint/rules/tabs_blank_lines.js b/doc/.markdownlint/rules/tabs_blank_lines.js
index e0e2c1a0a9b..8a9e9c2434e 100644
--- a/doc/.markdownlint/rules/tabs_blank_lines.js
+++ b/doc/.markdownlint/rules/tabs_blank_lines.js
@@ -1,9 +1,4 @@
-const { globalPath } = require('../require_helper');
-const {
- forEachLine,
- getLineMetadata,
- isBlankLine,
-} = require(`${globalPath}/markdownlint-rule-helpers`);
+const { forEachLine, getLineMetadata, isBlankLine } = require(`markdownlint-rule-helpers`);
module.exports = {
names: ['tabs-blank-lines'],
diff --git a/doc/.markdownlint/rules/tabs_title_markup.js b/doc/.markdownlint/rules/tabs_title_markup.js
index 9c1de1e630d..0461ac8385f 100644
--- a/doc/.markdownlint/rules/tabs_title_markup.js
+++ b/doc/.markdownlint/rules/tabs_title_markup.js
@@ -1,5 +1,4 @@
-const { globalPath } = require('../require_helper');
-const { forEachLine, getLineMetadata } = require(`${globalPath}/markdownlint-rule-helpers`);
+const { forEachLine, getLineMetadata } = require(`markdownlint-rule-helpers`);
module.exports = {
names: ['tabs-title-markup'],
diff --git a/doc/.markdownlint/rules/tabs_title_text.js b/doc/.markdownlint/rules/tabs_title_text.js
index 672aa70f562..beb329231b1 100644
--- a/doc/.markdownlint/rules/tabs_title_text.js
+++ b/doc/.markdownlint/rules/tabs_title_text.js
@@ -1,9 +1,4 @@
-const { globalPath } = require('../require_helper');
-const {
- forEachLine,
- getLineMetadata,
- isBlankLine,
-} = require(`${globalPath}/markdownlint-rule-helpers`);
+const { forEachLine, getLineMetadata, isBlankLine } = require(`markdownlint-rule-helpers`);
module.exports = {
names: ['tabs-title-text'],
diff --git a/doc/ci/runners/configure_runners.md b/doc/ci/runners/configure_runners.md
index b61e11dd8bc..935ee6aace4 100644
--- a/doc/ci/runners/configure_runners.md
+++ b/doc/ci/runners/configure_runners.md
@@ -159,7 +159,7 @@ To view the IP address of a shared runner you must have administrator access to
the GitLab instance. To determine this:
1. On the top bar, select **Main menu > Admin**.
-1. On the left sidebar, select **Overview > Runners**.
+1. On the left sidebar, select **CI/CD > Runners**.
1. Find the runner in the table and view the **IP Address** column.
![shared runner IP address](img/shared_runner_ip_address_14_5.png)
diff --git a/doc/user/admin_area/index.md b/doc/user/admin_area/index.md
index c9b6a077c73..c40c81157a6 100644
--- a/doc/user/admin_area/index.md
+++ b/doc/user/admin_area/index.md
@@ -325,8 +325,32 @@ For each job, the following details are listed:
| Timing | Duration of the job, and how long ago the job completed. |
| Coverage | Percentage of tests coverage. |
+### Administering Gitaly servers
+
+You can list all Gitaly servers in the GitLab instance from the Admin Area's **Gitaly Servers**
+page. For more details, see [Gitaly](../../administration/gitaly/index.md).
+
+To access the **Gitaly Servers** page:
+
+1. On the top bar, select **Main menu > Admin**.
+1. On the left sidebar, select **Overview > Gitaly Servers**.
+
+For each Gitaly server, the following details are listed:
+
+| Field | Description |
+|----------------|-------------|
+| Storage | Repository storage |
+| Address | Network address on which the Gitaly server is listening |
+| Server version | Gitaly version |
+| Git version | Version of Git installed on the Gitaly server |
+| Up to date | Indicates if the Gitaly server version is the latest version available. A green dot indicates the server is up to date. |
+
+## CI/CD section
+
### Administering runners
+> [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/340859) from **Overview > Runners** to **CI/CD > Runners** in GitLab 15.8.
+
You can administer all runners in the GitLab instance from the Admin Area's **Runners** page. See
[GitLab Runner](https://docs.gitlab.com/runner/) for more information.
@@ -380,26 +404,6 @@ For each runner, the following attributes are listed:
You can also edit, pause, or remove each runner.
-### Administering Gitaly servers
-
-You can list all Gitaly servers in the GitLab instance from the Admin Area's **Gitaly Servers**
-page. For more details, see [Gitaly](../../administration/gitaly/index.md).
-
-To access the **Gitaly Servers** page:
-
-1. On the top bar, select **Main menu > Admin**.
-1. On the left sidebar, select **Overview > Gitaly Servers**.
-
-For each Gitaly server, the following details are listed:
-
-| Field | Description |
-|----------------|-------------|
-| Storage | Repository storage |
-| Address | Network address on which the Gitaly server is listening |
-| Server version | Gitaly version |
-| Git version | Version of Git installed on the Gitaly server |
-| Up to date | Indicates if the Gitaly server version is the latest version available. A green dot indicates the server is up to date. |
-
## Monitoring section
The following topics document the **Monitoring** section of the Admin Area.
diff --git a/doc/user/admin_area/settings/continuous_integration.md b/doc/user/admin_area/settings/continuous_integration.md
index 81e51aaef37..5b49cc58522 100644
--- a/doc/user/admin_area/settings/continuous_integration.md
+++ b/doc/user/admin_area/settings/continuous_integration.md
@@ -52,7 +52,7 @@ you can assign that runner to other projects.
To enable a specific runner for more than one project:
1. On the top bar, select **Main menu > Admin**.
-1. From the left sidebar, select **Overview > Runners**.
+1. From the left sidebar, select **CI/CD > Runners**.
1. Select the runner you want to edit.
1. In the top right, select **Edit** (**{pencil}**).
1. Under **Restrict projects for this runner**, search for a project.
diff --git a/lib/tasks/lint.rake b/lib/tasks/lint.rake
index 62d31803f6e..6e50e417776 100644
--- a/lib/tasks/lint.rake
+++ b/lib/tasks/lint.rake
@@ -34,6 +34,11 @@ unless Rails.env.production?
exit(1)
end
+ desc "GitLab | Lint | Lint docs Markdown files"
+ task :markdown do
+ sh "./scripts/lint-doc.sh"
+ end
+
desc "GitLab | Lint | Run several lint checks"
task :all do
status = 0
diff --git a/scripts/lint-doc.sh b/scripts/lint-doc.sh
index 68dfac95ef6..1c934c07608 100755
--- a/scripts/lint-doc.sh
+++ b/scripts/lint-doc.sh
@@ -119,19 +119,24 @@ else
fi
fi
-function run_locally_or_in_docker() {
+function run_locally_or_in_container() {
local cmd=$1
local args=$2
if hash ${cmd} 2>/dev/null
then
$cmd $args
- elif hash docker 2>/dev/null
+ # When using software like Rancher Desktop, both nerdctl and docker binaries are available
+ # but only one is configured. To check which one to use, we need to probe each runtime
+ elif (hash nerdctl 2>/dev/null) && (nerdctl info 2>&1 1>/dev/null)
then
- docker run -t -v ${PWD}:/gitlab -w /gitlab --rm registry.gitlab.com/gitlab-org/gitlab-docs/lint-markdown:alpine-3.16-vale-2.20.1-markdownlint-0.32.2 ${cmd} ${args}
+ nerdctl run -t -v "${PWD}:/gitlab" -w /gitlab --rm registry.gitlab.com/gitlab-org/gitlab-docs/lint-markdown:alpine-3.16-vale-2.20.1-markdownlint-0.32.2 ${cmd} ${args}
+ elif (hash docker 2>/dev/null) && (docker info 2>&1 1>/dev/null)
+ then
+ docker run -t -v "${PWD}:/gitlab" -w /gitlab --rm registry.gitlab.com/gitlab-org/gitlab-docs/lint-markdown:alpine-3.16-vale-2.20.1-markdownlint-0.32.2 ${cmd} ${args}
else
echo
- echo " ✖ ERROR: '${cmd}' not found. Install '${cmd}' or Docker to proceed." >&2
+ echo " ✖ ERROR: '${cmd}' not found. Install '${cmd}' or a container runtime (Docker/Nerdctl) to proceed." >&2
echo
((ERRORCODE++))
fi
@@ -151,11 +156,19 @@ if [ -z "${MD_DOC_PATH}" ]
then
echo "Merged results pipeline detected, but no markdown files found. Skipping."
else
- run_locally_or_in_docker 'markdownlint' "--config .markdownlint.yml ${MD_DOC_PATH} --rules doc/.markdownlint/rules"
+ yarn markdownlint --config .markdownlint.yml ${MD_DOC_PATH} --rules doc/.markdownlint/rules
+
+ if [ $? -ne 0 ]
+ then
+ echo
+ echo '✖ ERROR: Markdownlint failed with errors.' >&2
+ echo
+ ((ERRORCODE++))
+ fi
fi
echo '=> Linting prose...'
-run_locally_or_in_docker 'vale' "--minAlertLevel error --output=doc/.vale/vale.tmpl ${MD_DOC_PATH}"
+run_locally_or_in_container 'vale' "--minAlertLevel error --output=doc/.vale/vale.tmpl ${MD_DOC_PATH}"
if [ $ERRORCODE -ne 0 ]
then
diff --git a/spec/helpers/markup_helper_spec.rb b/spec/helpers/markup_helper_spec.rb
index d1c86abf6e9..088519248c6 100644
--- a/spec/helpers/markup_helper_spec.rb
+++ b/spec/helpers/markup_helper_spec.rb
@@ -449,21 +449,21 @@ RSpec.describe MarkupHelper do
object = create_object('Text with `inline code`')
expected = 'Text with <code>inline code</code>'
- expect(first_line_in_markdown(object, attribute, 100, is_todo: true, project: project)).to match(expected)
+ expect(helper.first_line_in_markdown(object, attribute, 100, is_todo: true, project: project)).to match(expected)
end
it 'truncates the text with multiple paragraphs' do
object = create_object("Paragraph 1\n\nParagraph 2")
expected = 'Paragraph 1...'
- expect(first_line_in_markdown(object, attribute, 100, is_todo: true, project: project)).to match(expected)
+ expect(helper.first_line_in_markdown(object, attribute, 100, is_todo: true, project: project)).to match(expected)
end
it 'displays the first line of a code block' do
object = create_object("```\nCode block\nwith two lines\n```")
expected = %r{<pre.+><code><span class="line">Code block\.\.\.</span>\n</code></pre>}
- expect(first_line_in_markdown(object, attribute, 100, is_todo: true, project: project)).to match(expected)
+ expect(helper.first_line_in_markdown(object, attribute, 100, is_todo: true, project: project)).to match(expected)
end
it 'truncates a single long line of text' do
@@ -471,7 +471,7 @@ RSpec.describe MarkupHelper do
object = create_object(text * 4)
expected = (text * 2).sub(/.{3}/, '...')
- expect(first_line_in_markdown(object, attribute, 150, is_todo: true, project: project)).to match(expected)
+ expect(helper.first_line_in_markdown(object, attribute, 150, is_todo: true, project: project)).to match(expected)
end
it 'preserves code color scheme' do
@@ -480,12 +480,12 @@ RSpec.describe MarkupHelper do
"<code><span class=\"line\"><span class=\"k\">def</span> <span class=\"nf\">test</span>...</span>\n" \
"</code></pre>\n"
- expect(first_line_in_markdown(object, attribute, 150, is_todo: true, project: project)).to eq(expected)
+ expect(helper.first_line_in_markdown(object, attribute, 150, is_todo: true, project: project)).to eq(expected)
end
it 'removes any images' do
object = create_object("![ImageTest](/uploads/test.png)")
- text = first_line_in_markdown(object, attribute, 150, is_todo: true, project: project)
+ text = helper.first_line_in_markdown(object, attribute, 150, is_todo: true, project: project)
expect(text).not_to match('<img')
expect(text).not_to match('<a')
@@ -498,7 +498,7 @@ RSpec.describe MarkupHelper do
create(:label, title: 'label_1', project: project)
object = create_object(label_title, project: project)
- first_line_in_markdown(object, attribute, 150, is_todo: true, project: project)
+ helper.first_line_in_markdown(object, attribute, 150, is_todo: true, project: project)
end
it 'preserves style attribute for a label that can be accessed by current_user' do
@@ -522,7 +522,7 @@ RSpec.describe MarkupHelper do
html = '<i></i> <strong>strong</strong><em>em</em><b>b</b>'
object = create_object(html)
- result = first_line_in_markdown(object, attribute, 100, is_todo: true, project: project)
+ result = helper.first_line_in_markdown(object, attribute, 100, is_todo: true, project: project)
expect(result).to include(html)
end
@@ -531,7 +531,7 @@ RSpec.describe MarkupHelper do
object = create_object("hello \n\n [Test](README.md)")
expect do
- first_line_in_markdown(object, attribute, 100, is_todo: true, project: project)
+ helper.first_line_in_markdown(object, attribute, 100, is_todo: true, project: project)
end.not_to change { Gitlab::GitalyClient.get_request_count }
end
end