Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-08-05 09:07:22 +00:00
parent 444db32ac1
commit c823a6fa8c
169 changed files with 490 additions and 464 deletions

View File

@ -1153,6 +1153,7 @@ lib/gitlab/checks/**
/app/views/groups/settings/_resource_access_token_creation.html.haml
/app/views/groups/settings/_two_factor_auth.html.haml
/app/views/groups/settings/access_tokens/
/app/views/layouts/devise*.haml
/app/views/layouts/oauth_error.html.haml
/app/views/notify/access_token_about_to_expire_email.html.haml
/app/views/notify/access_token_about_to_expire_email.text.erb
@ -1236,7 +1237,6 @@ lib/gitlab/checks/**
/ee/app/views/admin/application_settings/_personal_access_token_expiration_policy.html.haml
/ee/app/views/credentials_inventory_mailer/personal_access_token_revoked_email.html.haml
/ee/app/views/credentials_inventory_mailer/personal_access_token_revoked_email.text.haml
/app/views/devise/**/
/ee/app/views/groups/_personal_access_token_expiration_policy.html.haml
/ee/app/views/groups/sso/_authorize_pane.html.haml
/ee/app/views/notify/policy_revoked_personal_access_tokens_email.html.haml

View File

@ -6,7 +6,7 @@ StylesPath = doc/.vale
MinAlertLevel = suggestion
[*.md]
BasedOnStyles = gitlab
BasedOnStyles = gitlab_base, gitlab_docs
# Ignore SVG markup
TokenIgnores = (\*\*\{\w*\}\*\*)

View File

@ -1 +1 @@
09eeaffa3ae3118b03eb0e9e7000e5901ced015a
da03e230032486c2fc2cbed95d78308eff2887c6

View File

@ -208,7 +208,7 @@ export default {
<form
ref="form"
:class="{ 'was-validated': wasValidated }"
class="gl-mt-3 gl-mb-3 needs-validation"
class="needs-validation"
novalidate
@submit.prevent.stop="onSubmit"
>
@ -264,14 +264,13 @@ export default {
</p>
</div>
<div v-if="!inModal" class="form-group" data-testid="action-buttons">
<div v-if="!inModal" class="gl-flex gl-gap-3" data-testid="action-buttons">
<gl-button
:loading="isSaving"
type="submit"
variant="confirm"
category="primary"
data-testid="add-badge-button"
class="gl-mr-3"
>
{{ saveText }}
</gl-button>

View File

@ -31,6 +31,8 @@ export default {
GlTooltip: GlTooltipDirective,
},
i18n: {
edit: __('Edit'),
delete: __('Delete'),
emptyGroupMessage: s__('Badges|This group has no badges. Add an existing badge or create one.'),
emptyProjectMessage: s__('Badges|This project has no badges. Start by adding a new badge.'),
},
@ -138,24 +140,26 @@ export default {
data-testid="badge-actions"
>
<gl-button
v-gl-tooltip
v-gl-modal.edit-badge-modal
:disabled="item.isDeleting"
variant="default"
category="tertiary"
icon="pencil"
size="medium"
:aria-label="__('Edit')"
:title="$options.i18n.edit"
:aria-label="$options.i18n.edit"
data-testid="edit-badge-button"
@click="editBadge(item)"
/>
<gl-button
v-gl-tooltip
v-gl-modal.delete-badge-modal
:disabled="item.isDeleting"
category="tertiary"
variant="danger"
icon="remove"
size="medium"
:aria-label="__('Delete')"
:title="$options.i18n.delete"
:aria-label="$options.i18n.delete"
data-testid="delete-badge"
@click="updateBadgeInModal(item)"
/>

View File

@ -1,5 +1,5 @@
<script>
import { GlButton, GlModal, GlSprintf } from '@gitlab/ui';
import { GlModal, GlSprintf } from '@gitlab/ui';
// eslint-disable-next-line no-restricted-imports
import { mapState, mapActions } from 'vuex';
import { createAlert, VARIANT_INFO } from '~/alert';
@ -12,13 +12,12 @@ import BadgeList from './badge_list.vue';
export default {
name: 'BadgeSettings',
components: {
CrudComponent,
Badge,
BadgeForm,
BadgeList,
GlButton,
GlModal,
GlSprintf,
CrudComponent,
},
i18n: {
title: s__('Badges|Your badges'),
@ -28,11 +27,6 @@ export default {
'Badges|If you delete this badge, you %{strongStart}cannot%{strongEnd} restore it.',
),
},
data() {
return {
addFormVisible: false,
};
},
computed: {
...mapState(['badges', 'badgeInModal', 'isEditing']),
saveProps() {
@ -55,11 +49,8 @@ export default {
},
methods: {
...mapActions(['deleteBadge']),
showAddForm() {
this.addFormVisible = !this.addFormVisible;
},
closeAddForm() {
this.addFormVisible = false;
this.$refs.badgesCrud.hideForm();
},
onSubmitEditModal() {
this.$refs.editForm.onSubmit();
@ -85,25 +76,19 @@ export default {
<template>
<crud-component
ref="badgesCrud"
:title="$options.i18n.title"
icon="labels"
:count="badges.length"
class="badge-settings"
:toggle-text="$options.i18n.addFormTitle"
data-testid="badge-settings"
>
<template #actions>
<gl-button
v-if="!addFormVisible"
size="small"
data-testid="show-badge-add-form"
@click="showAddForm"
>{{ $options.i18n.addButton }}</gl-button
>
</template>
<div v-if="addFormVisible" class="gl-new-card-add-form gl-m-5">
<template #form>
<h4 class="gl-mt-0">{{ $options.i18n.addFormTitle }}</h4>
<badge-form :is-editing="false" @close-add-form="closeAddForm" />
</div>
</template>
<badge-list />
<gl-modal
modal-id="edit-badge-modal"
@ -136,6 +121,5 @@ export default {
</gl-sprintf>
</p>
</gl-modal>
<badge-list />
</crud-component>
</template>

View File

@ -88,7 +88,7 @@ export default {
</div>
<div class="gl-flex gl-items-baseline gl-gap-3" data-testid="crud-actions">
<gl-button
v-if="toggleText"
v-if="toggleText && !isFormVisible"
size="small"
data-testid="crud-form-toggle"
@click="toggleForm"

View File

@ -2,6 +2,7 @@
class AuditEventService
include AuditEventSaveType
include ::Gitlab::Audit::Logging
# Instantiates a new service
#
@ -123,6 +124,7 @@ class AuditEventService
event = build_event
save_or_track event
log_to_new_tables([event], event.class.to_s) if should_save_database?(@save_type)
event
end

View File

@ -40,10 +40,10 @@
= _('Never')
%td{ data: { label: _('Actions'), testid: 'actions' } }
%div{ class: 'gl-display-flex! gl-pl-0!' }
.gl-flex.gl-items-center.gl-justify-end.gl-gap-3.-gl-m-3
- if key.can_delete?
- if key.signing? && !is_admin
= render Pajamas::ButtonComponent.new(size: :small, button_options: { class: 'js-confirm-modal-button', 'aria-label' => _('Revoke'), data: ssh_key_revoke_modal_data(key, revoke_user_settings_ssh_key_path(key)) }) do
= render Pajamas::ButtonComponent.new(size: :small, category: :secondary, variant: :danger, button_options: { class: 'js-confirm-modal-button', 'aria-label' => _('Revoke'), data: ssh_key_revoke_modal_data(key, revoke_user_settings_ssh_key_path(key)) }) do
= _('Revoke')
.gl-pl-3
= render Pajamas::ButtonComponent.new(size: :small, icon: 'remove', button_options: { title: _('Remove'), 'aria-label' => _('Remove'), class: 'js-confirm-modal-button', data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) })
= render Pajamas::ButtonComponent.new(icon: 'remove', category: :tertiary, button_options: { title: _('Remove'), 'aria-label' => _('Remove'), class: 'js-confirm-modal-button', data: ssh_key_delete_modal_data(key, path_to_key(key, is_admin)) })

View File

@ -11,7 +11,7 @@
%th= s_('Profiles|Created')
%th= s_('Profiles|Last used')
%th= s_('Profiles|Expires')
%th= _('Actions')
%th.gl-text-right= _('Actions')
= render partial: 'user_settings/ssh_keys/key', collection: @keys, locals: { is_admin: is_admin }
- else
- if is_admin

View File

@ -1,32 +1,22 @@
- page_title _('SSH Keys')
- add_page_specific_style 'page_bundles/profile'
- @force_desktop_expanded_sidebar = true
- add_form_class = 'gl-hidden' if !form_errors(@key)
- hide_class = 'gl-hidden' if form_errors(@key)
.settings-section.js-search-settings-section
.settings-sticky-header
.settings-sticky-header-inner
%h4.gl-my-0
= page_title
%p.gl-text-secondary
= render ::Layouts::SettingsSectionComponent.new(page_title) do |c|
- c.with_description do
= _('SSH keys allow you to establish a secure connection between your computer and GitLab.')
- config_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_instance_configuration_url }
= html_escape(s_('SSH fingerprints verify that the client is connecting to the correct host. Check the %{config_link_start}current instance configuration%{config_link_end}.')) % { config_link_start: config_link_start, config_link_end: '</a>'.html_safe }
= render Pajamas::CardComponent.new(card_options: { class: 'gl-new-card js-toggle-container' }, header_options: { class: 'gl-new-card-header' }, body_options: { class: 'gl-new-card-body gl-px-0' }) do |c|
- c.with_header do
.gl-new-card-title-wrapper
%h3.gl-new-card-title
= _('Your SSH keys')
.gl-new-card-count
= sprite_icon('key', css_class: 'gl-mr-2')
= @keys.count
.gl-new-card-actions
= render Pajamas::ButtonComponent.new(size: :small, button_options: { class: "js-toggle-button js-toggle-content #{hide_class}" }) do
= _('Add new key')
- c.with_body do
.gl-new-card-add-form.gl-m-3.js-toggle-content{ class: add_form_class }
- c.with_body do
= render ::Layouts::CrudComponent.new(_('Your SSH keys'),
icon: 'key',
count: @keys.count,
toggle_text: _('Add new key'),
toggle_options: { class: hide_class },
form_options: { form_errors: form_errors(@key) }) do |c|
- c.with_form do
%h4.gl-mt-0
= _('Add an SSH key')
%p
@ -34,4 +24,5 @@
= _('Add an SSH key for secure access to GitLab. %{help_link_start}Learn more%{help_link_end}.').html_safe % {help_link_start: help_link_start, help_link_end: '</a>'.html_safe }
= render 'form'
= render 'key_table', hide_class: hide_class
- c.with_body do
= render 'key_table'

View File

@ -1,8 +0,0 @@
---
name: json_wrapper_legacy_mode
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30849
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/369436
milestone: '13.0'
type: development
group: group::source code
default_enabled: true

View File

@ -0,0 +1,38 @@
# frozen_string_literal: true
class DropCodeSuggestionDailyUsagesTable < ClickHouse::Migration
def up
execute <<~SQL
DROP VIEW IF EXISTS code_suggestion_daily_usages_mv
SQL
execute <<~SQL
DROP TABLE IF EXISTS code_suggestion_daily_usages
SQL
end
def down
execute <<~SQL
CREATE TABLE IF NOT EXISTS code_suggestion_daily_usages
(
user_id UInt64 DEFAULT 0,
timestamp Date32 DEFAULT toDate(now64()),
) ENGINE = ReplacingMergeTree
PARTITION BY toYear(timestamp)
ORDER BY (user_id, timestamp)
SETTINGS index_granularity = 64
SQL
execute <<~SQL
CREATE MATERIALIZED VIEW code_suggestion_daily_usages_mv
TO code_suggestion_daily_usages
AS
SELECT
user_id,
timestamp
FROM code_suggestion_usages
WHERE event IN (1, 2, 5)
GROUP BY user_id, timestamp
SQL
end
end

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
class AddProjectIdToMergeRequestDiffCommitsB5377a7a34 < Gitlab::Database::Migration[2.2]
milestone '17.3'
def up
add_column :merge_request_diff_commits_b5377a7a34, :project_id, :bigint
end
def down
remove_column :merge_request_diff_commits_b5377a7a34, :project_id
end
end

View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
class PrepareIndexMergeRequestDiffCommitsB5377a7a34OnProjectId < Gitlab::Database::Migration[2.2]
milestone '17.3'
disable_ddl_transaction!
INDEX_NAME = 'index_merge_request_diff_commits_b5377a7a34_on_project_id'
def up
prepare_async_index :merge_request_diff_commits_b5377a7a34, :project_id, name: INDEX_NAME
end
def down
unprepare_async_index :merge_request_diff_commits_b5377a7a34, INDEX_NAME
end
end

View File

@ -0,0 +1 @@
13f2a6dc299a6c88a90f68c430fa268a11a0605f7fb9cc8fa26c05fec747b309

View File

@ -0,0 +1 @@
32446f048c0fdbc4fa4d8fc2443fcf4835df2133a9ad813b29b8f5cb883b780c

View File

@ -2531,7 +2531,8 @@ CREATE TABLE merge_request_diff_commits_b5377a7a34 (
commit_author_id bigint,
committer_id bigint,
merge_request_diff_id bigint NOT NULL,
relative_order integer NOT NULL
relative_order integer NOT NULL,
project_id bigint
)
PARTITION BY RANGE (merge_request_diff_id);

View File

@ -13,4 +13,4 @@ extends: spelling
message: "Check the spelling of '%s'. If the spelling is correct, ask a Technical Writer to add this word to the spelling exception list."
level: warning
ignore:
- gitlab/spelling-exceptions.txt
- gitlab_base/spelling-exceptions.txt

View File

@ -35,11 +35,11 @@ In Active Directory, a user is marked as disabled/blocked if the user
account control attribute (`userAccountControl:1.2.840.113556.1.4.803`)
has bit 2 set.
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
For more information, see [Bitmask Searches in LDAP](https://ctovswild.com/2009/09/03/bitmask-searches-in-ldap/).
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
The process also updates the following user information:

View File

@ -19,7 +19,7 @@ This section contains a journal of validation tests and links to the relevant is
The following are GitLab upgrade validation tests we performed.
<!-- vale gitlab.OutdatedVersions = NO -->
<!-- vale gitlab_base.OutdatedVersions = NO -->
### July 2020

View File

@ -14,12 +14,12 @@ If you run a self-managed instance with 50 or more users on the Free tier
([either Community Edition or unlicensed Enterprise Edition](https://about.gitlab.com/install/ce-or-ee/)),
you can request a free instance review.
<!-- vale gitlab.FutureTense = NO -->
<!-- vale gitlab_base.FutureTense = NO -->
After you submit the request, a GitLab team member will review your instance
details and contact you with suggestions to improve your use of GitLab.
<!-- vale gitlab.FutureTense = YES -->
<!-- vale gitlab_base.FutureTense = YES -->
To request an instance review:

View File

@ -46,7 +46,7 @@ types out of the box. For a complete list, see the [Kroki installation docs](htt
Supported diagram types include:
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
- [Bytefield](https://bytefield-svg.deepsymmetry.org/bytefield-svg/intro.html)
- [D2](https://d2lang.com/tour/intro/)
@ -64,7 +64,7 @@ Supported diagram types include:
- [Vega-Lite](https://github.com/vega/vega-lite)
- [WaveDrom](https://wavedrom.com/)
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
If you want to use additional diagram libraries,
read the [Kroki installation](https://docs.kroki.io/kroki/setup/install/#_images) to learn how to start Kroki companion containers.
@ -172,11 +172,11 @@ Rel(banking_system, mainframe, "Uses")
![C4 PlantUML diagram](../img/kroki_c4_diagram.png)
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
**Nomnoml**
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
```plaintext
[nomnoml]

View File

@ -1157,13 +1157,13 @@ For Linux package installations, Redis logs are in `/var/log/gitlab/redis/curren
For Linux package installations, Alertmanager logs are in `/var/log/gitlab/alertmanager/current`.
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
## crond logs
For Linux package installations, crond logs are in `/var/log/gitlab/crond/`.
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
## Grafana logs

View File

@ -195,11 +195,11 @@ You can then view the database details for this request:
![Select request ID from request selector drop down menu](img/select-request-id-from-request-selector-drop-down-menu_v14_3.png)
<!-- vale gitlab.Substitutions = NO -->
<!-- vale gitlab_base.Substitutions = NO -->
1. Select the `pg` link in the Progress Bar to view the database queries executed by the API request:
![View pg database details](img/view-pg-details_v14_3.png)
<!-- vale gitlab.Substitutions = YES -->
<!-- vale gitlab_base.Substitutions = YES -->
The database query dialog is displayed:

View File

@ -35,7 +35,7 @@ The package registry supports the following formats:
The below table lists formats that are not supported, but are accepting Community contributions for. Consider contributing to GitLab. This [development documentation](../../development/packages/index.md)
guides you through the process.
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
| Format | Status |
| ------ | ------ |
@ -53,7 +53,7 @@ guides you through the process.
| Terraform | [Draft: Merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18834) |
| Vagrant | [#36899](https://gitlab.com/gitlab-org/gitlab/-/issues/36899) |
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
## Rate limits

View File

@ -267,7 +267,7 @@ decrypted, you can pass a `VERBOSE` environment variable:
**Example verbose output**
<!-- vale gitlab.SentenceSpacing = NO -->
<!-- vale gitlab_base.SentenceSpacing = NO -->
```plaintext
I, [2020-06-11T17:17:54.951815 #27148] INFO -- : Checking encrypted values in the database
@ -283,7 +283,7 @@ I, [2020-06-11T17:18:15.575678 #27148] INFO -- : Total: 1 row(s) affected
I, [2020-06-11T17:18:15.575711 #27148] INFO -- : Done!
```
<!-- vale gitlab.SentenceSpacing = YES -->
<!-- vale gitlab_base.SentenceSpacing = YES -->
## Reset encrypted tokens when they can't be recovered

View File

@ -130,11 +130,11 @@ idle_in_transaction_session_timeout = 60s
Quoting from issue [#30528](https://gitlab.com/gitlab-org/gitlab/-/issues/30528):
<!-- vale gitlab.FutureTense = NO -->
<!-- vale gitlab_base.FutureTense = NO -->
> "If a deadlock is hit, and we resolve it through aborting the transaction after a short period, then the retry mechanisms we already have will make the deadlocked piece of work try again, and it's unlikely we'll deadlock multiple times in a row."
<!-- vale gitlab.FutureTense = YES -->
<!-- vale gitlab_base.FutureTense = YES -->
NOTE:
In Support, our general approach to reconfiguring timeouts (applies also to the

View File

@ -14,7 +14,7 @@ DETAILS:
[Badges](../user/project/badges.md) support placeholders that are replaced in real time in both the link and image URL. The allowed placeholders are:
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
- **%{project_path}**: replaced by the project path.
- **%{project_title}**: replaced by the project title.
@ -28,7 +28,7 @@ DETAILS:
- **%{commit_sha}**: replaced by the project's last commit SHA.
- **%{latest_tag}**: replaced by the project's last tag.
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
Because these endpoints aren't inside a project's context, the information used to replace the placeholders comes
from the first group's project by creation date. If the group hasn't got any project the original URL with the placeholders is returned.

View File

@ -14,7 +14,7 @@ DETAILS:
[Badges](../user/project/badges.md) support placeholders that are replaced in real-time in both the link and image URL. The allowed placeholders are:
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
- **%{project_path}**: Replaced by the project path.
- **%{project_title}**: Replaced by the project title.
@ -28,7 +28,7 @@ DETAILS:
- **%{commit_sha}**: Replaced by the project's last commit SHA.
- **%{latest_tag}**: Replaced by the project's last tag.
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
## List all badges of a project

View File

@ -668,7 +668,7 @@ and is maintained by users verified by GitLab:
GitLab partners can contact a member of the GitLab Partner Alliance to have their
namespace flagged as GitLab-verified. Then any CI/CD components located in the
namespace are badged as GitLab Parner components. The Partner Alliance member
namespace are badged as GitLab Partner components. The Partner Alliance member
creates an internal request issue on behalf of the verified partner:
`https://gitlab.com/gitlab-com/support/internal-requests/-/issues/new?issuable_template=CI%20Catalog%20Badge%20Request`.

View File

@ -54,7 +54,7 @@ If the tooling has changed after these samples were created, or if the tooling w
the regex might not work. Test the regex carefully to make sure it correctly finds the
coverage in the tool's output:
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
<!-- markdownlint-disable MD056 -->
| Name | Language | Command | Example |
@ -77,7 +77,7 @@ coverage in the tool's output:
| tarpaulin | Rust | None | `/^\d+.\d+% coverage/` |
| Pester | PowerShell | None | `/Covered (\d+\.\d+%)/` |
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
<!-- markdownlint-enable MD056 -->
### View history of project code coverage

View File

@ -200,13 +200,13 @@ Second command line.
When you omit the `>` or `|` block scalar indicators, GitLab concatenates non-empty
lines to form the command. Make sure the lines can run when concatenated.
<!-- vale gitlab.MeaningfulLinkWords = NO -->
<!-- vale gitlab_base.MeaningfulLinkWords = NO -->
[Shell here documents](https://en.wikipedia.org/wiki/Here_document) work with the
`|` and `>` operators as well. The example below transliterates lower case letters
to upper case:
<!-- vale gitlab.MeaningfulLinkWords = YES -->
<!-- vale gitlab_base.MeaningfulLinkWords = YES -->
```yaml
job:
@ -463,8 +463,6 @@ script:
This fails as the indentation causes the line breaks to be preserved:
<!-- vale gitlab.CurlStringsQuoted = NO -->
```plaintext
$ RESULT=$(curl --silent # collapsed multi-line command
curl: no URL specified!
@ -473,8 +471,6 @@ curl: try 'curl --help' or 'curl --manual' for more information
/bin/bash: line 150: https://gitlab.example.com/api/v4/job: No such file or directory
```
<!-- vale gitlab.CurlStringsQuoted = YES -->
Resolve this by either:
- Removing the extra indentation:

View File

@ -24,13 +24,13 @@ possible.
## How GitLab implements GraphQL
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
We use the [GraphQL Ruby gem](https://graphql-ruby.org/) written by [Robert Mosolgo](https://github.com/rmosolgo/).
In addition, we have a subscription to [GraphQL Pro](https://graphql.pro/). For
details see [GraphQL Pro subscription](graphql_guide/graphql_pro.md).
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
All GraphQL queries are directed to a single endpoint
([`app/controllers/graphql_controller.rb#execute`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app%2Fcontrollers%2Fgraphql_controller.rb)),

View File

@ -6,11 +6,11 @@ info: Any user with at least the Maintainer role can merge updates to this conte
# Generating chaos in a test GitLab instance
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
As [Werner Vogels](https://twitter.com/Werner), the CTO at Amazon Web Services, famously put it, **Everything fails, all the time**.
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
As a developer, it's as important to consider the failure modes in which your software may operate as much as typical operation. Doing so can mean the difference between a minor hiccup leading to a scattering of `500` errors experienced by a tiny fraction of users, and a full site outage that affects all users for an extended period.

View File

@ -158,11 +158,11 @@ See the dedicated [Shell scripting standards and style guidelines](../shell_scri
## Markdown
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
We're following [Ciro Santilli's Markdown Style Guide](https://cirosantilli.com/markdown-style-guide/).
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
## Documentation

View File

@ -13,14 +13,14 @@ for details on setup and further explanation.
Quoting from the [MergeTree documentation](https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-multiple-volumes):
<!-- vale gitlab.Simplicity = NO -->
<!-- vale gitlab_base.Simplicity = NO -->
> MergeTree family table engines can store data on multiple block devices. For example,
> it can be useful when the data of a certain table are implicitly split into "hot" and "cold".
> The most recent data is regularly requested but requires only a small amount of space.
> On the contrary, the fat-tailed historical data is requested rarely.
<!-- vale gitlab.Simplicity = YES -->
<!-- vale gitlab_base.Simplicity = YES -->
When used with remote storage backends such as
[Amazon S3](https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-s3),

View File

@ -301,7 +301,7 @@ especially in tutorials, instructional documentation, and
Some contractions, however, should be avoided:
<!-- vale gitlab.Possessive = NO -->
<!-- vale gitlab_base.Possessive = NO -->
| Do not use a contraction | Example | Use instead |
|-------------------------------|--------------------------------------------------|------------------------------------------------------------------|
@ -310,7 +310,7 @@ Some contractions, however, should be avoided:
| In reference documentation | **Don't** set a limit. | **Do not** set a limit. |
| In error messages | Requests to localhost **aren't** allowed. | Requests to localhost **are not** allowed. |
<!-- vale gitlab.Possessive = YES -->
<!-- vale gitlab_base.Possessive = YES -->
### Possessives
@ -382,11 +382,11 @@ when published. Example:
### Emphasis
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
Use **bold** rather than italic to provide emphasis. GitLab uses a sans-serif font and italic text does not stand out as much as it would in a serif font. For details, see [Butterick's Practical Typography guide on bold or italic](https://practicaltypography.com/bold-or-italic.html).
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
You can use italics when you are introducing a term for the first time. Otherwise, use bold.
@ -398,12 +398,12 @@ You can use italics when you are introducing a term for the first time. Otherwis
Follow these guidelines for punctuation.
<!-- vale gitlab.Repetition = NO -->
<!-- vale gitlab_base.Repetition = NO -->
- End full sentences with a period, including full sentences in tables.
- Use serial (Oxford) commas before the final **and** or **or** in a list of three or more items. (Tested in [`OxfordComma.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/OxfordComma.yml).)
<!-- vale gitlab.Repetition = YES -->
<!-- vale gitlab_base.Repetition = YES -->
When spacing content:
@ -411,7 +411,7 @@ When spacing content:
- Do not use non-breaking spaces. Use standard spaces instead. (Tested in [`lint-doc.sh`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/scripts/lint-doc.sh).)
- Do not use tabs for indentation. Use spaces instead. You can configure your code editor to output spaces instead of tabs when pressing the <kbd>Tab</kbd> key.
<!-- vale gitlab.NonStandardQuotes = NO -->
<!-- vale gitlab_base.NonStandardQuotes = NO -->
Do not use these punctuation characters:
@ -419,7 +419,7 @@ Do not use these punctuation characters:
- `` (en dash) or `—` (em dash): Use separate sentences, or commas, instead.
- `“` `”` `` ``: Double or single typographer's ("curly") quotation marks. Use straight quotes instead. (Tested in [`NonStandardQuotes.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/NonStandardQuotes.yml).)
<!-- vale gitlab.NonStandardQuotes = YES -->
<!-- vale gitlab_base.NonStandardQuotes = YES -->
### Placeholder text

View File

@ -217,8 +217,18 @@ synchronized to the other projects. In each of the [supported projects](#support
```shell
# Copy markdownlint configuration file
cp ../gitlab/.markdownlint-cli2.yaml .
# Copy Vale configuration files for a project with documentation stored in 'docs' directory
cp -r ../gitlab/doc/.vale docs
# Remove existing Vale configuration in case some rules have been removed from the GitLab project
rm -r docs/.vale/gitlab
# Copy gitlab_base Vale configuration files for a project with documentation stored in 'docs' directory
cp -r ../gitlab/doc/.vale/gitlab_base docs/.vale
```
1. If updating `gitlab-runner`, `gitlab-omnibus`, `charts/gitlab`, or `gitlab-operator`, also copy the `gitlab-docs`
Vale configuration from the `gitlab` project. For example, in the root directory of the project, run:
```shell
# Copy gitlab-docs Vale configuration files for a project with documentation stored in 'docs' directory
cp -r ../gitlab/doc/.vale/gitlab_docs docs/.vale
```
1. Review the diff created for `.markdownlint-cli2.yaml`. For example, run:

View File

@ -174,10 +174,9 @@ vale --no-wrap --filter='.Name=="gitlab.OutdatedVersions"' doc/**/*.md
You can disable a specific Vale linting rule or all Vale linting rules for any portion of a
document:
- To disable a specific rule, add a `<!-- vale gitlab.rulename = NO -->` tag before the text, and a
`<!-- vale gitlab.rulename = YES -->` tag after the text, replacing `rulename` with the filename of a test in the
[GitLab styles](https://gitlab.com/gitlab-org/gitlab/-/tree/master/doc/.linting/vale/styles/gitlab)
directory.
- To disable a specific rule, add a `<!-- vale gitlab_<type>.rulename = NO -->` tag before the text, and a
`<!-- vale gitlab_<type>.rulename = YES -->` tag after the text, replacing `rulename` with the filename of a test in the
directory of one of the [GitLab styles](https://gitlab.com/gitlab-org/gitlab/-/tree/master/doc/.vale).
- To disable all Vale linting rules, add a `<!-- vale off -->` tag before the text, and a
`<!-- vale on -->` tag after the text.

View File

@ -17,7 +17,7 @@ info: Any user with at least the Maintainer role can merge updates to this conte
**GraphQL at GitLab**:
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
- <i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [GitLab Unfiltered GraphQL playlist](https://www.youtube.com/watch?v=wHPKZBDMfxE&list=PL05JrBw4t0KpcjeHjaRMB7IGB2oDWyJzv)
- <i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [GraphQL at GitLab: Deep Dive](../api_graphql_styleguide.md#deep-dive) (video) by Nick Thomas
@ -30,7 +30,7 @@ info: Any user with at least the Maintainer role can merge updates to this conte
- [🛠 Vuex -> Apollo Migration: a proof-of-concept project](https://gitlab.com/ntepluhina/vuex-to-apollo/blob/master/README.md)
- A collection of examples that show the possible approaches for state management with Vue+GraphQL+(Vuex or Apollo) apps
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
### Libraries
@ -47,11 +47,11 @@ see [Immutability and cache updates](#immutability-and-cache-updates) for more i
### Tooling
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
- [Apollo Client Devtools](https://github.com/apollographql/apollo-client-devtools)
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
#### Apollo GraphQL VS Code extension

View File

@ -13,11 +13,11 @@ across the GitLab frontend team.
GitLab is built on top of [Ruby on Rails](https://rubyonrails.org). It uses [Haml](https://haml.info/) and a JavaScript-based frontend with [Vue.js](https://vuejs.org). If you are not sure when to use Vue on top of Haml-page, read [this explanation](vue.md#when-to-add-vue-application).
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
Be wary of [the limitations that come with using Hamlit](https://github.com/k0kubun/hamlit/blob/master/REFERENCE.md#limitations).
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
When it comes to CSS, we use a utils-based CSS approach. GitLab has its own CSS utils which are packaged inside the `gitlab-ui` project and can be seen [in the repository](https://gitlab.com/gitlab-org/gitlab-ui/-/tree/main/src/scss/utility-mixins) or on [UNPKG](https://unpkg.com/browse/@gitlab/ui@latest/src/scss/utility-mixins/). Favor using these before adding or using any SCSS classes.

View File

@ -227,7 +227,7 @@ When writing code for real-time features we have to keep a couple of things in m
Thus, we must strike a balance between sending requests and the feeling of real-time.
Use the following rules when creating real-time solutions.
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
1. The server tells you how much to poll by sending `Poll-Interval` in the header.
Use that as your polling interval. This enables system administrators to change the
@ -241,7 +241,7 @@ Use the following rules when creating real-time solutions.
1. The backend code is likely to be using ETags. You do not and should not check for status
`304 Not Modified`. The browser transforms it for you.
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
### Lazy Loading Images

View File

@ -11,7 +11,7 @@ Workhorse and GitLab Shell.
## Deep Dive
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
In May 2019, Bob Van Landuyt
hosted a Deep Dive (GitLab team members only: `https://gitlab.com/gitlab-org/create-stage/-/issues/1`)
@ -19,7 +19,7 @@ on the [Gitaly project](https://gitlab.com/gitlab-org/gitaly). It included how t
Ruby developer, and shared domain-specific knowledge with anyone who may work in this part of the
codebase in the future.
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
You can find the <i class="fa fa-youtube-play youtube" aria-hidden="true"></i> [recording on YouTube](https://www.youtube.com/watch?v=BmlEWFS8ORo), and the slides
on [Google Slides](https://docs.google.com/presentation/d/1VgRbiYih9ODhcPnL8dS0W98EwFYpJ7GXMPpX-1TM6YE/edit)

View File

@ -5,7 +5,7 @@ info: Any user with at least the Maintainer role can merge updates to this conte
description: "Development guidelines for GitLab Flavored Markdown (GLFM)."
---
<!-- vale gitlab.GitLabFlavoredMarkdown = NO -->
<!-- vale gitlab_base.GitLabFlavoredMarkdown = NO -->
# GitLab Flavored Markdown (GLFM) development guidelines

View File

@ -5,7 +5,7 @@ info: Any user with at least the Maintainer role can merge updates to this conte
description: "Specification guide for GitLab Flavored Markdown (GLFM)."
---
<!-- vale gitlab.GitLabFlavoredMarkdown = NO -->
<!-- vale gitlab_base.GitLabFlavoredMarkdown = NO -->
# GitLab Flavored Markdown (GLFM) Specification Guide
@ -252,7 +252,7 @@ because of this comprehensive style.
Regarding the terminology used for Markdown snapshot testing:
<!-- vale gitlab.InclusiveLanguage = NO -->
<!-- vale gitlab_base.InclusiveLanguage = NO -->
1. The Markdown snapshot tests can be considered a form of the
[Golden Master Testing approach](https://www.google.com/search?q=golden+master+testing),
@ -286,7 +286,7 @@ Regarding the terminology used for Markdown snapshot testing:
it simpler and more understandable to have everything under the `glfm_specification` directory
rather than splitting these files into the `spec/fixtures` directory.
<!-- vale gitlab.InclusiveLanguage = YES -->
<!-- vale gitlab_base.InclusiveLanguage = YES -->
See also the section on [normalization](#normalization) below, which is an important concept used
in the Markdown snapshot testing.

View File

@ -11,7 +11,7 @@ are very appreciative of the work done by translators and proofreaders!
## Proofreaders
<!-- vale gitlab.Spelling = NO -->
<!-- vale gitlab_base.Spelling = NO -->
- Albanian
- Proofreaders needed.
@ -112,7 +112,7 @@ are very appreciative of the work done by translators and proofreaders!
- Andrew Vityuk - [GitLab](https://gitlab.com/3_1_3_u), [Crowdin](https://crowdin.com/profile/andruwa13)
- Welsh
- Proofreaders needed.
<!-- vale gitlab.Spelling = YES -->
<!-- vale gitlab_base.Spelling = YES -->
## Become a proofreader

Some files were not shown because too many files have changed in this diff Show More