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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 03:10:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 03:10:15 +0300
commit46aea02972d6caaf34a11689e9e6ccfa9dcb538a (patch)
tree5e4e71724bdab97d6d3f57ed25e11e0c516383fb
parent83d921d51bd5bf8bd0ecd078706d7c037fb711cb (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.rubocop_manual_todo.yml2
-rw-r--r--app/assets/javascripts/diffs/components/diff_row.vue2
-rw-r--r--app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue139
-rw-r--r--app/assets/stylesheets/snippets.scss1
-rw-r--r--app/experiments/application_experiment.rb13
-rw-r--r--app/models/integration.rb5
-rw-r--r--app/models/project.rb14
-rw-r--r--config/feature_flags/development/introduce_marker_ranges.yml8
-rw-r--r--doc/ci/runners/README.md32
-rw-r--r--doc/development/architecture.md4
-rw-r--r--doc/development/code_review.md8
-rw-r--r--doc/development/contributing/issue_workflow.md2
-rw-r--r--doc/development/contributing/merge_request_workflow.md8
-rw-r--r--doc/development/diffs.md18
-rw-r--r--doc/development/documentation/index.md5
-rw-r--r--doc/development/documentation/site_architecture/deployment_process.md6
-rw-r--r--doc/development/documentation/site_architecture/index.md4
-rw-r--r--doc/development/documentation/styleguide/index.md2
-rw-r--r--doc/development/feature_flags/index.md10
-rw-r--r--doc/development/migration_style_guide.md6
-rw-r--r--doc/development/new_fe_guide/development/performance.md2
-rw-r--r--doc/development/pipelines.md10
-rw-r--r--doc/development/rake_tasks.md4
-rw-r--r--doc/development/testing_guide/best_practices.md4
-rw-r--r--doc/development/testing_guide/ci.md4
-rw-r--r--doc/development/testing_guide/end_to_end/feature_flags.md2
-rw-r--r--doc/development/testing_guide/flaky_tests.md4
-rw-r--r--doc/topics/autodevops/index.md4
-rw-r--r--doc/topics/autodevops/quick_start_guide.md5
-rw-r--r--doc/topics/git/lfs/migrate_to_git_lfs.md4
-rw-r--r--doc/user/clusters/agent/index.md2
-rw-r--r--doc/user/clusters/applications.md11
-rw-r--r--doc/user/clusters/cost_management.md2
-rw-r--r--doc/user/clusters/integrations.md4
-rw-r--r--doc/user/clusters/management_project.md2
-rw-r--r--doc/user/infrastructure/terraform_state.md7
-rw-r--r--doc/user/project/clusters/add_eks_clusters.md2
-rw-r--r--doc/user/project/clusters/add_gke_clusters.md3
-rw-r--r--doc/user/project/clusters/add_remove_clusters.md9
-rw-r--r--doc/user/project/clusters/serverless/index.md6
-rw-r--r--doc/user/project/merge_requests/versions.md2
-rw-r--r--doc/user/project/wiki/img/content_editor_v14.0.pngbin9635 -> 13771 bytes
-rw-r--r--doc/user/project/wiki/img/use_new_editor_button_v14.0.pngbin20030 -> 16719 bytes
-rw-r--r--doc/user/project/wiki/index.md16
-rw-r--r--lib/gitlab/auth.rb17
-rw-r--r--lib/gitlab/diff/highlight.rb6
-rw-r--r--lib/gitlab/diff/highlight_cache.rb1
-rw-r--r--locale/gitlab.pot30
-rw-r--r--spec/controllers/projects/service_hook_logs_controller_spec.rb8
-rw-r--r--spec/docs_screenshots/wiki_docs.rb12
-rw-r--r--spec/factories/integrations.rb2
-rw-r--r--spec/frontend/pages/shared/wikis/components/wiki_form_spec.js39
-rw-r--r--spec/graphql/types/projects/service_type_spec.rb2
-rw-r--r--spec/lib/gitlab/auth_spec.rb4
-rw-r--r--spec/lib/gitlab/diff/highlight_cache_spec.rb16
-rw-r--r--spec/lib/gitlab/diff/highlight_spec.rb20
-rw-r--r--spec/lib/gitlab/import_export/all_models.yml6
-rw-r--r--spec/models/integrations/drone_ci_spec.rb10
-rw-r--r--spec/models/project_spec.rb6
-rw-r--r--spec/presenters/service_hook_presenter_spec.rb8
-rw-r--r--spec/presenters/web_hook_log_presenter_spec.rb12
-rw-r--r--spec/support/shared_contexts/features/integrations/integrations_shared_context.rb12
-rw-r--r--spec/views/projects/services/edit.html.haml_spec.rb2
63 files changed, 324 insertions, 287 deletions
diff --git a/.rubocop_manual_todo.yml b/.rubocop_manual_todo.yml
index be5f70a3c03..dcd6dcf4062 100644
--- a/.rubocop_manual_todo.yml
+++ b/.rubocop_manual_todo.yml
@@ -29,8 +29,6 @@ Graphql/Descriptions:
# WIP: See https://gitlab.com/gitlab-org/gitlab/-/issues/220040
Rails/SaveBang:
Exclude:
- - 'ee/spec/controllers/projects/merge_requests_controller_spec.rb'
- - 'ee/spec/controllers/subscriptions_controller_spec.rb'
- 'ee/spec/initializers/fog_google_https_private_urls_spec.rb'
- 'ee/spec/lib/analytics/merge_request_metrics_calculator_spec.rb'
- 'ee/spec/lib/ee/gitlab/auth/ldap/sync/group_spec.rb'
diff --git a/app/assets/javascripts/diffs/components/diff_row.vue b/app/assets/javascripts/diffs/components/diff_row.vue
index 74b97ef01f9..37dd7941b2e 100644
--- a/app/assets/javascripts/diffs/components/diff_row.vue
+++ b/app/assets/javascripts/diffs/components/diff_row.vue
@@ -288,6 +288,7 @@ export default {
<div class="diff-td line-codequality left-side" :class="[...parallelViewLeftLineType]">
<code-quality-gutter-icon
v-if="showCodequalityLeft"
+ :file-path="filePath"
:codequality="line.left.codequality"
/>
</div>
@@ -403,6 +404,7 @@ export default {
>
<code-quality-gutter-icon
v-if="showCodequalityRight"
+ :file-path="filePath"
:codequality="line.right.codequality"
/>
</div>
diff --git a/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue b/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue
index 8b7e894667a..26f6d1d683a 100644
--- a/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue
+++ b/app/assets/javascripts/pages/shared/wikis/components/wiki_form.vue
@@ -62,21 +62,30 @@ export default {
),
primaryAction: s__('WikiPage|Retry'),
},
- useNewEditor: s__('WikiPage|Use new editor'),
+ useNewEditor: {
+ primaryLabel: s__('WikiPage|Use the new editor'),
+ secondaryLabel: s__('WikiPage|Try this later'),
+ title: s__('WikiPage|Get a richer editing experience'),
+ text: s__(
+ "WikiPage|Try the new visual Markdown editor. Read the %{linkStart}documentation%{linkEnd} to learn what's currently supported.",
+ ),
+ },
switchToOldEditor: {
- label: s__('WikiPage|Switch to old editor'),
- helpText: s__("WikiPage|Switching will discard any changes you've made in the new editor."),
+ label: s__('WikiPage|Switch me back to the classic editor.'),
+ helpText: s__(
+ "WikiPage|This editor is in beta and may not display the page's contents properly. Switching back to the classic editor will discard changes you've made in the new editor.",
+ ),
modal: {
- title: s__('WikiPage|Are you sure you want to switch to the old editor?'),
- primary: s__('WikiPage|Switch to old editor'),
+ title: s__('WikiPage|Are you sure you want to switch back to the classic editor?'),
+ primary: s__('WikiPage|Switch to classic editor'),
cancel: s__('WikiPage|Keep editing'),
text: s__(
- "WikiPage|Switching to the old editor will discard any changes you've made in the new editor.",
+ "WikiPage|Switching to the classic editor will discard any changes you've made in the new editor.",
),
},
},
- helpText: s__(
- "WikiPage|This editor is in beta and may not display the page's contents properly.",
+ feedbackTip: s__(
+ 'Tell us your experiences with the new Markdown editor %{linkStart}in this feedback issue%{linkEnd}.',
),
},
linksHelpText: s__(
@@ -95,6 +104,7 @@ export default {
},
cancel: s__('WikiPage|Cancel'),
},
+ contentEditorFeedbackIssue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/332629',
components: {
GlAlert,
GlForm,
@@ -120,6 +130,7 @@ export default {
title: this.pageInfo.title?.trim() || '',
format: this.pageInfo.format || 'markdown',
content: this.pageInfo.content || '',
+ isContentEditorAlertDismissed: false,
isContentEditorLoading: true,
useContentEditor: false,
commitMessage: '',
@@ -170,11 +181,14 @@ export default {
wikiSpecificMarkdownHelpPath() {
return setUrlFragment(this.pageInfo.markdownHelpPath, 'wiki-specific-markdown');
},
+ contentEditorHelpPath() {
+ return setUrlFragment(this.pageInfo.helpPath, 'gitlab-flavored-markdown-support');
+ },
isMarkdownFormat() {
return this.format === 'markdown';
},
- showContentEditorButton() {
- return this.isMarkdownFormat && !this.useContentEditor;
+ showContentEditorAlert() {
+ return this.isMarkdownFormat && !this.useContentEditor && !this.isContentEditorAlertDismissed;
},
disableSubmitButton() {
return this.noContent || !this.title || this.contentEditorRenderFailed;
@@ -276,15 +290,19 @@ export default {
}
},
- async trackContentEditorLoaded() {
- await this.track(CONTENT_EDITOR_LOADED_ACTION);
+ trackContentEditorLoaded() {
+ this.track(CONTENT_EDITOR_LOADED_ACTION);
},
- async trackFormSubmit() {
+ trackFormSubmit() {
if (this.isContentEditorActive) {
- await this.track(SAVED_USING_CONTENT_EDITOR_ACTION);
+ this.track(SAVED_USING_CONTENT_EDITOR_ACTION);
}
},
+
+ dismissContentEditorAlert() {
+ this.isContentEditorAlertDismissed = true;
+ },
},
};
</script>
@@ -302,11 +320,9 @@ export default {
:dismissible="false"
variant="danger"
:primary-button-text="$options.i18n.contentEditor.renderFailed.primaryAction"
- @primaryAction="retryInitContentEditor()"
+ @primaryAction="retryInitContentEditor"
>
- <p>
- {{ $options.i18n.contentEditor.renderFailed.message }}
- </p>
+ {{ $options.i18n.contentEditor.renderFailed.message }}
</gl-alert>
<input :value="csrfToken" type="hidden" name="authenticity_token" />
@@ -364,46 +380,50 @@ export default {
{{ label }}
</option>
</select>
- <div>
- <gl-button
- v-if="showContentEditorButton"
- category="secondary"
- variant="confirm"
- class="gl-mt-4"
- @click="initContentEditor"
- >{{ $options.i18n.contentEditor.useNewEditor }}</gl-button
- >
- <div v-if="isContentEditorActive" class="gl-mt-4 gl-display-flex">
- <div class="gl-mr-4">
- <gl-button category="secondary" variant="confirm" @click="confirmSwitchToOldEditor">{{
- $options.i18n.contentEditor.switchToOldEditor.label
- }}</gl-button>
- </div>
- <div class="gl-mt-2">
- <gl-icon name="warning" />
- {{ $options.i18n.contentEditor.switchToOldEditor.helpText }}
- </div>
- </div>
- <gl-modal
- ref="confirmSwitchToOldEditorModal"
- modal-id="confirm-switch-to-old-editor"
- :title="$options.i18n.contentEditor.switchToOldEditor.modal.title"
- :action-primary="{ text: $options.i18n.contentEditor.switchToOldEditor.modal.primary }"
- :action-cancel="{ text: $options.i18n.contentEditor.switchToOldEditor.modal.cancel }"
- @primary="switchToOldEditor"
- >
- {{ $options.i18n.contentEditor.switchToOldEditor.modal.text }}
- </gl-modal>
- </div>
</div>
</div>
- <div class="form-group row">
+ <div class="form-group row" data-testid="wiki-form-content-fieldset">
<div class="col-sm-2 col-form-label">
<label class="control-label-full-width" for="wiki_content">{{
$options.i18n.content.label
}}</label>
</div>
<div class="col-sm-10">
+ <gl-alert
+ v-if="showContentEditorAlert"
+ class="gl-mb-6"
+ variant="info"
+ :primary-button-text="$options.i18n.contentEditor.useNewEditor.primaryLabel"
+ :secondary-button-text="$options.i18n.contentEditor.useNewEditor.secondaryLabel"
+ :dismiss-label="$options.i18n.contentEditor.useNewEditor.secondaryLabel"
+ :title="$options.i18n.contentEditor.useNewEditor.title"
+ @primaryAction="initContentEditor"
+ @secondaryAction="dismissContentEditorAlert"
+ @dismiss="dismissContentEditorAlert"
+ >
+ <gl-sprintf :message="$options.i18n.contentEditor.useNewEditor.text">
+ <template
+ #link="// eslint-disable-next-line vue/no-template-shadow
+ { content }"
+ ><gl-link
+ :href="contentEditorHelpPath"
+ target="_blank"
+ data-testid="content-editor-help-link"
+ >{{ content }}</gl-link
+ ></template
+ >
+ </gl-sprintf>
+ </gl-alert>
+ <gl-modal
+ ref="confirmSwitchToOldEditorModal"
+ modal-id="confirm-switch-to-old-editor"
+ :title="$options.i18n.contentEditor.switchToOldEditor.modal.title"
+ :action-primary="{ text: $options.i18n.contentEditor.switchToOldEditor.modal.primary }"
+ :action-cancel="{ text: $options.i18n.contentEditor.switchToOldEditor.modal.cancel }"
+ @primary="switchToOldEditor"
+ >
+ {{ $options.i18n.contentEditor.switchToOldEditor.modal.text }}
+ </gl-modal>
<markdown-field
v-if="!isContentEditorActive"
:markdown-preview-path="pageInfo.markdownPreviewPath"
@@ -434,6 +454,20 @@ export default {
</markdown-field>
<div v-if="isContentEditorActive">
+ <gl-alert class="gl-mb-6" variant="tip" :dismissable="false">
+ <gl-sprintf :message="$options.i18n.contentEditor.feedbackTip">
+ <template
+ #link="// eslint-disable-next-line vue/no-template-shadow
+ { content }"
+ ><gl-link
+ :href="$options.contentEditorFeedbackIssue"
+ target="_blank"
+ data-testid="wiki-markdown-help-link"
+ >{{ content }}</gl-link
+ ></template
+ >
+ </gl-sprintf>
+ </gl-alert>
<gl-loading-icon v-if="isContentEditorLoading" class="bordered-box gl-w-full gl-py-6" />
<content-editor v-else :content-editor="contentEditor" />
<input id="wiki_content" v-model.trim="content" type="hidden" name="wiki[content]" />
@@ -459,7 +493,10 @@ export default {
>
</gl-sprintf>
<span v-else>
- {{ $options.i18n.contentEditor.helpText }}
+ {{ $options.i18n.contentEditor.switchToOldEditor.helpText }}
+ <gl-button variant="link" @click="confirmSwitchToOldEditor">{{
+ $options.i18n.contentEditor.switchToOldEditor.label
+ }}</gl-button>
</span>
</div>
</div>
diff --git a/app/assets/stylesheets/snippets.scss b/app/assets/stylesheets/snippets.scss
index e5d5ed0d48f..ad040f65f3c 100644
--- a/app/assets/stylesheets/snippets.scss
+++ b/app/assets/stylesheets/snippets.scss
@@ -45,7 +45,6 @@
.blob-content {
pre {
- height: 100%;
padding: 10px;
border: 0;
border-radius: 0;
diff --git a/app/experiments/application_experiment.rb b/app/experiments/application_experiment.rb
index 93c94b0c16e..53ea8ea2d3a 100644
--- a/app/experiments/application_experiment.rb
+++ b/app/experiments/application_experiment.rb
@@ -16,11 +16,14 @@ class ApplicationExperiment < Gitlab::Experiment # rubocop:disable Gitlab/Namesp
track(:assignment) # track that we've assigned a variant for this context
- begin
- Gon.push({ experiment: { name => signature } }, true) # push the experiment data to the client
- rescue NoMethodError
- # means we're not in the request cycle, and can't add to Gon. Log a warning maybe?
- end
+ push_to_client
+ end
+
+ # push the experiment data to the client
+ def push_to_client
+ Gon.push({ experiment: { name => signature } }, true)
+ rescue NoMethodError
+ # means we're not in the request cycle, and can't add to Gon. Log a warning maybe?
end
def track(action, **event_args)
diff --git a/app/models/integration.rb b/app/models/integration.rb
index 5fd6036248b..238ecbbf209 100644
--- a/app/models/integration.rb
+++ b/app/models/integration.rb
@@ -43,8 +43,13 @@ class Integration < ApplicationRecord
asana assembla
bamboo bugzilla buildkite
campfire confluence custom_issue_tracker
+ datadog discord drone_ci
].to_set.freeze
+ def self.renamed?(name)
+ RENAMED_TO_INTEGRATION.include?(name)
+ end
+
serialize :properties, JSON # rubocop:disable Cop/ActiveRecordSerialize
attribute :type, Gitlab::Integrations::StiType.new
diff --git a/app/models/project.rb b/app/models/project.rb
index b24095ee9c8..f13fa46bf5b 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -146,6 +146,14 @@ class Project < ApplicationRecord
has_one :last_event, -> {order 'events.created_at DESC'}, class_name: 'Event'
has_many :boards
+ def self.integration_association_name(name)
+ if ::Integration.renamed?(name)
+ "#{name}_integration"
+ else
+ "#{name}_service"
+ end
+ end
+
# Project integrations
has_one :asana_integration, class_name: 'Integrations::Asana'
has_one :assembla_integration, class_name: 'Integrations::Assembla'
@@ -155,9 +163,9 @@ class Project < ApplicationRecord
has_one :campfire_integration, class_name: 'Integrations::Campfire'
has_one :confluence_integration, class_name: 'Integrations::Confluence'
has_one :custom_issue_tracker_integration, class_name: 'Integrations::CustomIssueTracker'
- has_one :datadog_service, class_name: 'Integrations::Datadog'
- has_one :discord_service, class_name: 'Integrations::Discord'
- has_one :drone_ci_service, class_name: 'Integrations::DroneCi'
+ has_one :datadog_integration, class_name: 'Integrations::Datadog'
+ has_one :discord_integration, class_name: 'Integrations::Discord'
+ has_one :drone_ci_integration, class_name: 'Integrations::DroneCi'
has_one :emails_on_push_service, class_name: 'Integrations::EmailsOnPush'
has_one :ewm_service, class_name: 'Integrations::Ewm'
has_one :external_wiki_service, class_name: 'Integrations::ExternalWiki'
diff --git a/config/feature_flags/development/introduce_marker_ranges.yml b/config/feature_flags/development/introduce_marker_ranges.yml
deleted file mode 100644
index de59cf0e906..00000000000
--- a/config/feature_flags/development/introduce_marker_ranges.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: introduce_marker_ranges
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55669
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/324068
-milestone: '13.10'
-type: development
-group: group::source code
-default_enabled: false
diff --git a/doc/ci/runners/README.md b/doc/ci/runners/README.md
index 97513b1fa99..b493da993ca 100644
--- a/doc/ci/runners/README.md
+++ b/doc/ci/runners/README.md
@@ -5,25 +5,19 @@ info: To determine the technical writer assigned to the Stage/Group associated w
type: reference
---
-# Runners
-
-In GitLab CI/CD, runners run the code defined in [`.gitlab-ci.yml`](../yaml/README.md).
-A runner is a lightweight, highly-scalable agent that picks up a CI job through
-the coordinator API of GitLab CI/CD, runs the job, and sends the result back to the GitLab instance.
-
-If you are using GitLab SaaS (GitLab.com), your CI jobs automatically run on shared runners. No configuration is required.
+# GitLab SaaS runners
If you are using self-managed GitLab or you want to use your own runners on GitLab.com, you can
[install and configure your own runners](https://docs.gitlab.com/runner/install/).
-## Runners on GitLab.com
-
-On GitLab.com, your jobs can run on [Linux](#linux-shared-runners) or [Windows](#windows-shared-runners-beta).
+If you are using GitLab SaaS (GitLab.com), your CI jobs automatically run on shared runners. No configuration is required.
+Your jobs can run on [Linux](#linux-shared-runners) or [Windows](#windows-shared-runners-beta).
-The shared runners provided by GitLab are limited by [shared runner pipeline minutes quotas](../../user/admin_area/settings/continuous_integration.md#shared-runners-pipeline-minutes-quota)
-for each GitLab [subscription plan](../../subscriptions/gitlab_com/index.md#ci-pipeline-minutes).
+The number of minutes you can use on these shared runners depends on your
+[quota](../../user/admin_area/settings/continuous_integration.md#shared-runners-pipeline-minutes-quota),
+which depends on your [subscription plan](../../subscriptions/gitlab_com/index.md#ci-pipeline-minutes).
-### Linux shared runners
+## Linux shared runners
Linux shared runners on GitLab.com run in autoscale mode and are powered by Google Cloud Platform.
@@ -51,7 +45,7 @@ Below are the shared runners settings.
| Default Docker image | `ruby:2.5` | - |
| `privileged` (run [Docker in Docker](https://hub.docker.com/_/docker/)) | `true` | `false` |
-#### Pre-clone script
+### Pre-clone script
Linux shared runners on GitLab.com provide a way to run commands in a CI
job before the runner attempts to run `git init` and `git fetch` to
@@ -71,7 +65,7 @@ To use this feature, define a [CI/CD variable](../../ci/variables/README.md#cust
demonstrates how you might use a pre-clone step to seed the build
directory.
-#### `config.toml`
+### `config.toml`
The full contents of our `config.toml` are:
@@ -143,7 +137,7 @@ sentry_dsn = "X"
BucketName = "bucket-name"
```
-### Windows shared runners (beta)
+## Windows shared runners (beta)
The Windows shared runners are in [beta](https://about.gitlab.com/handbook/product/gitlab-the-product/#beta)
and shouldn't be used for production workloads.
@@ -165,7 +159,7 @@ We want to keep iterating to get Windows shared runners in a stable state and
You can follow our work towards this goal in the
[related epic](https://gitlab.com/groups/gitlab-org/-/epics/2162).
-#### Configuration
+### Configuration
The full contents of our `config.toml` are:
@@ -228,7 +222,7 @@ VMTag = "windows"
Directory = "C:\\GitLab-Runner\\autoscaler\\machines"
```
-#### Example
+### Example
Below is a simple `.gitlab-ci.yml` file to show how to start using the
Windows shared runners:
@@ -264,7 +258,7 @@ test:
- echo "running scripts in the test job"
```
-#### Limitations and known issues
+### Limitations and known issues
- All the limitations mentioned in our [beta
definition](https://about.gitlab.com/handbook/product/#beta).
diff --git a/doc/development/architecture.md b/doc/development/architecture.md
index 67d5c02799b..9801b24fdd0 100644
--- a/doc/development/architecture.md
+++ b/doc/development/architecture.md
@@ -15,14 +15,14 @@ There are two software distributions of GitLab:
GitLab is available under [different subscriptions](https://about.gitlab.com/pricing/).
-New versions of GitLab are released from stable branches, and the `master` branch is used for
+New versions of GitLab are released from stable branches, and the `main` branch is used for
bleeding-edge development.
For more information, visit the [GitLab Release Process](https://about.gitlab.com/handbook/engineering/releases/).
Both distributions require additional components. These components are described in the
[Component details](#components) section, and all have their own repositories.
-New versions of each dependent component are usually tags, but staying on the `master` branch of the
+New versions of each dependent component are usually tags, but staying on the `main` branch of the
GitLab codebase gives you the latest stable version of those components. New versions are
generally released around the same time as GitLab releases, with the exception of informal security
updates deemed critical.
diff --git a/doc/development/code_review.md b/doc/development/code_review.md
index b91e27b7051..df09b27c6b4 100644
--- a/doc/development/code_review.md
+++ b/doc/development/code_review.md
@@ -418,13 +418,13 @@ WARNING:
- Start a new merge request pipeline with the `Run pipeline` button in the merge
request's "Pipelines" tab, and enable "Merge When Pipeline Succeeds" (MWPS).
Note that:
- - If **[master is broken](https://about.gitlab.com/handbook/engineering/workflow/#broken-master),
+ - If **[main is broken](https://about.gitlab.com/handbook/engineering/workflow/#broken-master),
do not merge the merge request** except for
[very specific cases](https://about.gitlab.com/handbook/engineering/workflow/#criteria-for-merging-during-broken-master).
For other cases, follow these [handbook instructions](https://about.gitlab.com/handbook/engineering/workflow/#merging-during-broken-master).
- If the **latest [Pipeline for Merged Results](../ci/merge_request_pipelines/pipelines_for_merged_results/#pipelines-for-merged-results)** finished less than 2 hours ago, you
might merge without starting a new pipeline as the merge request is close
- enough to `master`.
+ enough to `main`.
- When you set the MR to "Merge When Pipeline Succeeds", you should take over
subsequent revisions for anything that would be spotted after that.
- For merge requests that have had [Squash and
@@ -434,11 +434,11 @@ WARNING:
Thanks to **Pipeline for Merged Results**, authors no longer have to rebase their
branch as frequently anymore (only when there are conflicts) because the Merge
-Results Pipeline already incorporate the latest changes from `master`.
+Results Pipeline already incorporate the latest changes from `main`.
This results in faster review/merge cycles because maintainers don't have to ask
for a final rebase: instead, they only have to start a MR pipeline and set MWPS.
This step brings us very close to the actual Merge Trains feature by testing the
-Merge Results against the latest `master` at the time of the pipeline creation.
+Merge Results against the latest `main` at the time of the pipeline creation.
### Community contributions
diff --git a/doc/development/contributing/issue_workflow.md b/doc/development/contributing/issue_workflow.md
index 9d34b065e24..840434ebbc3 100644
--- a/doc/development/contributing/issue_workflow.md
+++ b/doc/development/contributing/issue_workflow.md
@@ -325,7 +325,7 @@ the [appropriate product manager](https://about.gitlab.com/handbook/product/#who
as soon as possible. The product manager will then pull in appropriate GitLab team
members to further discuss scope, design, and technical considerations. This will
ensure that your contribution is aligned with the GitLab product and minimize
-any rework and delay in getting it merged into master.
+any rework and delay in getting it merged into main.
GitLab team members who apply the ~"Accepting merge requests" label to an issue
should update the issue description with a responsible product manager, inviting
diff --git a/doc/development/contributing/merge_request_workflow.md b/doc/development/contributing/merge_request_workflow.md
index ed4631408f8..783cf7af6fc 100644
--- a/doc/development/contributing/merge_request_workflow.md
+++ b/doc/development/contributing/merge_request_workflow.md
@@ -44,7 +44,7 @@ request is as follows:
1. [Fork](../../user/project/repository/forking_workflow.md) the project into
your personal namespace (or group) on GitLab.com.
-1. Create a feature branch in your fork (don't work off `master`).
+1. Create a feature branch in your fork (don't work off your [default branch](../../user/project/repository/branches/default.md)).
1. Write [tests](../rake_tasks.md#run-tests) and code.
1. [Ensure a changelog is created](../changelog.md).
1. If you are writing documentation, make sure to follow the
@@ -54,7 +54,7 @@ request is as follows:
commits by [squashing them](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_squashing),
but do not change the commit history if you're working on shared branches though.
1. Push the commit(s) to your working branch in your fork.
-1. Submit a merge request (MR) to the `master` branch in the main GitLab project.
+1. Submit a merge request (MR) to the `main` branch in the main GitLab project.
1. Your merge request needs at least 1 approval, but depending on your changes
you might need additional approvals. Refer to the [Approval guidelines](../code_review.md#approval-guidelines).
1. You don't have to select any specific approvers, but you can if you really want
@@ -196,12 +196,12 @@ the contribution acceptance criteria below:
exposing a bug in existing code). Every new class should have corresponding
unit tests, even if the class is exercised at a higher level, such as a feature test.
- If a failing CI build seems to be unrelated to your contribution, you can try
- restarting the failing CI job, rebasing from `master` to bring in updates that
+ restarting the failing CI job, rebasing from `main` to bring in updates that
may resolve the failure, or if it has not been fixed yet, ask a developer to
help you fix the test.
1. The MR initially contains a few logically organized commits.
1. The changes can merge without problems. If not, you should rebase if you're the
- only one working on your feature branch, otherwise merge `master`.
+ only one working on your feature branch, otherwise merge `main`.
1. Only one specific issue is fixed or one specific feature is implemented. Do not
combine things; send separate merge requests for each issue or feature.
1. Migrations should do only one thing (e.g., create a table, move data to a new
diff --git a/doc/development/diffs.md b/doc/development/diffs.md
index 52ba89a4d6e..aaa3340af33 100644
--- a/doc/development/diffs.md
+++ b/doc/development/diffs.md
@@ -156,13 +156,13 @@ Historically, merge request diffs have been calculated by `git diff target...sou
`HEAD` of the source branch with the merge base (or a common ancestor) of the target branch and the source's.
This solution works well until the target branch starts containing some of the
changes introduced by the source branch: Consider the following case, in which the source branch
-is `feature_a` and the target is `master`:
+is `feature_a` and the target is `main`:
-1. Checkout a new branch `feature_a` from `master` and remove `file_a` and `file_b` in it.
-1. Add a commit that removes `file_a` to `master`.
+1. Checkout a new branch `feature_a` from `main` and remove `file_a` and `file_b` in it.
+1. Add a commit that removes `file_a` to `main`.
The merge request diff still contains the `file_a` removal while the actual diff compared to
-`master`'s `HEAD` has only the `file_b` removal. The diff with such redundant
+`main`'s `HEAD` has only the `file_b` removal. The diff with such redundant
changes is harder to review.
In order to display an up-to-date diff, in GitLab 12.9 we
@@ -174,16 +174,16 @@ diff.
Until we complete the epics ["use merge refs for diffs"](https://gitlab.com/groups/gitlab-org/-/epics/854)
and ["merge conflicts in diffs"](https://gitlab.com/groups/gitlab-org/-/epics/4893),
-both options `master (base)` and `master (HEAD)` are available to be displayed in merge requests:
+both options `main (base)` and `main (HEAD)` are available to be displayed in merge requests:
![Merge ref head options](img/merge_ref_head_options_v13_6.png)
-The `master (HEAD)` option is meant to replace `master (base)` in the future.
+The `main (HEAD)` option is meant to replace `main (base)` in the future.
In order to support comments for both options, diff note positions are stored for
-both `master (base)` and `master (HEAD)` versions ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/198457) in 12.10).
-The position for `master (base)` version is stored in `Note#position` and
-`Note#original_position` columns, for `master (HEAD)` version `DiffNotePosition`
+both `main (base)` and `main (HEAD)` versions ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/198457) in 12.10).
+The position for `main (base)` version is stored in `Note#position` and
+`Note#original_position` columns, for `main (HEAD)` version `DiffNotePosition`
has been introduced.
One of the key challenges to deal with when working on merge ref diffs are merge
diff --git a/doc/development/documentation/index.md b/doc/development/documentation/index.md
index caad0ee6cfe..12a1912dd25 100644
--- a/doc/development/documentation/index.md
+++ b/doc/development/documentation/index.md
@@ -317,7 +317,8 @@ it increases the work of the release managers.
Every GitLab instance includes the documentation, which is available at `/help`
(`https://gitlab.example.com/help`). For example, <https://gitlab.com/help>.
-The documentation available online on <https://docs.gitlab.com> is deployed every four hours from the `master` branch of GitLab, Omnibus, and Runner. Therefore,
+The documentation available online on <https://docs.gitlab.com> is deployed every
+four hours from the `main` branch of GitLab, Omnibus, and Runner. Therefore,
after a merge request gets merged, it is available online on the same day.
However, it's shipped (and available on `/help`) within the milestone assigned
to the MR.
@@ -461,7 +462,7 @@ If you want to know the in-depth details, here's what's really happening:
1. You manually run the `review-docs-deploy` job in a merge request.
1. The job runs the [`scripts/trigger-build`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/scripts/trigger-build)
script with the `docs deploy` flag, which triggers the "Triggered from `gitlab-org/gitlab` 'review-docs-deploy' job"
- pipeline trigger in the `gitlab-org/gitlab-docs` project for the `$DOCS_BRANCH` (defaults to `master`).
+ pipeline trigger in the `gitlab-org/gitlab-docs` project for the `$DOCS_BRANCH` (defaults to `main`).
1. The preview URL is shown both at the job output and in the merge request
widget. You also get the link to the remote pipeline.
1. In the `gitlab-org/gitlab-docs` project, the pipeline is created and it
diff --git a/doc/development/documentation/site_architecture/deployment_process.md b/doc/development/documentation/site_architecture/deployment_process.md
index cded54c7c43..1b764ada87b 100644
--- a/doc/development/documentation/site_architecture/deployment_process.md
+++ b/doc/development/documentation/site_architecture/deployment_process.md
@@ -55,10 +55,10 @@ The website keeps changing and being improved. In order to consolidate
those changes to the stable branches, we'd need to pick certain changes
from time to time.
-If this is not possible or there are many changes, merge master into them:
+If this is not possible or there are many changes, merge main into them:
```shell
git branch 12.0
-git fetch origin master
-git merge origin/master
+git fetch origin main
+git merge origin/main
```
diff --git a/doc/development/documentation/site_architecture/index.md b/doc/development/documentation/site_architecture/index.md
index 95fe65406eb..d410d77a1a0 100644
--- a/doc/development/documentation/site_architecture/index.md
+++ b/doc/development/documentation/site_architecture/index.md
@@ -114,7 +114,7 @@ located in the [Dockerfiles directory](https://gitlab.com/gitlab-org/gitlab-docs
If you need to rebuild the Docker images immediately (must have maintainer level permissions):
WARNING:
-If you change the Dockerfile configuration and rebuild the images, you can break the master
+If you change the Dockerfile configuration and rebuild the images, you can break the main
pipeline in the main `gitlab` repository as well as in `gitlab-docs`. Create an image with
a different name first and test it to ensure you do not break the pipelines.
@@ -132,7 +132,7 @@ a different name first and test it to ensure you do not break the pipelines.
### Deploy the docs site
Every four hours a scheduled pipeline builds and deploys the docs site. The pipeline
-fetches the current docs from the main project's master branch, builds it with Nanoc
+fetches the current docs from the main project's main branch, builds it with Nanoc
and deploys it to <https://docs.gitlab.com>.
If you need to build and deploy the site immediately (must have maintainer level permissions):
diff --git a/doc/development/documentation/styleguide/index.md b/doc/development/documentation/styleguide/index.md
index 32a130aeeb8..225db273cb6 100644
--- a/doc/development/documentation/styleguide/index.md
+++ b/doc/development/documentation/styleguide/index.md
@@ -1276,7 +1276,7 @@ hidden on the documentation site, but is displayed by `/help`.
## Code blocks
- Always wrap code added to a sentence in inline code blocks (`` ` ``).
- For example, `.gitlab-ci.yml`, `git add .`, `CODEOWNERS`, or `only: [master]`.
+ For example, `.gitlab-ci.yml`, `git add .`, `CODEOWNERS`, or `only: [main]`.
File names, commands, entries, and anything that refers to code should be
added to code blocks. To make things easier for the user, always add a full
code block for things that can be useful to copy and paste, as they can do it
diff --git a/doc/development/feature_flags/index.md b/doc/development/feature_flags/index.md
index 241cedfd944..79a100e44a5 100644
--- a/doc/development/feature_flags/index.md
+++ b/doc/development/feature_flags/index.md
@@ -41,7 +41,7 @@ should be leveraged:
1. [Create a new feature flag](#create-a-new-feature-flag)
which is **off** by default, in the first merge request which uses the flag.
- Flags [should not be added separately](#risk-of-a-broken-master-main-branch).
+ Flags [should not be added separately](#risk-of-a-broken-main-branch).
1. Submit incremental changes via one or more merge requests, ensuring that any
new code added can only be reached if the feature flag is **on**.
You can keep the feature flag enabled on your local GDK during development.
@@ -59,11 +59,11 @@ flag does not have to stick around for a specific amount of time
is deemed stable. Stable means it works on GitLab.com without causing any
problems, such as outages.
-## Risk of a broken master (main) branch
+## Risk of a broken main branch
-Feature flags **must** be used in the MR that introduces them. Not doing so causes a
-[broken master](https://about.gitlab.com/handbook/engineering/workflow/#broken-master) scenario due
-to the `rspec:feature-flags` job that only runs on the `master` branch.
+Feature flags must be used in the MR that introduces them. Not doing so causes a
+[broken main branch](https://about.gitlab.com/handbook/engineering/workflow/#broken-master) scenario due
+to the `rspec:feature-flags` job that only runs on the `main` branch.
## Types of feature flags
diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md
index ac568389e51..009ead8ba16 100644
--- a/doc/development/migration_style_guide.md
+++ b/doc/development/migration_style_guide.md
@@ -45,16 +45,16 @@ columns manually for existing tables as this causes confusion to
other people using `db/structure.sql` generated by Rails.
When your local database in your GDK is diverging from the schema from
-`master` it might be hard to cleanly commit the schema changes to
+`main` it might be hard to cleanly commit the schema changes to
Git. In that case you can use the `scripts/regenerate-schema` script to
regenerate a clean `db/structure.sql` for the migrations you're
adding. This script applies all migrations found in `db/migrate`
or `db/post_migrate`, so if there are any migrations you don't want to
commit to the schema, rename or remove them. If your branch is not
-targeting `master` you can set the `TARGET` environment variable.
+targeting `main` you can set the `TARGET` environment variable.
```shell
-# Regenerate schema against `master`
+# Regenerate schema against `main`
scripts/regenerate-schema
# Regenerate schema against `12-9-stable-ee`
diff --git a/doc/development/new_fe_guide/development/performance.md b/doc/development/new_fe_guide/development/performance.md
index 8ae503ec709..f34c407da84 100644
--- a/doc/development/new_fe_guide/development/performance.md
+++ b/doc/development/new_fe_guide/development/performance.md
@@ -11,7 +11,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
We have a performance dashboard available in one of our [Grafana instances](https://dashboards.gitlab.net/d/1EBTz3Dmz/sitespeed-page-summary?orgId=1). This dashboard automatically aggregates metric data from [sitespeed.io](https://www.sitespeed.io/) every 6 hours. These changes are displayed after a set number of pages are aggregated.
These pages can be found inside a text file in the [`gitlab-build-images` repository](https://gitlab.com/gitlab-org/gitlab-build-images) called [`gitlab.txt`](https://gitlab.com/gitlab-org/gitlab-build-images/blob/master/scripts/gitlab.txt)
-Any frontend engineer can contribute to this dashboard. They can contribute by adding or removing URLs of pages from this text file. Please have a [frontend monitoring expert](https://about.gitlab.com/company/team/) review your changes before assigning to a maintainer of the `gitlab-build-images` project. The changes are pushed live on the next scheduled run after the changes are merged into `master`.
+Any frontend engineer can contribute to this dashboard. They can contribute by adding or removing URLs of pages from this text file. Please have a [frontend monitoring expert](https://about.gitlab.com/company/team/) review your changes before assigning to a maintainer of the `gitlab-build-images` project. The changes are pushed live on the next scheduled run after the changes are merged into `main`.
There are 3 recommended high impact metrics to review on each page:
diff --git a/doc/development/pipelines.md b/doc/development/pipelines.md
index c3fb66cb085..0dc1481f542 100644
--- a/doc/development/pipelines.md
+++ b/doc/development/pipelines.md
@@ -24,7 +24,7 @@ feature of the GitLab CI/CD.
Pipelines are always created for the following scenarios:
-- `master` branch, including on schedules, pushes, merges, and so on.
+- `main` branch, including on schedules, pushes, merges, and so on.
- Merge requests.
- Tags.
- Stable, `auto-deploy`, and security branches.
@@ -428,7 +428,7 @@ We are using a custom mapping between source file to test files, maintained in t
As part of the objective to improve overall pipeline duration, we are experimenting with a minimal set of RSpec tests.
The purpose of this experiment is to verify if we are able to run a minimal set of RSpec tests in a Merge Request pipeline,
-without resulting in increased number of broken master.
+without resulting in increased number of broken main branch.
To identify the minimal set of tests needed, we use [Crystalball gem](https://github.com/toptal/crystalball) to create a test mapping.
The test mapping contains a map of each source files to a list of test files which is dependent of the source file.
@@ -484,14 +484,14 @@ Our test suite runs against PG12 as GitLab.com runs on PG12 and
Our test suite is currently running against PG11, since GitLab.com still runs on PG11.
We do run our test suite against PG11 on nightly scheduled pipelines as well as upon specific
-database library changes in MRs and `master` pipelines (with the `rspec db-library-code pg11` job).
+database library changes in MRs and `main` pipelines (with the `rspec db-library-code pg11` job).
#### Current versions testing
| Where? | PostgreSQL version |
| ------ | ------------------ |
| MRs | 12, 11 for DB library changes |
-| `master` (non-scheduled pipelines) | 12, 11 for DB library changes |
+| `main` (non-scheduled pipelines) | 12, 11 for DB library changes |
| 2-hourly scheduled pipelines | 12, 11 for DB library changes |
| `nightly` scheduled pipelines | 12, 11 |
@@ -538,7 +538,7 @@ the `gitlab-org/gitlab-foss` project.
### Interruptible pipelines
By default, all jobs are [interruptible](../ci/yaml/README.md#interruptible), except the
-`dont-interrupt-me` job which runs automatically on `master`, and is `manual`
+`dont-interrupt-me` job which runs automatically on `main`, and is `manual`
otherwise.
If you want a running pipeline to finish even if you push new commits to a merge
diff --git a/doc/development/rake_tasks.md b/doc/development/rake_tasks.md
index 3860665024a..8d20c2b738e 100644
--- a/doc/development/rake_tasks.md
+++ b/doc/development/rake_tasks.md
@@ -236,7 +236,7 @@ task, then check the dimensions of the new sprite sheet and update the
## Update project templates
Starting a project from a template needs this project to be exported. On a
-up to date master branch run:
+up to date main branch run:
```shell
gdk start
@@ -247,7 +247,7 @@ git commit
git push -u origin update-project-templates
```
-Now create a merge request and merge that to master.
+Now create a merge request and merge that to main.
## Generate route lists
diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md
index 4ed5bfc7eb5..4ca4ea0e64e 100644
--- a/doc/development/testing_guide/best_practices.md
+++ b/doc/development/testing_guide/best_practices.md
@@ -1148,7 +1148,7 @@ module Spec
module Helpers
module CycleAnalyticsHelpers
def create_commit_referencing_issue(issue, branch_name: random_git_name)
- project.repository.add_branch(user, branch_name, 'master')
+ project.repository.add_branch(user, branch_name, 'main')
create_commit("Commit for ##{issue.iid}", issue.project, user, branch_name)
end
end
@@ -1205,7 +1205,7 @@ let(:project) { create(:project, :repository) }
```
Where you can, consider using the `:custom_repo` trait instead of `:repository`.
-This allows you to specify exactly what files appear in the `master` branch
+This allows you to specify exactly what files appear in the `main` branch
of the project's repository. For example:
```ruby
diff --git a/doc/development/testing_guide/ci.md b/doc/development/testing_guide/ci.md
index 7318f767219..e3fccdcee34 100644
--- a/doc/development/testing_guide/ci.md
+++ b/doc/development/testing_guide/ci.md
@@ -12,7 +12,7 @@ Our current CI parallelization setup is as follows:
1. The `retrieve-tests-metadata` job in the `prepare` stage ensures we have a
`knapsack/report-master.json` file:
- - The `knapsack/report-master.json` file is fetched from the latest `master` pipeline which runs `update-tests-metadata`
+ - The `knapsack/report-master.json` file is fetched from the latest `main` pipeline which runs `update-tests-metadata`
(for now it's the 2-hourly scheduled master pipeline), if it's not here we initialize the file with `{}`.
1. Each `[rspec|rspec-ee] [unit|integration|system|geo] n m` job are run with
`knapsack rspec` and should have an evenly distributed share of tests:
@@ -31,7 +31,7 @@ After that, the next pipeline uses the up-to-date `knapsack/report-master.json`
## Monitoring
-The GitLab test suite is [monitored](../performance.md#rspec-profiling) for the `master` branch, and any branch
+The GitLab test suite is [monitored](../performance.md#rspec-profiling) for the `main` branch, and any branch
that includes `rspec-profile` in their name.
## CI setup
diff --git a/doc/development/testing_guide/end_to_end/feature_flags.md b/doc/development/testing_guide/end_to_end/feature_flags.md
index 4f9d68983d2..c9acb2e9371 100644
--- a/doc/development/testing_guide/end_to_end/feature_flags.md
+++ b/doc/development/testing_guide/end_to_end/feature_flags.md
@@ -81,7 +81,7 @@ End-to-end tests should pass with a feature flag enabled before it is enabled on
If a test enables a feature flag as describe above, it is sufficient to run the `package-and-qa` job in a merge request containing the relevant changes.
Or, if the feature flag and relevant changes have already been merged, you can confirm that the tests
-pass on `master`. The end-to-end tests run on `master` every two hours, and the results are posted to a [Test
+pass on `main`. The end-to-end tests run on `main` every two hours, and the results are posted to a [Test
Session Report, which is available in the testcase-sessions project](https://gitlab.com/gitlab-org/quality/testcase-sessions/-/issues?label_name%5B%5D=found%3Amaster).
If the relevant tests do not enable the feature flag themselves, you can check if the tests will need
diff --git a/doc/development/testing_guide/flaky_tests.md b/doc/development/testing_guide/flaky_tests.md
index dd4e04b78aa..bfcd68dbaf3 100644
--- a/doc/development/testing_guide/flaky_tests.md
+++ b/doc/development/testing_guide/flaky_tests.md
@@ -13,7 +13,7 @@ eventually.
## Quarantined tests
-When a test frequently fails in `master`,
+When a test frequently fails in `main`,
[a ~"master:broken" issue](https://about.gitlab.com/handbook/engineering/workflow/#broken-master)
should be created.
If the test cannot be fixed in a timely fashion, there is an impact on the
@@ -56,7 +56,7 @@ On our CI, we use [RSpec::Retry](https://github.com/NoRedInk/rspec-retry) to aut
times (see [`spec/spec_helper.rb`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/spec/spec_helper.rb) for the precise retries count).
We also use a home-made `RspecFlaky::Listener` listener which records flaky
-examples in a JSON report file on `master` (`retrieve-tests-metadata` and
+examples in a JSON report file on `main` (`retrieve-tests-metadata` and
`update-tests-metadata` jobs).
This was originally implemented in: <https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/13021>.
diff --git a/doc/topics/autodevops/index.md b/doc/topics/autodevops/index.md
index 949b7ff4e9d..f2ce61044ef 100644
--- a/doc/topics/autodevops/index.md
+++ b/doc/topics/autodevops/index.md
@@ -286,14 +286,14 @@ The following table is an example of how to configure the three different cluste
To add a different cluster for each environment:
-1. Navigate to your project's **Operations > Kubernetes**.
+1. Navigate to your project's **Infrastructure > Kubernetes clusters**.
1. Create the Kubernetes clusters with their respective environment scope, as
described from the table above.
1. After creating the clusters, navigate to each cluster and [install
Ingress](quick_start_guide.md#install-ingress). Wait for the Ingress IP address to be assigned.
1. Make sure you've [configured your DNS](#auto-devops-base-domain) with the
specified Auto DevOps domains.
-1. Navigate to each cluster's page, through **Operations > Kubernetes**,
+1. Navigate to each cluster's page, through **Infrastructure > Kubernetes clusters**,
and add the domain based on its Ingress IP address.
After completing configuration, you can test your setup by creating a merge request
diff --git a/doc/topics/autodevops/quick_start_guide.md b/doc/topics/autodevops/quick_start_guide.md
index 6d42a9a4274..448e9526b88 100644
--- a/doc/topics/autodevops/quick_start_guide.md
+++ b/doc/topics/autodevops/quick_start_guide.md
@@ -63,7 +63,8 @@ to deploy this project to.
## Create a Kubernetes cluster from within GitLab
1. On your project's landing page, click **Add Kubernetes cluster**
- (note that this option is also available when you navigate to **Operations > Kubernetes**).
+ (note that this option is also available when you navigate to
+ **Infrastructure > Kubernetes clusters**).
![Project landing page](img/guide_project_landing_page_v12_10.png)
@@ -216,7 +217,7 @@ to monitor it.
After successfully deploying your application, you can view its website and check
on its health on the **Environments** page by navigating to
-**Operations > Environments**. This page displays details about
+**Deployments > Environments**. This page displays details about
the deployed applications, and the right-hand column displays icons that link
you to common environment tasks:
diff --git a/doc/topics/git/lfs/migrate_to_git_lfs.md b/doc/topics/git/lfs/migrate_to_git_lfs.md
index d31f329f8c3..d1231257f38 100644
--- a/doc/topics/git/lfs/migrate_to_git_lfs.md
+++ b/doc/topics/git/lfs/migrate_to_git_lfs.md
@@ -137,8 +137,8 @@ Consider an example upstream project, `git@gitlab.com:gitlab-tests/test-git-lfs-
# Change into the upstream repo directory:
cd test-git-lfs-repo-migration
- # You may need to reset your local copy with upstream's `master` after force-pushing from the mirror:
- git reset --hard origin/master
+ # You may need to reset your local copy with upstream's `main` after force-pushing from the mirror:
+ git reset --hard origin/main
# Track the files with LFS:
git lfs track "*.gif" "*.png" "*.jpg" "*.psd" "*.mp4" "img/"
diff --git a/doc/user/clusters/agent/index.md b/doc/user/clusters/agent/index.md
index 55a27d44dad..414ed8377db 100644
--- a/doc/user/clusters/agent/index.md
+++ b/doc/user/clusters/agent/index.md
@@ -486,7 +486,7 @@ cilium:
## Management interfaces
Users with at least the [Developer](../../permissions.md) can access the user interface
-for the GitLab Kubernetes agent at **Operations > Kubernetes** under the
+for the GitLab Kubernetes agent at **Infrastructure > Kubernetes clusters**, under the
**GitLab Agent managed clusters** tab. This page lists all registered agents for
the current project, and the configuration directory for each agent:
diff --git a/doc/user/clusters/applications.md b/doc/user/clusters/applications.md
index 5f047de5938..a6aa4e00005 100644
--- a/doc/user/clusters/applications.md
+++ b/doc/user/clusters/applications.md
@@ -454,7 +454,7 @@ for the available configuration options.
You can check Cilium's installation status on the cluster management page:
- [Project-level cluster](../project/clusters/index.md): Navigate to your project's
- **Operations > Kubernetes** page.
+ **Infrastructure > Kubernetes clusters** page.
- [Group-level cluster](../group/clusters/index.md): Navigate to your group's
**Kubernetes** page.
@@ -463,7 +463,10 @@ Installation and removal of the Cilium requires a **manual**
[restart](https://docs.cilium.io/en/stable/gettingstarted/k8s-install-gke/#restart-unmanaged-pods)
of all affected pods in all namespaces to ensure that they are
[managed](https://docs.cilium.io/en/v1.8/operations/troubleshooting/#ensure-managed-pod)
-by the correct networking plugin.
+by the correct networking plugin. Whenever Hubble is enabled, its related pod might require a
+restart depending on whether it started prior to Cilium. For more information, see
+[Failed Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#failed-deployment)
+in the Kubernetes docs.
NOTE:
Major upgrades might require additional setup steps. For more information, see
@@ -1051,8 +1054,8 @@ Logs produced by pods running **GitLab Managed Apps** can be browsed using
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/327803) in GitLab 13.12.
With the removal of the One-click install method in GitLab 14.0,
-the **Applications** tab (under your project's **Operations > Kubernetes**)
-will no longer be displayed:
+the **Applications** tab (under your project's **Infrastructure > Kubernetes clusters**)
+is no longer displayed:
![GitLab Managed Apps - Applications tab](img/applications_tab_v13_12.png)
diff --git a/doc/user/clusters/cost_management.md b/doc/user/clusters/cost_management.md
index b1bd44c91a5..26611c26e5e 100644
--- a/doc/user/clusters/cost_management.md
+++ b/doc/user/clusters/cost_management.md
@@ -46,7 +46,7 @@ permissions in a project or group.
kubectl apply -f kubernetes/ --namespace cost-model
```
-To access the cost insights, navigate to **Operations > Metrics** and select
+To access the cost insights, navigate to **Monitor > Metrics** and select
the `default_costs.yml` dashboard. You can [customize](#customize-the-cost-dashboard)
this dashboard.
diff --git a/doc/user/clusters/integrations.md b/doc/user/clusters/integrations.md
index 8abdfdeb7fd..6c87efaf5a3 100644
--- a/doc/user/clusters/integrations.md
+++ b/doc/user/clusters/integrations.md
@@ -73,7 +73,7 @@ To enable the Prometheus integration for your cluster:
1. Go to the cluster's page:
- For a [project-level cluster](../project/clusters/index.md), navigate to your project's
- **Operations > Kubernetes**.
+ **Infrastructure > Kubernetes clusters**.
- For a [group-level cluster](../group/clusters/index.md), navigate to your group's
**Kubernetes** page.
- For an [instance-level cluster](../instance/clusters/index.md), navigate to your instance's
@@ -128,7 +128,7 @@ To enable the Elastic Stack integration for your cluster:
1. Go to the cluster's page:
- For a [project-level cluster](../project/clusters/index.md), navigate to your project's
- **Operations > Kubernetes**.
+ **Infrastructure > Kubernetes clusters**.
- For a [group-level cluster](../group/clusters/index.md), navigate to your group's
**Kubernetes** page.
- For an [instance-level cluster](../instance/clusters/index.md), navigate to your instance's
diff --git a/doc/user/clusters/management_project.md b/doc/user/clusters/management_project.md
index eca9721796d..f741ab2d95a 100644
--- a/doc/user/clusters/management_project.md
+++ b/doc/user/clusters/management_project.md
@@ -46,7 +46,7 @@ To select a cluster management project to use:
1. Navigate to the appropriate configuration page. For a:
- [Project-level cluster](../project/clusters/index.md), navigate to your project's
- **Operations > Kubernetes** page.
+ **Infrastructure > Kubernetes clusters** page.
- [Group-level cluster](../group/clusters/index.md), navigate to your group's **Kubernetes**
page.
- [Instance-level cluster](../instance/clusters/index.md), navigate to Admin Area's **Kubernetes**
diff --git a/doc/user/infrastructure/terraform_state.md b/doc/user/infrastructure/terraform_state.md
index 90858f9be8d..0b92ea46338 100644
--- a/doc/user/infrastructure/terraform_state.md
+++ b/doc/user/infrastructure/terraform_state.md
@@ -41,7 +41,8 @@ To get started with a GitLab-managed Terraform state, there are two different op
- [Use a local machine](#get-started-using-local-development).
- [Use GitLab CI](#get-started-using-gitlab-ci).
-Terraform States can be found by navigating to a Project's **{cloud-gear}** **Operations > Terraform** page.
+Terraform States can be found by navigating to a Project's
+**{cloud-gear}** **Infrastructure > Terraform** page.
### Get started using local development
@@ -351,7 +352,7 @@ location. You can then go back to running it in GitLab CI/CD.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/273592) in GitLab 13.8.
Users with Developer and greater [permissions](../permissions.md) can view the
-state files attached to a project at **Operations > Terraform**. Users with the
+state files attached to a project at **Infrastructure > Terraform**. Users with the
Maintainer role can perform commands on the state files. The user interface
contains these fields:
@@ -376,7 +377,7 @@ are planned.
Users with Maintainer and greater [permissions](../permissions.md) can use the
following options to remove a state file:
-- **GitLab UI**: Go to **Operations > Terraform**. In the **Actions** column,
+- **GitLab UI**: Go to **Infrastructure > Terraform**. In the **Actions** column,
click the vertical ellipsis (**{ellipsis_v}**) button and select
**Remove state file and versions**.
- **GitLab REST API**: You can remove a state file by making a request to the
diff --git a/doc/user/project/clusters/add_eks_clusters.md b/doc/user/project/clusters/add_eks_clusters.md
index 79c77a03d5a..58bdb3d698f 100644
--- a/doc/user/project/clusters/add_eks_clusters.md
+++ b/doc/user/project/clusters/add_eks_clusters.md
@@ -74,7 +74,7 @@ Instance profiles dynamically retrieve temporary credentials from AWS when neede
To create and add a new Kubernetes cluster to your project, group, or instance:
1. Navigate to your:
- - Project's **Operations > Kubernetes** page, for a project-level cluster.
+ - Project's **Infrastructure > Kubernetes clusters** page, for a project-level cluster.
- Group's **Kubernetes** page, for a group-level cluster.
- **Admin Area > Kubernetes**, for an instance-level cluster.
1. Click **Integrate with a cluster certificate**.
diff --git a/doc/user/project/clusters/add_gke_clusters.md b/doc/user/project/clusters/add_gke_clusters.md
index d9966bf7d38..9f0e5603785 100644
--- a/doc/user/project/clusters/add_gke_clusters.md
+++ b/doc/user/project/clusters/add_gke_clusters.md
@@ -46,7 +46,8 @@ Note the following:
To create and add a new Kubernetes cluster to your project, group, or instance:
1. Navigate to your:
- - Project's **{cloud-gear}** **Operations > Kubernetes** page, for a project-level cluster.
+ - Project's **{cloud-gear}** **Infrastructure > Kubernetes clusters** page, for a project-level
+ cluster.
- Group's **{cloud-gear}** **Kubernetes** page, for a group-level cluster.
- **Admin Area >** **{cloud-gear}** **Kubernetes** page, for an instance-level cluster.
1. Click **Integrate with a cluster certificate**.
diff --git a/doc/user/project/clusters/add_remove_clusters.md b/doc/user/project/clusters/add_remove_clusters.md
index be0887e6762..2ecbc4a2ff5 100644
--- a/doc/user/project/clusters/add_remove_clusters.md
+++ b/doc/user/project/clusters/add_remove_clusters.md
@@ -144,7 +144,8 @@ New clusters can be created using GitLab on Google Kubernetes Engine (GKE) or
Amazon Elastic Kubernetes Service (EKS) at the project, group, or instance level:
1. Navigate to your:
- - Project's **{cloud-gear}** **Operations > Kubernetes** page, for a project-level cluster.
+ - Project's **{cloud-gear}** **Infrastructure > Kubernetes clusters** page, for a project-level
+ cluster.
- Group's **{cloud-gear}** **Kubernetes** page, for a group-level cluster.
- **Admin Area >** **{cloud-gear}** **Kubernetes** page, for an instance-level cluster.
1. Click **Integrate with a cluster certificate**.
@@ -173,7 +174,8 @@ or start [deploying right away](index.md#deploying-to-a-kubernetes-cluster).
To add a Kubernetes cluster to your project, group, or instance:
1. Navigate to your:
- 1. Project's **{cloud-gear}** **Operations > Kubernetes** page, for a project-level cluster.
+ 1. Project's **{cloud-gear}** **Infrastructure > Kubernetes clusters** page, for a project-level
+ cluster.
1. Group's **{cloud-gear}** **Kubernetes** page, for a group-level cluster.
1. **Admin Area >** **{cloud-gear}** **Kubernetes** page, for an instance-level cluster.
1. Click **Add Kubernetes cluster**.
@@ -350,7 +352,8 @@ The Kubernetes cluster integration enables after you have successfully either cr
a new cluster or added an existing one. To disable Kubernetes cluster integration:
1. Navigate to your:
- - Project's **{cloud-gear}** **Operations > Kubernetes** page, for a project-level cluster.
+ - Project's **{cloud-gear}** **Infrastructure > Kubernetes clusters** page, for a project-level
+ cluster.
- Group's **{cloud-gear}** **Kubernetes** page, for a group-level cluster.
- **Admin Area >** **{cloud-gear}** **Kubernetes** page, for an instance-level cluster.
1. Click on the name of the cluster.
diff --git a/doc/user/project/clusters/serverless/index.md b/doc/user/project/clusters/serverless/index.md
index 9a0ca17a9d2..e4ac1eabffe 100644
--- a/doc/user/project/clusters/serverless/index.md
+++ b/doc/user/project/clusters/serverless/index.md
@@ -320,7 +320,7 @@ After the `gitlab-ci.yml` template has been added and the `serverless.yml` file
has been created, pushing a commit to your project results in a CI pipeline
being executed which deploys each function as a Knative service. After the
deploy stage has finished, additional details for the function display
-under **Operations > Serverless**.
+under **Infrastructure > Serverless platform**.
![serverless page](img/serverless-page.png)
@@ -454,7 +454,7 @@ With all the pieces in place, the next time a CI pipeline runs the Knative appli
### Function details
-Go to the **Operations > Serverless** page to see the final URL of your functions.
+Go to the **Infrastructure > Serverless platform** page to see the final URL of your functions.
![function_details](img/function-list_v12_7.png)
@@ -579,7 +579,7 @@ or with other versions of Python.
Where `<namespace>` is the namespace created by GitLab for your serverless project (composed of `<project_name>-<project_id>-<environment>`) and
`example.com` is the domain being used for your project. If you are unsure what the namespace of your project is, navigate
- to the **Operations > Serverless** page of your project and inspect
+ to the **Infrastructure > Serverless platform** page of your project and inspect
the endpoint provided for your function/app.
![function_endpoint](img/function-endpoint.png)
diff --git a/doc/user/project/merge_requests/versions.md b/doc/user/project/merge_requests/versions.md
index 676af4b2881..1d196de36e2 100644
--- a/doc/user/project/merge_requests/versions.md
+++ b/doc/user/project/merge_requests/versions.md
@@ -64,7 +64,7 @@ In GitLab 12.10, we added a comparison mode, which
shows a diff calculated by simulating how it would look like once merged - a more accurate
representation of the changes rather than using the base of the two
branches. The new mode is available from the comparison target drop down
-by selecting **master (HEAD)**. In GitLab 13.9, it
+by selecting **main (HEAD)**. In GitLab 13.9, it
[replaced](https://gitlab.com/gitlab-org/gitlab/-/issues/198458) the
old default comparison. For technical details, additional information is available in the
[developer documentation](../../../development/diffs.md#merge-request-diffs-against-the-head-of-the-target-branch).
diff --git a/doc/user/project/wiki/img/content_editor_v14.0.png b/doc/user/project/wiki/img/content_editor_v14.0.png
index 9f4a736ab76..b44a633073d 100644
--- a/doc/user/project/wiki/img/content_editor_v14.0.png
+++ b/doc/user/project/wiki/img/content_editor_v14.0.png
Binary files differ
diff --git a/doc/user/project/wiki/img/use_new_editor_button_v14.0.png b/doc/user/project/wiki/img/use_new_editor_button_v14.0.png
index ceb907871a3..d9a5cf83302 100644
--- a/doc/user/project/wiki/img/use_new_editor_button_v14.0.png
+++ b/doc/user/project/wiki/img/use_new_editor_button_v14.0.png
Binary files differ
diff --git a/doc/user/project/wiki/index.md b/doc/user/project/wiki/index.md
index 34a59bbed22..ed6a51665bd 100644
--- a/doc/user/project/wiki/index.md
+++ b/doc/user/project/wiki/index.md
@@ -292,7 +292,7 @@ experience in the Wiki. To opt in for the new editor:
1. Create a new wiki page, or edit an existing one.
1. Ensure the wiki page uses the Markdown format. Other formats are not yet supported.
-1. Below the **Format** select box, select **Use new editor**:
+1. Below the **Format** select box, select **Use the new editor**:
![Use new editor button image](img/use_new_editor_button_v14.0.png)
@@ -308,12 +308,20 @@ experience in the Wiki. To opt in for the new editor:
### Switch back to the old editor
-1. *If you're editing the page in the content editor,* scroll to **Format**.
-1. Select **Switch to old editor**.
-1. Select **Switch to old editor** in the confirmation popup to confirm.
+1. *If you're editing the page in the content editor,* scroll to **Content**.
+1. Select **Switch me back to the classic editor**.
+1. Select **Switch to classic editor** in the confirmation popup to confirm.
When you switch back to the old editor, any unsaved changes are lost.
+### GitLab Flavored Markdown support
+
+Supporting all GitLab Flavored Markdown content types in the Content Editor is a work in progress.
+For the status of the ongoing development for CommonMark and GitLab Flavored Markdown support, read:
+
+- [Basic Markdown formatting extensions](https://gitlab.com/groups/gitlab-org/-/epics/5404) epic.
+- [GitLab Flavored Markdown extensions](https://gitlab.com/groups/gitlab-org/-/epics/5438) epic.
+
## Resources
- [Wiki settings for administrators](../../../administration/wikis/index.md)
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb
index d2261148b21..36f58d43a77 100644
--- a/lib/gitlab/auth.rb
+++ b/lib/gitlab/auth.rb
@@ -156,15 +156,16 @@ module Gitlab
underscored_service = matched_login['service'].underscore
- if Integration.available_services_names.include?(underscored_service)
- # We treat underscored_service as a trusted input because it is included
- # in the Integration.available_services_names allowlist.
- service = project.public_send("#{underscored_service}_service") # rubocop:disable GitlabSecurity/PublicSend
+ return unless Integration.available_services_names.include?(underscored_service)
- if service && service.activated? && service.valid_token?(password)
- Gitlab::Auth::Result.new(nil, project, :ci, build_authentication_abilities)
- end
- end
+ # We treat underscored_service as a trusted input because it is included
+ # in the Integration.available_services_names allowlist.
+ accessor = Project.integration_association_name(underscored_service)
+ service = project.public_send(accessor) # rubocop:disable GitlabSecurity/PublicSend
+
+ return unless service && service.activated? && service.valid_token?(password)
+
+ Gitlab::Auth::Result.new(nil, project, :ci, build_authentication_abilities)
end
def user_with_password_for_git(login, password)
diff --git a/lib/gitlab/diff/highlight.rb b/lib/gitlab/diff/highlight.rb
index 6a41ed0f29e..32ce35110f8 100644
--- a/lib/gitlab/diff/highlight.rb
+++ b/lib/gitlab/diff/highlight.rb
@@ -70,12 +70,6 @@ module Gitlab
return rich_line if marker_ranges.blank?
begin
- # MarkerRange objects are converted to Ranges to keep the previous behavior
- # Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/324068
- if Feature.disabled?(:introduce_marker_ranges, project, default_enabled: :yaml)
- marker_ranges = marker_ranges.map { |marker_range| marker_range.to_range }
- end
-
InlineDiffMarker.new(diff_line.text, rich_line).mark(marker_ranges)
# This should only happen when the encoding of the diff doesn't
# match the blob, which is a bug. But we shouldn't fail to render
diff --git a/lib/gitlab/diff/highlight_cache.rb b/lib/gitlab/diff/highlight_cache.rb
index 209462fd6e9..a792eafde79 100644
--- a/lib/gitlab/diff/highlight_cache.rb
+++ b/lib/gitlab/diff/highlight_cache.rb
@@ -74,7 +74,6 @@ module Gitlab
diffable.cache_key,
VERSION,
diff_options,
- Feature.enabled?(:introduce_marker_ranges, diffable.project, default_enabled: :yaml),
Feature.enabled?(:use_marker_ranges, diffable.project, default_enabled: :yaml),
Feature.enabled?(:diff_line_syntax_highlighting, diffable.project, default_enabled: :yaml)
].join(":")
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 284280dff46..5f00bb98a7a 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -7930,9 +7930,15 @@ msgstr ""
msgid "CodeQuality|Code quality"
msgstr ""
+msgid "CodeQuality|Code quality: %{severity} - %{description}"
+msgstr ""
+
msgid "CodeQuality|New code quality degradations in this file"
msgstr ""
+msgid "CodeQuality|New code quality degradations on this line"
+msgstr ""
+
msgid "CodeQuality|Some changes in this file degrade the code quality."
msgstr ""
@@ -31968,6 +31974,9 @@ msgstr ""
msgid "Telephone number"
msgstr ""
+msgid "Tell us your experiences with the new Markdown editor %{linkStart}in this feedback issue%{linkEnd}."
+msgstr ""
+
msgid "Template"
msgstr ""
@@ -36945,7 +36954,7 @@ msgstr ""
msgid "WikiPage|An error occured while trying to render the content editor. Please try again later."
msgstr ""
-msgid "WikiPage|Are you sure you want to switch to the old editor?"
+msgid "WikiPage|Are you sure you want to switch back to the classic editor?"
msgstr ""
msgid "WikiPage|Cancel"
@@ -36966,6 +36975,9 @@ msgstr ""
msgid "WikiPage|Format"
msgstr ""
+msgid "WikiPage|Get a richer editing experience"
+msgstr ""
+
msgid "WikiPage|Keep editing"
msgstr ""
@@ -36981,16 +36993,16 @@ msgstr ""
msgid "WikiPage|Save changes"
msgstr ""
-msgid "WikiPage|Switch to old editor"
+msgid "WikiPage|Switch me back to the classic editor."
msgstr ""
-msgid "WikiPage|Switching to the old editor will discard any changes you've made in the new editor."
+msgid "WikiPage|Switch to classic editor"
msgstr ""
-msgid "WikiPage|Switching will discard any changes you've made in the new editor."
+msgid "WikiPage|Switching to the classic editor will discard any changes you've made in the new editor."
msgstr ""
-msgid "WikiPage|This editor is in beta and may not display the page's contents properly."
+msgid "WikiPage|This editor is in beta and may not display the page's contents properly. Switching back to the classic editor will discard changes you've made in the new editor."
msgstr ""
msgid "WikiPage|Tip: You can move this page by adding the path to the beginning of the title."
@@ -37005,10 +37017,16 @@ msgstr ""
msgid "WikiPage|To link to a (new) page, simply type %{linkExample}. More examples are in the %{linkStart}documentation%{linkEnd}."
msgstr ""
+msgid "WikiPage|Try the new visual Markdown editor. Read the %{linkStart}documentation%{linkEnd} to learn what's currently supported."
+msgstr ""
+
+msgid "WikiPage|Try this later"
+msgstr ""
+
msgid "WikiPage|Update %{pageTitle}"
msgstr ""
-msgid "WikiPage|Use new editor"
+msgid "WikiPage|Use the new editor"
msgstr ""
msgid "WikiPage|Write your content or drag files hereā€¦"
diff --git a/spec/controllers/projects/service_hook_logs_controller_spec.rb b/spec/controllers/projects/service_hook_logs_controller_spec.rb
index 97fb31f0546..040e59fc822 100644
--- a/spec/controllers/projects/service_hook_logs_controller_spec.rb
+++ b/spec/controllers/projects/service_hook_logs_controller_spec.rb
@@ -5,13 +5,13 @@ require 'spec_helper'
RSpec.describe Projects::ServiceHookLogsController do
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
- let(:service) { create(:drone_ci_service, project: project) }
- let(:log) { create(:web_hook_log, web_hook: service.service_hook) }
+ let(:integration) { create(:drone_ci_integration, project: project) }
+ let(:log) { create(:web_hook_log, web_hook: integration.service_hook) }
let(:log_params) do
{
namespace_id: project.namespace,
project_id: project,
- service_id: service.to_param,
+ service_id: integration.to_param,
id: log.id
}
end
@@ -35,7 +35,7 @@ RSpec.describe Projects::ServiceHookLogsController do
it 'executes the hook and redirects to the service form' do
expect_any_instance_of(ServiceHook).to receive(:execute)
expect_any_instance_of(described_class).to receive(:set_hook_execution_notice)
- expect(subject).to redirect_to(edit_project_service_path(project, service))
+ expect(subject).to redirect_to(edit_project_service_path(project, integration))
end
end
end
diff --git a/spec/docs_screenshots/wiki_docs.rb b/spec/docs_screenshots/wiki_docs.rb
index ce30b07182c..e7b71408b1c 100644
--- a/spec/docs_screenshots/wiki_docs.rb
+++ b/spec/docs_screenshots/wiki_docs.rb
@@ -21,18 +21,18 @@ RSpec.describe 'Wiki', :js do
context 'switching to content editor' do
it 'user/project/wiki/img/use_new_editor_button' do
- screenshot_area = find('.js-quick-submit')
+ screenshot_area = find('[data-testid="wiki-form-content-fieldset"]')
scroll_to screenshot_area
- expect(screenshot_area).to have_content 'Use new editor'
- set_crop_data(screenshot_area, 10)
+ expect(screenshot_area).to have_content 'Use the new editor'
+ set_crop_data(screenshot_area, 0)
end
end
context 'content editor' do
it 'user/project/wiki/img/content_editor' do
- content_editor_testid = '[data-testid="content-editor"]'
+ content_editor_testid = '[data-testid="wiki-form-content-fieldset"]'
- click_button 'Use new editor'
+ click_button 'Use the new editor'
expect(page).to have_css(content_editor_testid)
@@ -41,7 +41,7 @@ RSpec.describe 'Wiki', :js do
find("#{content_editor_testid} [contenteditable]").send_keys '## Using the Content Editor'
- set_crop_data(screenshot_area, 50)
+ set_crop_data(screenshot_area, 0)
end
end
end
diff --git a/spec/factories/integrations.rb b/spec/factories/integrations.rb
index 4f60398652c..fd570ca9c50 100644
--- a/spec/factories/integrations.rb
+++ b/spec/factories/integrations.rb
@@ -38,7 +38,7 @@ FactoryBot.define do
end
end
- factory :drone_ci_service, class: 'Integrations::DroneCi' do
+ factory :drone_ci_integration, class: 'Integrations::DroneCi' do
project
active { true }
drone_url { 'https://bamboo.example.com' }
diff --git a/spec/frontend/pages/shared/wikis/components/wiki_form_spec.js b/spec/frontend/pages/shared/wikis/components/wiki_form_spec.js
index ac3974362e8..f36d6262b5f 100644
--- a/spec/frontend/pages/shared/wikis/components/wiki_form_spec.js
+++ b/spec/frontend/pages/shared/wikis/components/wiki_form_spec.js
@@ -27,9 +27,11 @@ describe('WikiForm', () => {
const findMessage = () => wrapper.find('#wiki_message');
const findSubmitButton = () => wrapper.findByTestId('wiki-submit-button');
const findCancelButton = () => wrapper.findByRole('link', { name: 'Cancel' });
- const findUseNewEditorButton = () => wrapper.findByRole('button', { name: 'Use new editor' });
+ const findUseNewEditorButton = () => wrapper.findByRole('button', { name: 'Use the new editor' });
+ const findDismissContentEditorAlertButton = () =>
+ wrapper.findByRole('button', { name: 'Try this later' });
const findSwitchToOldEditorButton = () =>
- wrapper.findByRole('button', { name: 'Switch to old editor' });
+ wrapper.findByRole('button', { name: 'Switch me back to the classic editor.' });
const findTitleHelpLink = () => wrapper.findByRole('link', { name: 'More Information.' });
const findMarkdownHelpLink = () => wrapper.findByTestId('wiki-markdown-help-link');
@@ -284,7 +286,7 @@ describe('WikiForm', () => {
${'markdown'} | ${true}
${'rdoc'} | ${false}
`(
- 'switch to new editor button exists: $buttonExists if format is $format',
+ 'gl-alert containing "use new editor" button exists: $buttonExists if format is $format',
async ({ format, buttonExists }) => {
setFormat(format);
@@ -294,6 +296,12 @@ describe('WikiForm', () => {
},
);
+ it('gl-alert containing "use new editor" button is dismissed on clicking dismiss button', async () => {
+ await findDismissContentEditorAlertButton().trigger('click');
+
+ expect(findUseNewEditorButton().exists()).toBe(false);
+ });
+
const assertOldEditorIsVisible = () => {
expect(wrapper.findComponent(ContentEditor).exists()).toBe(false);
expect(wrapper.findComponent(MarkdownField).exists()).toBe(true);
@@ -307,7 +315,7 @@ describe('WikiForm', () => {
);
};
- it('shows old editor by default', assertOldEditorIsVisible);
+ it('shows classic editor by default', assertOldEditorIsVisible);
describe('switch format to rdoc', () => {
beforeEach(async () => {
@@ -316,7 +324,7 @@ describe('WikiForm', () => {
await wrapper.vm.$nextTick();
});
- it('continues to show the old editor', assertOldEditorIsVisible);
+ it('continues to show the classic editor', assertOldEditorIsVisible);
describe('switch format back to markdown', () => {
beforeEach(async () => {
@@ -326,7 +334,7 @@ describe('WikiForm', () => {
});
it(
- 'still shows the old editor and does not automatically switch to the content editor ',
+ 'still shows the classic editor and does not automatically switch to the content editor ',
assertOldEditorIsVisible,
);
});
@@ -351,12 +359,12 @@ describe('WikiForm', () => {
expect(findSubmitButton().props('disabled')).toBe(true);
});
- describe('clicking "switch to old editor"', () => {
+ describe('clicking "switch to classic editor"', () => {
beforeEach(() => {
return findSwitchToOldEditorButton().trigger('click');
});
- it('switches to old editor directly without showing a modal', () => {
+ it('switches to classic editor directly without showing a modal', () => {
expect(wrapper.findComponent(ContentEditor).exists()).toBe(false);
expect(wrapper.findComponent(MarkdownField).exists()).toBe(true);
});
@@ -374,11 +382,12 @@ describe('WikiForm', () => {
expect(wrapper.findComponent(GlLoadingIcon).exists()).toBe(true);
});
+ it('shows a tip to send feedback', () => {
+ expect(wrapper.text()).toContain('Tell us your experiences with the new Markdown editor');
+ });
+
it('shows warnings that the rich text editor is in beta and may not work properly', () => {
expect(wrapper.text()).toContain(
- "Switching will discard any changes you've made in the new editor.",
- );
- expect(wrapper.text()).toContain(
"This editor is in beta and may not display the page's contents properly.",
);
});
@@ -456,7 +465,7 @@ describe('WikiForm', () => {
expect(findContent().element.value).toBe('hello **world**');
});
- describe('clicking "switch to old editor"', () => {
+ describe('clicking "switch to classic editor"', () => {
let modal;
beforeEach(async () => {
@@ -470,7 +479,7 @@ describe('WikiForm', () => {
expect(modal.vm.show).toHaveBeenCalled();
});
- describe('confirming "switch to old editor" in the modal', () => {
+ describe('confirming "switch to classic editor" in the modal', () => {
beforeEach(async () => {
wrapper.vm.contentEditor.tiptapEditor.commands.setContent(
'<p>hello __world__ from content editor</p>',
@@ -482,7 +491,7 @@ describe('WikiForm', () => {
await wrapper.vm.$nextTick();
});
- it('switches to old editor', () => {
+ it('switches to classic editor', () => {
expect(wrapper.findComponent(ContentEditor).exists()).toBe(false);
expect(wrapper.findComponent(MarkdownField).exists()).toBe(true);
});
@@ -493,7 +502,7 @@ describe('WikiForm', () => {
);
});
- it('the old editor retains its old value and does not use the content from the content editor', () => {
+ it('the classic editor retains its old value and does not use the content from the content editor', () => {
expect(findContent().element.value).toBe(' My page content ');
});
});
diff --git a/spec/graphql/types/projects/service_type_spec.rb b/spec/graphql/types/projects/service_type_spec.rb
index 83ea832d370..567bdfaec24 100644
--- a/spec/graphql/types/projects/service_type_spec.rb
+++ b/spec/graphql/types/projects/service_type_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Types::Projects::ServiceType do
it 'resolves the corresponding type for objects' do
expect(described_class.resolve_type(build(:jira_service), {})).to eq(Types::Projects::Services::JiraServiceType)
expect(described_class.resolve_type(build(:service), {})).to eq(Types::Projects::Services::BaseServiceType)
- expect(described_class.resolve_type(build(:drone_ci_service), {})).to eq(Types::Projects::Services::BaseServiceType)
+ expect(described_class.resolve_type(build(:drone_ci_integration), {})).to eq(Types::Projects::Services::BaseServiceType)
expect(described_class.resolve_type(build(:custom_issue_tracker_integration), {})).to eq(Types::Projects::Services::BaseServiceType)
end
end
diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb
index de61402b6d3..d529d4a96e1 100644
--- a/spec/lib/gitlab/auth_spec.rb
+++ b/spec/lib/gitlab/auth_spec.rb
@@ -196,8 +196,8 @@ RSpec.describe Gitlab::Auth, :use_clean_rails_memory_store_caching do
end
it 'recognizes other ci services' do
- project.create_drone_ci_service(active: true)
- project.drone_ci_service.update(token: 'token')
+ project.create_drone_ci_integration(active: true)
+ project.drone_ci_integration.update(token: 'token')
expect(gl_auth.find_for_git_client('drone-ci-token', 'token', project: project, ip: 'ip')).to eq(Gitlab::Auth::Result.new(nil, project, :ci, described_class.build_authentication_abilities))
end
diff --git a/spec/lib/gitlab/diff/highlight_cache_spec.rb b/spec/lib/gitlab/diff/highlight_cache_spec.rb
index 4c56911e665..9e94a63ea4b 100644
--- a/spec/lib/gitlab/diff/highlight_cache_spec.rb
+++ b/spec/lib/gitlab/diff/highlight_cache_spec.rb
@@ -238,17 +238,7 @@ RSpec.describe Gitlab::Diff::HighlightCache, :clean_gitlab_redis_cache do
subject { cache.key }
it 'returns cache key' do
- is_expected.to eq("highlighted-diff-files:#{cache.diffable.cache_key}:2:#{cache.diff_options}:true:true:true")
- end
-
- context 'when the `introduce_marker_ranges` feature flag is disabled' do
- before do
- stub_feature_flags(introduce_marker_ranges: false)
- end
-
- it 'returns the original version of the cache' do
- is_expected.to eq("highlighted-diff-files:#{cache.diffable.cache_key}:2:#{cache.diff_options}:false:true:true")
- end
+ is_expected.to eq("highlighted-diff-files:#{cache.diffable.cache_key}:2:#{cache.diff_options}:true:true")
end
context 'when the `use_marker_ranges` feature flag is disabled' do
@@ -257,7 +247,7 @@ RSpec.describe Gitlab::Diff::HighlightCache, :clean_gitlab_redis_cache do
end
it 'returns the original version of the cache' do
- is_expected.to eq("highlighted-diff-files:#{cache.diffable.cache_key}:2:#{cache.diff_options}:true:false:true")
+ is_expected.to eq("highlighted-diff-files:#{cache.diffable.cache_key}:2:#{cache.diff_options}:false:true")
end
end
@@ -267,7 +257,7 @@ RSpec.describe Gitlab::Diff::HighlightCache, :clean_gitlab_redis_cache do
end
it 'returns the original version of the cache' do
- is_expected.to eq("highlighted-diff-files:#{cache.diffable.cache_key}:2:#{cache.diff_options}:true:true:false")
+ is_expected.to eq("highlighted-diff-files:#{cache.diffable.cache_key}:2:#{cache.diff_options}:true:false")
end
end
end
diff --git a/spec/lib/gitlab/diff/highlight_spec.rb b/spec/lib/gitlab/diff/highlight_spec.rb
index 94d3b2ad0b3..94b28c38fa2 100644
--- a/spec/lib/gitlab/diff/highlight_spec.rb
+++ b/spec/lib/gitlab/diff/highlight_spec.rb
@@ -56,26 +56,6 @@ RSpec.describe Gitlab::Diff::Highlight do
expect(subject[5].rich_text).to eq(code)
end
- context 'when introduce_marker_ranges is false' do
- before do
- stub_feature_flags(introduce_marker_ranges: false)
- end
-
- it 'keeps the old bevavior (without mode classes)' do
- code = %Q{+<span id="LC9" class="line" lang="ruby"> <span class="k">raise</span> <span class="no"><span class="idiff left">RuntimeError</span></span><span class="p"><span class="idiff">,</span></span><span class="idiff right"> </span><span class="s2">"System commands must be given as an array of strings"</span></span>\n}
-
- expect(subject[5].rich_text).to eq(code)
- end
-
- context 'when use_marker_ranges feature flag is false too' do
- it 'does not affect the result' do
- code = %Q{+<span id="LC9" class="line" lang="ruby"> <span class="k">raise</span> <span class="no"><span class="idiff left">RuntimeError</span></span><span class="p"><span class="idiff">,</span></span><span class="idiff right"> </span><span class="s2">"System commands must be given as an array of strings"</span></span>\n}
-
- expect(subject[5].rich_text).to eq(code)
- end
- end
- end
-
context 'when no diff_refs' do
before do
allow(diff_file).to receive(:diff_refs).and_return(nil)
diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml
index 085b0b4e259..781c55f8d9b 100644
--- a/spec/lib/gitlab/import_export/all_models.yml
+++ b/spec/lib/gitlab/import_export/all_models.yml
@@ -363,9 +363,9 @@ project:
- integrations
- campfire_integration
- confluence_integration
-- datadog_service
-- discord_service
-- drone_ci_service
+- datadog_integration
+- discord_integration
+- drone_ci_integration
- emails_on_push_service
- pipelines_email_service
- mattermost_slash_commands_service
diff --git a/spec/models/integrations/drone_ci_spec.rb b/spec/models/integrations/drone_ci_spec.rb
index cae1cd189a9..137f078edca 100644
--- a/spec/models/integrations/drone_ci_spec.rb
+++ b/spec/models/integrations/drone_ci_spec.rb
@@ -31,7 +31,7 @@ RSpec.describe Integrations::DroneCi, :use_clean_rails_memory_store_caching do
end
end
- shared_context :drone_ci_service do
+ shared_context :drone_ci_integration do
let(:drone) { described_class.new }
let(:project) { create(:project, :repository, name: 'project') }
let(:path) { project.full_path }
@@ -67,14 +67,14 @@ RSpec.describe Integrations::DroneCi, :use_clean_rails_memory_store_caching do
end
describe "service page/path methods" do
- include_context :drone_ci_service
+ include_context :drone_ci_integration
it { expect(drone.build_page(sha, branch)).to eq(build_page) }
it { expect(drone.commit_status_path(sha, branch)).to eq(commit_status_path) }
end
describe '#commit_status' do
- include_context :drone_ci_service
+ include_context :drone_ci_integration
it 'returns the contents of the reactive cache' do
stub_reactive_cache(drone, { commit_status: 'foo' }, 'sha', 'ref')
@@ -84,7 +84,7 @@ RSpec.describe Integrations::DroneCi, :use_clean_rails_memory_store_caching do
end
describe '#calculate_reactive_cache' do
- include_context :drone_ci_service
+ include_context :drone_ci_integration
describe '#commit_status' do
subject { drone.calculate_reactive_cache(sha, branch)[:commit_status] }
@@ -130,7 +130,7 @@ RSpec.describe Integrations::DroneCi, :use_clean_rails_memory_store_caching do
end
describe "execute" do
- include_context :drone_ci_service
+ include_context :drone_ci_integration
let(:user) { create(:user, username: 'username') }
let(:push_sample_data) do
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 8874a604645..78e32571d7d 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -46,9 +46,9 @@ RSpec.describe Project, factory_default: :keep do
it { is_expected.to have_one(:asana_integration) }
it { is_expected.to have_many(:boards) }
it { is_expected.to have_one(:campfire_integration) }
- it { is_expected.to have_one(:datadog_service) }
- it { is_expected.to have_one(:discord_service) }
- it { is_expected.to have_one(:drone_ci_service) }
+ it { is_expected.to have_one(:datadog_integration) }
+ it { is_expected.to have_one(:discord_integration) }
+ it { is_expected.to have_one(:drone_ci_integration) }
it { is_expected.to have_one(:emails_on_push_service) }
it { is_expected.to have_one(:pipelines_email_service) }
it { is_expected.to have_one(:irker_service) }
diff --git a/spec/presenters/service_hook_presenter_spec.rb b/spec/presenters/service_hook_presenter_spec.rb
index bc6e505d9e1..7d7b71f324a 100644
--- a/spec/presenters/service_hook_presenter_spec.rb
+++ b/spec/presenters/service_hook_presenter_spec.rb
@@ -4,15 +4,15 @@ require 'spec_helper'
RSpec.describe ServiceHookPresenter do
let(:web_hook_log) { create(:web_hook_log, web_hook: service_hook) }
- let(:service_hook) { create(:service_hook, integration: service) }
- let(:service) { create(:drone_ci_service, project: project) }
+ let(:service_hook) { create(:service_hook, integration: integration) }
+ let(:integration) { create(:drone_ci_integration, project: project) }
let(:project) { create(:project) }
describe '#logs_details_path' do
subject { service_hook.present.logs_details_path(web_hook_log) }
let(:expected_path) do
- "/#{project.namespace.path}/#{project.name}/-/services/#{service.to_param}/hook_logs/#{web_hook_log.id}"
+ "/#{project.namespace.path}/#{project.name}/-/services/#{integration.to_param}/hook_logs/#{web_hook_log.id}"
end
it { is_expected.to eq(expected_path) }
@@ -22,7 +22,7 @@ RSpec.describe ServiceHookPresenter do
subject { service_hook.present.logs_retry_path(web_hook_log) }
let(:expected_path) do
- "/#{project.namespace.path}/#{project.name}/-/services/#{service.to_param}/hook_logs/#{web_hook_log.id}/retry"
+ "/#{project.namespace.path}/#{project.name}/-/services/#{integration.to_param}/hook_logs/#{web_hook_log.id}/retry"
end
it { is_expected.to eq(expected_path) }
diff --git a/spec/presenters/web_hook_log_presenter_spec.rb b/spec/presenters/web_hook_log_presenter_spec.rb
index ec930be266d..aa9d1d8f545 100644
--- a/spec/presenters/web_hook_log_presenter_spec.rb
+++ b/spec/presenters/web_hook_log_presenter_spec.rb
@@ -18,10 +18,10 @@ RSpec.describe WebHookLogPresenter do
end
context 'service hook' do
- let(:web_hook) { create(:service_hook, integration: service) }
- let(:service) { create(:drone_ci_service, project: project) }
+ let(:web_hook) { create(:service_hook, integration: integration) }
+ let(:integration) { create(:drone_ci_integration, project: project) }
- it { is_expected.to eq(project_service_hook_log_path(project, service, web_hook_log)) }
+ it { is_expected.to eq(project_service_hook_log_path(project, integration, web_hook_log)) }
end
end
@@ -38,10 +38,10 @@ RSpec.describe WebHookLogPresenter do
end
context 'service hook' do
- let(:web_hook) { create(:service_hook, integration: service) }
- let(:service) { create(:drone_ci_service, project: project) }
+ let(:web_hook) { create(:service_hook, integration: integration) }
+ let(:integration) { create(:drone_ci_integration, project: project) }
- it { is_expected.to eq(retry_project_service_hook_log_path(project, service, web_hook_log)) }
+ it { is_expected.to eq(retry_project_service_hook_log_path(project, integration, web_hook_log)) }
end
end
end
diff --git a/spec/support/shared_contexts/features/integrations/integrations_shared_context.rb b/spec/support/shared_contexts/features/integrations/integrations_shared_context.rb
index 7a9f89b4837..e532b42fd1c 100644
--- a/spec/support/shared_contexts/features/integrations/integrations_shared_context.rb
+++ b/spec/support/shared_contexts/features/integrations/integrations_shared_context.rb
@@ -5,7 +5,7 @@ Integration.available_services_names.each do |service|
include JiraServiceHelper if service == 'jira'
let(:dashed_service) { service.dasherize }
- let(:service_method) { integration_association(service) }
+ let(:service_method) { Project.integration_association_name(service) }
let(:service_klass) { Integration.integration_name_to_model(service) }
let(:service_instance) { service_klass.new }
let(:service_fields) { service_instance.fields }
@@ -57,16 +57,6 @@ Integration.available_services_names.each do |service|
service_item
end
- # Returns the association name for the given integration.
- # Example: 'asana' => 'asana_integration'
- def integration_association(name)
- if Integration::RENAMED_TO_INTEGRATION.include?(name)
- "#{name}_integration".to_sym
- else
- "#{name}_service".to_sym
- end
- end
-
private
def enable_license_for_service(service)
diff --git a/spec/views/projects/services/edit.html.haml_spec.rb b/spec/views/projects/services/edit.html.haml_spec.rb
index 8ac0a3363be..a5460adbd2c 100644
--- a/spec/views/projects/services/edit.html.haml_spec.rb
+++ b/spec/views/projects/services/edit.html.haml_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
RSpec.describe 'projects/services/edit' do
- let(:integration) { create(:drone_ci_service, project: project) }
+ let(:integration) { create(:drone_ci_integration, project: project) }
let(:project) { create(:project) }
before do