diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-18 21:11:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-18 21:11:03 +0300 |
commit | 962b96e640834c04a729f7478afa48d3dedf9fca (patch) | |
tree | b2f9a9407a80f45901dd462a3954600aad953209 /doc/development | |
parent | b81ffd93854bcc57c493745137578f141ac8a78f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development')
36 files changed, 78 insertions, 43 deletions
diff --git a/doc/development/backend/ruby_style_guide.md b/doc/development/backend/ruby_style_guide.md index d239d7bbf49..384d8122ccf 100644 --- a/doc/development/backend/ruby_style_guide.md +++ b/doc/development/backend/ruby_style_guide.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/contributing/design.md b/doc/development/contributing/design.md index bc6ec96cf49..c4ec0f66b62 100644 --- a/doc/development/contributing/design.md +++ b/doc/development/contributing/design.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/contributing/first_contribution.md b/doc/development/contributing/first_contribution.md index 0c21ad60951..3477590f40b 100644 --- a/doc/development/contributing/first_contribution.md +++ b/doc/development/contributing/first_contribution.md @@ -1,6 +1,6 @@ --- stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/contributing/index.md b/doc/development/contributing/index.md index 54eeaefefd5..abec161bd6e 100644 --- a/doc/development/contributing/index.md +++ b/doc/development/contributing/index.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/contributing/issue_workflow.md b/doc/development/contributing/issue_workflow.md index 0f8341ea623..0b1c7303fc0 100644 --- a/doc/development/contributing/issue_workflow.md +++ b/doc/development/contributing/issue_workflow.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/contributing/merge_request_workflow.md b/doc/development/contributing/merge_request_workflow.md index b0794f96f9b..e739799557e 100644 --- a/doc/development/contributing/merge_request_workflow.md +++ b/doc/development/contributing/merge_request_workflow.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/contributing/style_guides.md b/doc/development/contributing/style_guides.md index 651c7214275..80ac0b872d6 100644 --- a/doc/development/contributing/style_guides.md +++ b/doc/development/contributing/style_guides.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/contributing/verify/index.md b/doc/development/contributing/verify/index.md index e94b7583904..8d1bd3c76f0 100644 --- a/doc/development/contributing/verify/index.md +++ b/doc/development/contributing/verify/index.md @@ -1,7 +1,7 @@ --- type: reference, dev -stage: none -group: Verify +stage: Verify +group: Pipeline Execution --- # Contribute to Verify stage codebase diff --git a/doc/development/development_processes.md b/doc/development/development_processes.md index 4ce9df8d7da..1cdf667a35f 100644 --- a/doc/development/development_processes.md +++ b/doc/development/development_processes.md @@ -1,6 +1,6 @@ --- stage: none -group: Development +group: unassigned info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" --- diff --git a/doc/development/documentation/graphql_styleguide.md b/doc/development/documentation/graphql_styleguide.md index 79fcfc7e3f0..3c96dd06b25 100644 --- a/doc/development/documentation/graphql_styleguide.md +++ b/doc/development/documentation/graphql_styleguide.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" description: "Writing styles, markup, formatting, and other standards for GraphQL API's GitLab Documentation." --- diff --git a/doc/development/documentation/styleguide/word_list.md b/doc/development/documentation/styleguide/word_list.md index 860bc8790e2..ad2cbee974b 100644 --- a/doc/development/documentation/styleguide/word_list.md +++ b/doc/development/documentation/styleguide/word_list.md @@ -1,6 +1,6 @@ --- stage: none -group: Style Guide +group: Documentation Guidelines info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments description: 'Writing styles, markup, formatting, and other standards for GitLab Documentation.' --- diff --git a/doc/development/documentation/topic_types/concept.md b/doc/development/documentation/topic_types/concept.md index c9aedf940a2..50220b9bebe 100644 --- a/doc/development/documentation/topic_types/concept.md +++ b/doc/development/documentation/topic_types/concept.md @@ -1,6 +1,6 @@ --- stage: none -group: Style Guide +group: Documentation Guidelines info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/documentation/topic_types/glossary.md b/doc/development/documentation/topic_types/glossary.md index 4985101a391..f6137953cb0 100644 --- a/doc/development/documentation/topic_types/glossary.md +++ b/doc/development/documentation/topic_types/glossary.md @@ -1,6 +1,6 @@ --- stage: none -group: Style Guide +group: Documentation Guidelines info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/documentation/topic_types/index.md b/doc/development/documentation/topic_types/index.md index 40039ca5b1a..10e7e3d2014 100644 --- a/doc/development/documentation/topic_types/index.md +++ b/doc/development/documentation/topic_types/index.md @@ -1,6 +1,6 @@ --- stage: none -group: Style Guide +group: Documentation Guidelines info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/documentation/topic_types/reference.md b/doc/development/documentation/topic_types/reference.md index 8bb89f4c210..ef2ca2f791d 100644 --- a/doc/development/documentation/topic_types/reference.md +++ b/doc/development/documentation/topic_types/reference.md @@ -1,6 +1,6 @@ --- stage: none -group: Style Guide +group: Documentation Guidelines info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/documentation/topic_types/task.md b/doc/development/documentation/topic_types/task.md index 7fb4201ac40..a6e4c01505d 100644 --- a/doc/development/documentation/topic_types/task.md +++ b/doc/development/documentation/topic_types/task.md @@ -1,6 +1,6 @@ --- stage: none -group: Style Guide +group: Documentation Guidelines info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/documentation/topic_types/troubleshooting.md b/doc/development/documentation/topic_types/troubleshooting.md index 4b23117acdb..a2fe6f8ca2d 100644 --- a/doc/development/documentation/topic_types/troubleshooting.md +++ b/doc/development/documentation/topic_types/troubleshooting.md @@ -1,6 +1,6 @@ --- stage: none -group: Style Guide +group: Documentation Guidelines info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/documentation/topic_types/tutorial.md b/doc/development/documentation/topic_types/tutorial.md index 9a8d1db5e3e..50976149cf8 100644 --- a/doc/development/documentation/topic_types/tutorial.md +++ b/doc/development/documentation/topic_types/tutorial.md @@ -1,6 +1,6 @@ --- stage: none -group: Style Guide +group: Documentation Guidelines info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md index 27497f7d994..10943b2d135 100644 --- a/doc/development/ee_features.md +++ b/doc/development/ee_features.md @@ -18,7 +18,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w [EE features list](https://about.gitlab.com/features/). <!-- markdownlint-enable MD044 --> -## SaaS only feature +## SaaS-only feature Use the following guidelines when you develop a feature that is only applicable for SaaS (for example, a CustomersDot integration). @@ -27,14 +27,14 @@ However, there are cases when a feature should only be available on SaaS and thi accomplished. It is recommended you use `Gitlab::Saas.feature_available?`. This enables -context rich definitions around the reason the feature is SaaS only. +context rich definitions around the reason the feature is SaaS-only. -### Implementing a SaaS only feature with `Gitlab::Saas.feature_available?` +### Implementing a SaaS-only feature with `Gitlab::Saas.feature_available?` #### Adding to the FEATURES constant 1. See the [namespacing concepts guide](software_design.md#use-namespaces-to-define-bounded-contexts) - for help in naming a new SaaS only feature. + for help in naming a new SaaS-only feature. 1. Add the new feature to `FEATURE` in `ee/lib/ee/gitlab/saas.rb`. ```ruby @@ -43,7 +43,7 @@ context rich definitions around the reason the feature is SaaS only. 1. Use the new feature in code with `Gitlab::Saas.feature_available?('some_domain/new_feature_name')`. -#### SaaS only feature definition and validation +#### SaaS-only feature definition and validation This process is meant to ensure consistent SaaS feature usage in the codebase. All SaaS features **must**: @@ -63,7 +63,7 @@ Each SaaS feature is defined in a separate YAML file consisting of a number of f | `milestone` | no | Milestone in which the SaaS feature was created. | | `group` | no | The [group](https://about.gitlab.com/handbook/product/categories/#devops-stages) that owns the feature flag. | -### Opting out of a SaaS only feature on another SaaS instance (JiHu) +### Opting out of a SaaS-only feature on another SaaS instance (JiHu) Prepend the `ee/lib/ee/gitlab/saas.rb` module and override the `Gitlab::Saas.feature_available?` method. @@ -76,11 +76,46 @@ def feature_available?(feature) end ``` -### Do not use SaaS only features for functionality in CE +### Do not use SaaS-only features for functionality in CE `Gitlab::Saas.feature_vailable?` must not appear in CE. See [extending CE with EE guide](#extend-ce-features-with-ee-backend-code). +### SaaS-only features in tests + +Introducing a SaaS-only feature into the codebase creates an additional code path that should be tested. +It is strongly advised to include automated tests for all code affected by a SaaS-only feature, both when **enabled** and **disabled** +to ensure the feature works properly. + +To enable a SaaS-only feature in a test, use the `stub_saas_features` +helper. For example, to globally disable the `purchases/additional_minutes` feature +flag in a test: + +```ruby +stub_saas_features('purchases/additional_minutes' => false) + +::Gitlab::Saas.feature_available?('purchases/additional_minutes') # => false +``` + +A common pattern of testing both paths looks like: + +```ruby +it 'purchases/additional_minutes is not available' do + # tests assuming purchases/additional_minutes is not enabled by default + ::Gitlab::Saas.feature_available?('purchases/additional_minutes') # => false +end + +context 'when purchases/additional_minutes is available' do + before do + stub_saas_features('purchases/additional_minutes' => true) + end + + it 'returns true' do + ::Gitlab::Saas.feature_available?('purchases/additional_minutes') # => true + end +end +``` + ### Simulate a SaaS instance If you're developing locally and need your instance to simulate the SaaS (GitLab.com) diff --git a/doc/development/fe_guide/dark_mode.md b/doc/development/fe_guide/dark_mode.md index 144418f72cd..185bd60dd9a 100644 --- a/doc/development/fe_guide/dark_mode.md +++ b/doc/development/fe_guide/dark_mode.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/fe_guide/design_tokens.md b/doc/development/fe_guide/design_tokens.md index 78219809b05..b47c2661e19 100644 --- a/doc/development/fe_guide/design_tokens.md +++ b/doc/development/fe_guide/design_tokens.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md index 2b3a5ea8bfd..99070f3d31c 100644 --- a/doc/development/fe_guide/graphql.md +++ b/doc/development/fe_guide/graphql.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" --- diff --git a/doc/development/feature_development.md b/doc/development/feature_development.md index b1994f446cc..4dbde42b0ff 100644 --- a/doc/development/feature_development.md +++ b/doc/development/feature_development.md @@ -1,6 +1,6 @@ --- stage: none -group: Development +group: unassigned info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" --- diff --git a/doc/development/feature_flags/controls.md b/doc/development/feature_flags/controls.md index 79e04544c34..6c46780a5d7 100644 --- a/doc/development/feature_flags/controls.md +++ b/doc/development/feature_flags/controls.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" --- diff --git a/doc/development/feature_flags/index.md b/doc/development/feature_flags/index.md index f966395edb4..552a4ccc84b 100644 --- a/doc/development/feature_flags/index.md +++ b/doc/development/feature_flags/index.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" --- diff --git a/doc/development/index.md b/doc/development/index.md index 55e594c537a..71ab54c8a73 100644 --- a/doc/development/index.md +++ b/doc/development/index.md @@ -1,7 +1,7 @@ --- type: index, dev stage: none -group: Development +group: unassigned info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" description: "Development Guidelines: learn how to contribute to GitLab." --- diff --git a/doc/development/internal_users.md b/doc/development/internal_users.md index cf45cf941d0..2b809137906 100644 --- a/doc/development/internal_users.md +++ b/doc/development/internal_users.md @@ -2,7 +2,7 @@ description: "Internal users documentation." type: concepts, reference, dev stage: none -group: Development +group: unassigned info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" --- diff --git a/doc/development/labels/index.md b/doc/development/labels/index.md index dfd2a9e4fd3..c2caabda109 100644 --- a/doc/development/labels/index.md +++ b/doc/development/labels/index.md @@ -1,6 +1,6 @@ --- stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/packages/harbor_registry_development.md b/doc/development/packages/harbor_registry_development.md index dc97ecfa7b2..609aba9251c 100644 --- a/doc/development/packages/harbor_registry_development.md +++ b/doc/development/packages/harbor_registry_development.md @@ -1,6 +1,6 @@ --- stage: Package -group: Harbor Registry +group: Container Registry info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- # Harbor Registry diff --git a/doc/development/rubocop_development_guide.md b/doc/development/rubocop_development_guide.md index f6c11a0c7e3..6568d025ca5 100644 --- a/doc/development/rubocop_development_guide.md +++ b/doc/development/rubocop_development_guide.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/secure_coding_guidelines.md b/doc/development/secure_coding_guidelines.md index e2c0e3156eb..180d35e04fe 100644 --- a/doc/development/secure_coding_guidelines.md +++ b/doc/development/secure_coding_guidelines.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" --- diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md index 89e2442e33c..dbee7acac69 100644 --- a/doc/development/testing_guide/best_practices.md +++ b/doc/development/testing_guide/best_practices.md @@ -1,7 +1,7 @@ --- type: reference, dev stage: none -group: Development +group: unassigned info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" description: "GitLab development guidelines - testing best practices." --- diff --git a/doc/development/testing_guide/contract/consumer_tests.md b/doc/development/testing_guide/contract/consumer_tests.md index 60ce71db79d..4a84dafdcf2 100644 --- a/doc/development/testing_guide/contract/consumer_tests.md +++ b/doc/development/testing_guide/contract/consumer_tests.md @@ -1,6 +1,6 @@ --- stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/testing_guide/contract/index.md b/doc/development/testing_guide/contract/index.md index 577699fa828..45933e9cb4f 100644 --- a/doc/development/testing_guide/contract/index.md +++ b/doc/development/testing_guide/contract/index.md @@ -1,6 +1,6 @@ --- stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/testing_guide/contract/provider_tests.md b/doc/development/testing_guide/contract/provider_tests.md index 71940941d51..86ac6518d2f 100644 --- a/doc/development/testing_guide/contract/provider_tests.md +++ b/doc/development/testing_guide/contract/provider_tests.md @@ -1,6 +1,6 @@ --- stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- diff --git a/doc/development/testing_guide/end_to_end/best_practices.md b/doc/development/testing_guide/end_to_end/best_practices.md index ab4dd9acb63..8cf1a46d5d2 100644 --- a/doc/development/testing_guide/end_to_end/best_practices.md +++ b/doc/development/testing_guide/end_to_end/best_practices.md @@ -1,6 +1,6 @@ --- stage: none -group: Development +group: unassigned info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments --- |