diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-07 09:09:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-07 09:09:58 +0300 |
commit | c2f9cac32e8141a9cd909ee654580d7472c531a0 (patch) | |
tree | 0b906b9f20b4f940261f8a3655ccee1f92f63dd5 | |
parent | cd0a6b898238d02cf862379a6fe06e96a737bbb5 (diff) |
Add latest changes from gitlab-org/gitlab@master
21 files changed, 177 insertions, 78 deletions
diff --git a/app/assets/javascripts/vue_shared/components/color_picker/color_picker.vue b/app/assets/javascripts/vue_shared/components/color_picker/color_picker.vue index 3c21b14894b..7563c35dfc8 100644 --- a/app/assets/javascripts/vue_shared/components/color_picker/color_picker.vue +++ b/app/assets/javascripts/vue_shared/components/color_picker/color_picker.vue @@ -81,8 +81,8 @@ export default { }, }, i18n: { - fullDescription: __('Choose any color. Or you can choose one of the suggested colors below'), - shortDescription: __('Choose any color'), + fullDescription: __('Enter any color or choose one of the suggested colors below.'), + shortDescription: __('Enter any color.'), }, }; </script> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents.vue index 1e3d7814829..445df0496cf 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/dropdown_contents.vue @@ -87,9 +87,6 @@ export default { return isDropdownVariantStandalone(this.variant); }, }, - mounted() { - this.$refs.dropdown.show(); - }, methods: { toggleDropdownContentsCreateView() { this.showDropdownContentsCreateView = !this.showDropdownContentsCreateView; @@ -101,6 +98,9 @@ export default { this.$refs.dropdown.$refs.dropdown.$_popper.scheduleUpdate(); } }, + showDropdown() { + this.$refs.dropdown.show(); + }, closeDropdown() { this.$emit('setLabels', this.localSelectedLabels); this.$refs.dropdown.hide(); diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue index 496bb9817f0..a9868ce66db 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue @@ -141,6 +141,9 @@ export default { handleCollapsedValueClick() { this.$emit('toggleCollapse'); }, + showDropdownContents() { + this.$refs.dropdownContents.showDropdown(); + }, isDropdownVariantSidebar, isDropdownVariantStandalone, isDropdownVariantEmbedded, @@ -167,6 +170,7 @@ export default { :title="__('Labels')" :loading="isLoading" :can-edit="allowLabelEdit" + @open="showDropdownContents" > <template #collapsed> <dropdown-value @@ -180,7 +184,7 @@ export default { <slot></slot> </dropdown-value> </template> - <template #default="{ edit }"> + <template #default> <dropdown-value :disable-labels="labelsSelectInProgress" :selected-labels="issuableLabels" @@ -193,7 +197,7 @@ export default { <slot></slot> </dropdown-value> <dropdown-contents - v-if="edit" + ref="dropdownContents" :dropdown-button-text="dropdownButtonText" :allow-multiselect="allowMultiselect" :labels-list-title="labelsListTitle" diff --git a/app/models/repository.rb b/app/models/repository.rb index 4b784a3cd84..119d874a6e1 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -732,7 +732,7 @@ class Repository end def tags_sorted_by(value) - return raw_repository.tags(sort_by: value) if Feature.enabled?(:gitaly_tags_finder, project, default_enabled: :yaml) + return raw_repository.tags(sort_by: value) if Feature.enabled?(:tags_finder_gitaly, project, default_enabled: :yaml) tags_ruby_sort(value) end diff --git a/config/feature_flags/development/gitaly_tags_finder.yml b/config/feature_flags/development/tags_finder_gitaly.yml index a0a1791e584..065a253a69f 100644 --- a/config/feature_flags/development/gitaly_tags_finder.yml +++ b/config/feature_flags/development/tags_finder_gitaly.yml @@ -1,8 +1,8 @@ --- -name: gitaly_tags_finder +name: tags_finder_gitaly introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69101 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/339741 milestone: '14.3' type: development group: group::source code -default_enabled: false +default_enabled: true diff --git a/db/post_migrate/20211005010101_rereschedule_delete_orphaned_deployments.rb b/db/post_migrate/20211005010101_rereschedule_delete_orphaned_deployments.rb new file mode 100644 index 00000000000..f49a0fe2f56 --- /dev/null +++ b/db/post_migrate/20211005010101_rereschedule_delete_orphaned_deployments.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class RerescheduleDeleteOrphanedDeployments < Gitlab::Database::Migration[1.0] + MIGRATION = 'DeleteOrphanedDeployments' + DELAY_INTERVAL = 2.minutes + + disable_ddl_transaction! + + # This is the third time to schedule `DeleteOrphanedDeployments` migration. + # The first time failed by an inappropriate batch size and the second time failed by a retry bug. + # Since there is no issue in this migration itself, we can simply requeue the + # migration jobs **without** no-op-ing the previous migration. + # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69051#note_669230405 for more information. + def up + delete_queued_jobs(MIGRATION) + + requeue_background_migration_jobs_by_range_at_intervals(MIGRATION, DELAY_INTERVAL) + end + + def down + # no-op + end +end diff --git a/db/schema_migrations/20211005010101 b/db/schema_migrations/20211005010101 new file mode 100644 index 00000000000..9789f36adea --- /dev/null +++ b/db/schema_migrations/20211005010101 @@ -0,0 +1 @@ +40e15593d9ee0fb5a59d1576c6da5a1eece265730f7ae15c5c81c2c5343b362c
\ No newline at end of file diff --git a/doc/administration/reference_architectures/10k_users.md b/doc/administration/reference_architectures/10k_users.md index e3bbf611019..4214589b2e0 100644 --- a/doc/administration/reference_architectures/10k_users.md +++ b/doc/administration/reference_architectures/10k_users.md @@ -1604,7 +1604,7 @@ To configure the Sidekiq nodes, on each one: 1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab package of your choice. Be sure to follow _only_ installation steps 1 and 2 on the page. -1. Open `/etc/gitlab/gitlab.rb` with your editor: +1. Create or edit `/etc/gitlab/gitlab.rb` and use the following configuration: ```ruby # Avoid running unnecessary services on the Sidekiq server @@ -1619,6 +1619,10 @@ To configure the Sidekiq nodes, on each one: gitlab_exporter['enable'] = false nginx['enable'] = false + # External URL + ## This should match the URL of the external load balancer + external_url 'https://gitlab.example.com' + # Redis ## Redis connection details ## First cluster that will host the cache diff --git a/doc/administration/reference_architectures/25k_users.md b/doc/administration/reference_architectures/25k_users.md index 782a5cc3af6..38fe4ec4fe3 100644 --- a/doc/administration/reference_architectures/25k_users.md +++ b/doc/administration/reference_architectures/25k_users.md @@ -1610,7 +1610,7 @@ To configure the Sidekiq nodes, on each one: 1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab package of your choice. Be sure to follow _only_ installation steps 1 and 2 on the page. -1. Open `/etc/gitlab/gitlab.rb` with your editor: +1. Create or edit `/etc/gitlab/gitlab.rb` and use the following configuration: ```ruby # Avoid running unnecessary services on the Sidekiq server @@ -1625,6 +1625,10 @@ To configure the Sidekiq nodes, on each one: gitlab_exporter['enable'] = false nginx['enable'] = false + # External URL + ## This should match the URL of the external load balancer + external_url 'https://gitlab.example.com' + # Redis ## Redis connection details ## First cluster that will host the cache diff --git a/doc/administration/reference_architectures/3k_users.md b/doc/administration/reference_architectures/3k_users.md index 80743a6a05f..c1be04d505e 100644 --- a/doc/administration/reference_architectures/3k_users.md +++ b/doc/administration/reference_architectures/3k_users.md @@ -1565,7 +1565,7 @@ To configure the Sidekiq nodes, one each one: 1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab package of your choice. Be sure to follow _only_ installation steps 1 and 2 on the page. -1. Open `/etc/gitlab/gitlab.rb` with your editor: +1. Create or edit `/etc/gitlab/gitlab.rb` and use the following configuration: ```ruby # Avoid running unnecessary services on the Sidekiq server @@ -1580,6 +1580,10 @@ To configure the Sidekiq nodes, one each one: gitlab_exporter['enable'] = false nginx['enable'] = false + # External URL + ## This should match the URL of the external load balancer + external_url 'https://gitlab.example.com' + # Redis redis['master_name'] = 'gitlab-redis' diff --git a/doc/administration/reference_architectures/50k_users.md b/doc/administration/reference_architectures/50k_users.md index d9f5eaa93fe..d1725f60d85 100644 --- a/doc/administration/reference_architectures/50k_users.md +++ b/doc/administration/reference_architectures/50k_users.md @@ -1617,7 +1617,7 @@ To configure the Sidekiq nodes, on each one: 1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab package of your choice. Be sure to follow _only_ installation steps 1 and 2 on the page. -1. Open `/etc/gitlab/gitlab.rb` with your editor: +1. Create or edit `/etc/gitlab/gitlab.rb` and use the following configuration: ```ruby # Avoid running unnecessary services on the Sidekiq server @@ -1632,6 +1632,10 @@ To configure the Sidekiq nodes, on each one: gitlab_exporter['enable'] = false nginx['enable'] = false + # External URL + ## This should match the URL of the external load balancer + external_url 'https://gitlab.example.com' + # Redis ## Redis connection details ## First cluster that will host the cache diff --git a/doc/administration/reference_architectures/5k_users.md b/doc/administration/reference_architectures/5k_users.md index 61049a2200b..845f0c42d7b 100644 --- a/doc/administration/reference_architectures/5k_users.md +++ b/doc/administration/reference_architectures/5k_users.md @@ -1555,7 +1555,7 @@ To configure the Sidekiq nodes, one each one: 1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab package of your choice. Be sure to follow _only_ installation steps 1 and 2 on the page. -1. Open `/etc/gitlab/gitlab.rb` with your editor: +1. Create or edit `/etc/gitlab/gitlab.rb` and use the following configuration: ```ruby # Avoid running unnecessary services on the Sidekiq server @@ -1570,6 +1570,10 @@ To configure the Sidekiq nodes, one each one: gitlab_exporter['enable'] = false nginx['enable'] = false + # External URL + ## This should match the URL of the external load balancer + external_url 'https://gitlab.example.com' + # Redis ## Must be the same in every sentinel node redis['master_name'] = 'gitlab-redis' diff --git a/doc/administration/sidekiq.md b/doc/administration/sidekiq.md index e753832f2c3..4aee88ed9cb 100644 --- a/doc/administration/sidekiq.md +++ b/doc/administration/sidekiq.md @@ -104,6 +104,16 @@ you want using steps 1 and 2 from the GitLab downloads page. You must also copy the `registry.key` file to each Sidekiq node. +1. Define the `external_url`. To maintain uniformity of links across nodes, the + `external_url` on the Sidekiq server should point to the external URL that users + will use to access GitLab. This will either be the `external_url` set on your + application server or the URL of a external load balancer which will route traffic + to the GitLab application server: + + ```ruby + external_url 'https://gitlab.example.com' + ``` + 1. Run `gitlab-ctl reconfigure`. You will need to restart the Sidekiq nodes after an update has occurred and database @@ -194,6 +204,9 @@ gitlab_rails['monitoring_whitelist'] = ['10.10.1.42', '127.0.0.1'] # Container Registry URL for cleanup jobs registry_external_url 'https://registry.example.com' gitlab_rails['registry_api_url'] = "https://registry.example.com" + +# External URL (this should match the URL used to access your GitLab instance) +external_url 'https://gitlab.example.com' ``` ## Further reading diff --git a/doc/api/projects.md b/doc/api/projects.md index a5f4250b2e6..024362f3246 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -2678,13 +2678,21 @@ Read more in the [Project members](members.md) documentation. > - Introduced in GitLab 11. > - Moved to GitLab Premium in 13.9. -Configure pull mirroring while [creating a new project](#create-project) or [updating an existing project](#edit-project) using the API if the remote repository is publicly accessible or via `username/password` authentication. In case your HTTP repository is not publicly accessible, you can add the authentication information to the URL: `https://username:password@gitlab.company.com/group/project.git`, where password is a [personal access token](../user/profile/personal_access_tokens.md) with the API scope enabled. - -The relevant API parameters to update are: - -- `import_url`: URL of remote repository being mirrored (with `username:password` if needed). -- `mirror`: Enables pull mirroring on project when set to `true`. -- `only_mirror_protected_branches`: Set to `true` for protected branches. +Configure pull mirroring while [creating a new project](#create-project) +or [updating an existing project](#edit-project) using the API +if the remote repository is publicly accessible +or via `username:token` authentication. +In case your HTTP repository is not publicly accessible, +you can add the authentication information to the URL: +`https://username:token@gitlab.company.com/group/project.git`, +where `token` is a [personal access token](../user/profile/personal_access_tokens.md) +with the API scope enabled. + +| Attribute | Type | Required | Description | +|--------------|---------|------------------------|-------------| +| `import_url` | string | **{check-circle}** Yes | URL of remote repository being mirrored (with `user:token` if needed). | +| `mirror` | boolean | **{check-circle}** Yes | Enables pull mirroring on project when set to `true`. | +| `only_mirror_protected_branches`| boolean | **{dotted-circle}** No | Limits mirroring to only protected branches when set to `true`. | ## Start the pull mirroring process for a Project **(PREMIUM)** diff --git a/doc/api/remote_mirrors.md b/doc/api/remote_mirrors.md index 55c1dfbd073..8b584285033 100644 --- a/doc/api/remote_mirrors.md +++ b/doc/api/remote_mirrors.md @@ -51,11 +51,15 @@ NOTE: For security reasons, the `url` attribute is always scrubbed of username and password information. -## Create a remote mirror +## Create a pull mirror + +Learn how to [configure a pull mirror](projects.md#configure-pull-mirroring-for-a-project) using the Projects API. + +## Create a push mirror > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/24189) in GitLab 12.9. -Create a remote mirror for a project. The mirror is disabled by default. You can enable it by including the optional parameter `enabled` when creating it: +Push mirroring is disabled by default. You can enable it by including the optional parameter `enabled` when creating it: ```plaintext POST /projects/:id/remote_mirrors @@ -63,7 +67,7 @@ POST /projects/:id/remote_mirrors | Attribute | Type | Required | Description | | :---------- | :----- | :--------- | :------------ | -| `url` | String | yes | The URL of the remote repository to be mirrored. | +| `url` | String | yes | The target URL to which the repository is mirrored. | | `enabled` | Boolean | no | Determines if the mirror is enabled. | | `only_protected_branches` | Boolean | no | Determines if only protected branches are mirrored. | | `keep_divergent_refs` | Boolean | no | Determines if divergent refs are skipped. | diff --git a/doc/user/project/settings/index.md b/doc/user/project/settings/index.md index e473e160f4e..da055d22695 100644 --- a/doc/user/project/settings/index.md +++ b/doc/user/project/settings/index.md @@ -39,17 +39,19 @@ You can use [emphasis](../../markdown.md#emphasis), [links](../../markdown.md#li > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/276221) in GitLab 13.9. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/287779) in GitLab 13.12. -You can create a framework label to identify that your project has certain compliance requirements -or needs additional oversight. +You can create a compliance framework label to identify that your project has certain compliance +requirements or needs additional oversight. The label can optionally apply +[compliance pipeline configuration](#compliance-pipeline-configuration). Group owners can create, edit, and delete compliance frameworks: -1. Go to the group's **Settings** > **General**. +1. On the top bar, select **Menu > Groups** and find your group. +1. On the left sidebar, select **Settings** > **General**. 1. Expand the **Compliance frameworks** section. -Compliance frameworks created can then be assigned to any number of projects using: +Compliance frameworks created can then be assigned to projects within the group using: -- The project settings page inside the group or subgroups. +- The GitLab UI, using the project settings page. - In [GitLab 14.2](https://gitlab.com/gitlab-org/gitlab/-/issues/333249) and later, using the [GraphQL API](../../../api/graphql/reference/index.md#mutationprojectsetcomplianceframework). @@ -64,24 +66,32 @@ read-only view to discourage this behavior. > - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/300324) in GitLab 13.11. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/331231) in GitLab 14.2. -Group owners can use the compliance pipeline configuration to define compliance requirements -such as scans or tests, and enforce them in individual projects. +Group owners can use compliance pipeline configuration to add additional pipeline configuration to +projects to define compliance requirements such as scans or tests. -The [custom compliance framework](#compliance-frameworks) feature allows group owners to specify the location -of a compliance pipeline configuration stored and managed in a dedicated project, distinct from a developer's project. +[Compliance frameworks](#compliance-frameworks) allow group owners to specify the location of +compliance pipeline configuration stored and managed in dedicated projects, separate from regular +projects. -When you set up the compliance pipeline configuration field, use the -`file@group/project` format. For example, you can configure -`.compliance-gitlab-ci.yml@compliance-group/compliance-project`. -This field is inherited by projects where the compliance framework label is applied. The result -forces the project to run the compliance configurations. +When you set up the compliance framework, use the **Compliance pipeline configuration** box to link +the compliance framework to specific CI/CD configuration. Use the +`path/file.y[a]ml@group-name/project-name` format. For example: -When a project with a custom label executes a pipeline, it begins by evaluating the compliance pipeline configuration. -The custom pipeline configuration can then execute any included individual project configuration. +- `.compliance-ci.yml@gitlab-org/gitlab`. +- `.compliance-ci.yaml@gitlab-org/gitlab`. -The user running the pipeline in the project should at least have Reporter access to the compliance project. +This configuration is inherited by projects where the compliance framework label is applied. The +result forces projects with the label to run the compliance CI/CD configuration in addition to +the project's own CI/CD configuration. When a project with a compliance framework label executes a +pipeline, it evaluates configuration in the following order: -Example `.compliance-gitlab-ci.yml` +1. Compliance pipeline configuration. +1. Project-specific pipeline configuration. + +The user running the pipeline in the project must at least have the Reporter role on the compliance +project. + +Example `.compliance-gitlab-ci.yml`: ```yaml # Allows compliance team to control the ordering and interweaving of stages/jobs. @@ -94,10 +104,10 @@ stages: - deploy - post-compliance -variables: # Can be overridden by setting a job-specific variable in project's local .gitlab-ci.yml +variables: # Can be overridden by setting a job-specific variable in project's local .gitlab-ci.yml FOO: sast -sast: # None of these attributes can be overridden by a project's local .gitlab-ci.yml +sast: # None of these attributes can be overridden by a project's local .gitlab-ci.yml variables: FOO: sast image: ruby:2.6 @@ -144,10 +154,10 @@ audit trail: after_script: - "# No after scripts." -include: # Execute individual project's configuration (if project contains .gitlab-ci.yml) +include: # Execute individual project's configuration (if project contains .gitlab-ci.yml) project: '$CI_PROJECT_PATH' file: '$CI_CONFIG_PATH' - ref: '$CI_COMMIT_REF_NAME' # Must be defined or MR pipelines always use the use default branch. + ref: '$CI_COMMIT_REF_NAME' # Must be defined or MR pipelines always use the use default branch. ``` ##### Ensure compliance jobs are always run diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 0375285895d..1b19945b7ea 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -1442,9 +1442,6 @@ msgstr "" msgid "A deleted user" msgstr "" -msgid "A description is required" -msgstr "" - msgid "A different reason" msgstr "" @@ -6835,15 +6832,9 @@ msgstr "" msgid "Choose a type..." msgstr "" -msgid "Choose any color" -msgstr "" - msgid "Choose any color." msgstr "" -msgid "Choose any color. Or you can choose one of the suggested colors below" -msgstr "" - msgid "Choose fileā¦" msgstr "" @@ -8484,16 +8475,22 @@ msgstr "" msgid "ComplianceFrameworks|Add framework" msgstr "" -msgid "ComplianceFrameworks|Combines with the CI configuration at runtime." +msgid "ComplianceFrameworks|Background color" +msgstr "" + +msgid "ComplianceFrameworks|Cancel" msgstr "" msgid "ComplianceFrameworks|Compliance framework deleted successfully" msgstr "" -msgid "ComplianceFrameworks|Compliance pipeline configuration location (optional)" +msgid "ComplianceFrameworks|Compliance pipeline configuration (optional)" +msgstr "" + +msgid "ComplianceFrameworks|Configuration not found" msgstr "" -msgid "ComplianceFrameworks|Could not find this configuration location, please try a different location" +msgid "ComplianceFrameworks|Configured compliance frameworks appear here." msgstr "" msgid "ComplianceFrameworks|Delete compliance framework %{framework}" @@ -8502,6 +8499,12 @@ msgstr "" msgid "ComplianceFrameworks|Delete framework" msgstr "" +msgid "ComplianceFrameworks|Description" +msgstr "" + +msgid "ComplianceFrameworks|Description is required" +msgstr "" + msgid "ComplianceFrameworks|Edit framework" msgstr "" @@ -8514,31 +8517,31 @@ msgstr "" msgid "ComplianceFrameworks|Error fetching compliance frameworks data. Please refresh the page or try a different framework" msgstr "" -msgid "ComplianceFrameworks|Invalid format: it should follow the format [PATH].y(a)ml@[GROUP]/[PROJECT]" +msgid "ComplianceFrameworks|Invalid format" msgstr "" -msgid "ComplianceFrameworks|Once a compliance framework is added it will appear here." +msgid "ComplianceFrameworks|Name" msgstr "" -msgid "ComplianceFrameworks|There are no compliance frameworks set up yet" +msgid "ComplianceFrameworks|Name is required" msgstr "" -msgid "ComplianceFrameworks|Unable to save this compliance framework. Please try again" +msgid "ComplianceFrameworks|No compliance frameworks are configured" msgstr "" -msgid "ComplianceFrameworks|Use %{codeStart}::%{codeEnd} to create a %{linkStart}scoped set%{linkEnd} (eg. %{codeStart}SOX::AWS%{codeEnd})" +msgid "ComplianceFrameworks|Required format: %{codeStart}path/file.y[a]ml@group-name/project-name%{codeEnd}. %{linkStart}Learn more.%{linkEnd}" msgstr "" -msgid "ComplianceFrameworks|You are about to permanently delete the compliance framework %{framework} from all projects which currently have it applied, which may remove other functionality. This cannot be undone." +msgid "ComplianceFrameworks|Unable to save this compliance framework. Please try again" msgstr "" -msgid "ComplianceFrameworks|e.g. include-gitlab.ci.yml@group-name/project-name" +msgid "ComplianceFrameworks|You are about to permanently delete the compliance framework %{framework} from all projects which currently have it applied, which may remove other functionality. This cannot be undone." msgstr "" -msgid "ComplianceFramework|Edit Compliance Framework" +msgid "ComplianceFramework|Edit compliance framework" msgstr "" -msgid "ComplianceFramework|New Compliance Framework" +msgid "ComplianceFramework|New compliance framework" msgstr "" msgid "Component" @@ -12790,6 +12793,12 @@ msgstr "" msgid "Enter an integer number number between 0 and 100" msgstr "" +msgid "Enter any color or choose one of the suggested colors below." +msgstr "" + +msgid "Enter any color." +msgstr "" + msgid "Enter at least three characters to search" msgstr "" @@ -16378,7 +16387,7 @@ msgstr "" msgid "GroupSettings|Compliance frameworks" msgstr "" -msgid "GroupSettings|Configure frameworks to apply enforceable rules to projects." +msgid "GroupSettings|Configure compliance frameworks to make them available to projects in this group. %{linkStart}Learn more.%{linkEnd}" msgstr "" msgid "GroupSettings|Custom project templates" @@ -30505,10 +30514,10 @@ msgstr "" msgid "Select a branch" msgstr "" -msgid "Select a file from the left sidebar to begin editing. Afterwards, you'll be able to commit your changes." +msgid "Select a compliance framework to apply to this project. %{linkStart}Learn more.%{linkEnd}" msgstr "" -msgid "Select a framework that applies to this project. %{linkStart}How are these added?%{linkEnd}" +msgid "Select a file from the left sidebar to begin editing. Afterwards, you'll be able to commit your changes." msgstr "" msgid "Select a group to invite" diff --git a/spec/frontend/vue_shared/components/color_picker/color_picker_spec.js b/spec/frontend/vue_shared/components/color_picker/color_picker_spec.js index d30f36ec63c..fef50bdaccc 100644 --- a/spec/frontend/vue_shared/components/color_picker/color_picker_spec.js +++ b/spec/frontend/vue_shared/components/color_picker/color_picker_spec.js @@ -111,15 +111,13 @@ describe('ColorPicker', () => { gon.suggested_label_colors = {}; createComponent(shallowMount); - expect(description()).toBe('Choose any color'); + expect(description()).toBe('Enter any color.'); expect(presetColors().exists()).toBe(false); }); it('shows the suggested colors', () => { createComponent(shallowMount); - expect(description()).toBe( - 'Choose any color. Or you can choose one of the suggested colors below', - ); + expect(description()).toBe('Enter any color or choose one of the suggested colors below.'); expect(presetColors()).toHaveLength(4); }); diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_spec.js b/spec/frontend/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_spec.js index 38fd1cc0a3d..f086d9abbc6 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/labels_select_widget/dropdown_contents_spec.js @@ -68,10 +68,11 @@ describe('DropdownContent', () => { const findCreateLabelButton = () => wrapper.find('[data-testid="create-label-button"]'); const findGoBackButton = () => wrapper.find('[data-testid="go-back-button"]'); - it('calls dropdown `show` method on component mount', () => { + it('emits `show` for dropdown on call showDropdown', () => { createComponent(); + wrapper.vm.showDropdown(); - expect(showDropdown).toHaveBeenCalled(); + expect(findDropdown().emitted('show')).toBeUndefined(); }); it('emits `setLabels` event on dropdown hide', () => { diff --git a/spec/frontend/vue_shared/components/sidebar/labels_select_widget/labels_select_root_spec.js b/spec/frontend/vue_shared/components/sidebar/labels_select_widget/labels_select_root_spec.js index 0c0319376b7..176f28bdbd0 100644 --- a/spec/frontend/vue_shared/components/sidebar/labels_select_widget/labels_select_root_spec.js +++ b/spec/frontend/vue_shared/components/sidebar/labels_select_widget/labels_select_root_spec.js @@ -128,6 +128,13 @@ describe('LabelsSelectRoot', () => { it('emits `updateSelectedLabels` event on dropdown contents `setLabels` event if there are labels to update', async () => { const label = { id: 'gid://gitlab/ProjectLabel/1' }; createComponent(); + wrapper.vm.$refs.dropdownContents = { + showDropdown: jest.fn(), + }; + const showSpy = jest.spyOn(wrapper.vm.$refs.dropdownContents, 'showDropdown'); + findDropdownContents().vm.$refs.dropdown = { + show: jest.fn(), + }; await waitForPromises(); expandDropdown(); @@ -135,5 +142,6 @@ describe('LabelsSelectRoot', () => { findDropdownContents().vm.$emit('setLabels', [label]); expect(wrapper.emitted('updateSelectedLabels')).toEqual([[[label]]]); + expect(showSpy).toHaveBeenCalled(); }); }); diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index dc55214c1dd..7bad907cf90 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -71,7 +71,7 @@ RSpec.describe Repository do let(:feature_flag) { true } before do - stub_feature_flags(gitaly_tags_finder: feature_flag) + stub_feature_flags(tags_finder_gitaly: feature_flag) end context 'name_desc' do |