From aed0a60015f542db07f971fe321bd52207f632a4 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 12 May 2022 18:08:38 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- ...Geo Replicate a new Git repository type.md | 27 --- .../Geo Replicate a new blob type.md | 28 --- .../merge_request_templates/Documentation.md | 2 +- .../clusters_list/components/agent_table.vue | 15 +- app/assets/javascripts/clusters_list/index.js | 2 + .../diffs/components/diff_line_note_form.vue | 7 +- .../confirm_via_gl_modal/confirm_modal.vue | 20 +- .../confirm_via_gl_modal.js | 4 + .../notes/components/noteable_discussion.vue | 5 +- .../pipelines/components/graph/constants.js | 3 + .../pipelines/components/graph/job_item.vue | 22 ++- .../projects/branches_controller.rb | 2 +- .../get_pipeline_details.query.graphql | 1 + app/helpers/clusters_helper.rb | 3 +- ..._max_access_level_in_projects_preloader.rb | 49 +++-- app/models/user.rb | 2 + app/services/users/destroy_service.rb | 5 +- app/views/devise/passwords/new.html.haml | 8 +- app/views/devise/sessions/_new_base.html.haml | 2 +- .../_new_base_user_login_label.html.haml | 1 + .../nullify_in_batches_on_user_deletion.yml | 8 - ...15-0-advanced-search-elasticsearch-6-8.yml | 16 ++ doc/administration/terraform_state.md | 4 +- doc/development/geo/framework.md | 6 - doc/development/pipelines.md | 8 +- doc/update/removals.md | 14 ++ .../cluster_image_scanning/index.md | 4 +- .../dependency_scanning/index.md | 9 +- .../policies/scan-execution-policies.md | 7 + doc/user/clusters/agent/troubleshooting.md | 8 +- doc/user/clusters/agent/vulnerabilities.md | 80 ++------ lefthook.yml | 2 +- .../Jobs/Dependency-Scanning.gitlab-ci.yml | 8 +- lib/gitlab/kas.rb | 4 + locale/gitlab.pot | 9 + .../projects/branches_controller_spec.rb | 35 +++- spec/features/issues/gfm_autocomplete_spec.rb | 2 +- .../components/agent_table_spec.js | 3 +- .../__snapshots__/utils_spec.js.snap | 11 ++ .../frontend/pipelines/graph/job_item_spec.js | 180 ++++++++---------- spec/frontend/pipelines/graph/mock_data.js | 97 ++++++++++ spec/helpers/clusters_helper_spec.rb | 4 + ...access_level_in_projects_preloader_spec.rb | 42 ++-- spec/services/users/destroy_service_spec.rb | 37 ++-- spec/support/matchers/make_queries.rb | 31 +++ .../shared/_signin_box.html.haml_spec.rb | 14 ++ .../internal/upload/artifacts_uploader.go | 8 +- 47 files changed, 509 insertions(+), 350 deletions(-) create mode 100644 app/views/devise/sessions/_new_base_user_login_label.html.haml delete mode 100644 config/feature_flags/development/nullify_in_batches_on_user_deletion.yml create mode 100644 data/removals/15_0/15-0-advanced-search-elasticsearch-6-8.yml create mode 100644 spec/support/matchers/make_queries.rb diff --git a/.gitlab/issue_templates/Geo Replicate a new Git repository type.md b/.gitlab/issue_templates/Geo Replicate a new Git repository type.md index b39356e74bd..bfcf7aca7b5 100644 --- a/.gitlab/issue_templates/Geo Replicate a new Git repository type.md +++ b/.gitlab/issue_templates/Geo Replicate a new Git repository type.md @@ -303,12 +303,6 @@ That's all of the required database changes. git_access_class.error_message(:no_repo) end - # The feature flag follows the format `geo_#{replicable_name}_replication`, - # so here it would be `geo_cool_widget_replication` - def self.replication_enabled_by_default? - false - end - override :verification_feature_flag_enabled? def self.verification_feature_flag_enabled? # We are adding verification at the same time as replication, so we @@ -715,27 +709,6 @@ As illustrated by the above two examples, batch destroy logic cannot be handled - [ ] Add a step to `Test replication and verification of Cool Widgets on a non-GDK-deployment. For example, using GitLab Environment Toolkit`. - [ ] Add a step to `Ping the Geo PM and EM to coordinate testing`. For example, you might add steps to generate Cool Widgets, and then a Geo engineer may take it from there. - [ ] In `ee/config/feature_flags/development/geo_cool_widget_replication.yml`, set `default_enabled: true` - -- [ ] In `ee/app/replicators/geo/cool_widget_replicator.rb`, delete the `self.replication_enabled_by_default?` method: - - ```ruby - module Geo - class CoolWidgetReplicator < Gitlab::Geo::Replicator - ... - # REMOVE THIS LINE IF IT IS NO LONGER NEEDED - extend ::Gitlab::Utils::Override - - # REMOVE THIS METHOD - def self.replication_enabled_by_default? - false - end - # REMOVE THIS METHOD - - ... - end - end - ``` - - [ ] In `ee/app/graphql/types/geo/geo_node_type.rb`, remove the `feature_flag` option for the released type: ```ruby diff --git a/.gitlab/issue_templates/Geo Replicate a new blob type.md b/.gitlab/issue_templates/Geo Replicate a new blob type.md index d005e0cdf43..ff678666191 100644 --- a/.gitlab/issue_templates/Geo Replicate a new blob type.md +++ b/.gitlab/issue_templates/Geo Replicate a new blob type.md @@ -291,12 +291,6 @@ That's all of the required database changes. model_record.file end - # The feature flag follows the format `geo_#{replicable_name}_replication`, - # so here it would be `geo_cool_widget_replication` - def self.replication_enabled_by_default? - false - end - override :verification_feature_flag_enabled? def self.verification_feature_flag_enabled? # We are adding verification at the same time as replication, so we @@ -680,28 +674,6 @@ As illustrated by the above two examples, batch destroy logic cannot be handled - [ ] Add a step to `Test replication and verification of Cool Widgets on a non-GDK-deployment. For example, using GitLab Environment Toolkit`. - [ ] Add a step to `Ping the Geo PM and EM to coordinate testing`. For example, you might add steps to generate Cool Widgets, and then a Geo engineer may take it from there. - [ ] In `ee/config/feature_flags/development/geo_cool_widget_replication.yml`, set `default_enabled: true` - -- [ ] In `ee/app/replicators/geo/cool_widget_replicator.rb`, delete the `self.replication_enabled_by_default?` method: - - ```ruby - module Geo - class CoolWidgetReplicator < Gitlab::Geo::Replicator - ... - # REMOVE THIS LINE IF IT IS NO LONGER NEEDED - extend ::Gitlab::Utils::Override - - ... - # REMOVE THIS METHOD - def self.replication_enabled_by_default? - false - end - # REMOVE THIS METHOD - - ... - end - end - ``` - - [ ] In `ee/app/graphql/types/geo/geo_node_type.rb`, remove the `feature_flag` option for the released type: ```ruby diff --git a/.gitlab/merge_request_templates/Documentation.md b/.gitlab/merge_request_templates/Documentation.md index 49d1d0f79bf..cdc33b8aacb 100644 --- a/.gitlab/merge_request_templates/Documentation.md +++ b/.gitlab/merge_request_templates/Documentation.md @@ -8,7 +8,7 @@ ## Author's checklist -- [ ] Optional. Consider taking [the GitLab Technical Writing Fundamentals course](https://gitlab.edcast.com/pathways/ECL-02528ee2-c334-4e16-abf3-e9d8b8260de4). +- [ ] Optional. Consider taking [the GitLab Technical Writing Fundamentals course](https://about.gitlab.com/handbook/engineering/ux/technical-writing/fundamentals/). - [ ] Follow the: - [Documentation process](https://docs.gitlab.com/ee/development/documentation/workflow.html). - [Documentation guidelines](https://docs.gitlab.com/ee/development/documentation/). diff --git a/app/assets/javascripts/clusters_list/components/agent_table.vue b/app/assets/javascripts/clusters_list/components/agent_table.vue index b878a6835b2..496baf8cb08 100644 --- a/app/assets/javascripts/clusters_list/components/agent_table.vue +++ b/app/assets/javascripts/clusters_list/components/agent_table.vue @@ -39,7 +39,7 @@ export default { configHelpLink: helpPagePath('user/clusters/agent/install/index', { anchor: 'create-an-agent-configuration-file', }), - inject: ['gitlabVersion'], + inject: ['gitlabVersion', 'kasVersion'], props: { agents: { required: true, @@ -102,6 +102,9 @@ export default { return { ...agent, versions }; }); }, + serverVersion() { + return this.kasVersion || this.gitlabVersion; + }, }, methods: { getStatusCellId(item) { @@ -135,12 +138,12 @@ export default { if (!agent.versions.length) return false; const [agentMajorVersion, agentMinorVersion] = this.getAgentVersionString(agent).split('.'); - const [gitlabMajorVersion, gitlabMinorVersion] = this.gitlabVersion.split('.'); + const [serverMajorVersion, serverMinorVersion] = this.serverVersion.split('.'); - const majorVersionMismatch = agentMajorVersion !== gitlabMajorVersion; + const majorVersionMismatch = agentMajorVersion !== serverMajorVersion; // We should warn user if their current GitLab and agent versions are more than 1 minor version apart: - const minorVersionMismatch = Math.abs(agentMinorVersion - gitlabMinorVersion) > 1; + const minorVersionMismatch = Math.abs(agentMinorVersion - serverMinorVersion) > 1; return majorVersionMismatch || minorVersionMismatch; }, @@ -240,7 +243,7 @@ export default {

- + {{ $options.i18n.viewDocsText }} - + {{ $options.i18n.viewDocsText }} { canAddCluster, canAdminCluster, gitlabVersion, + kasVersion, displayClusterAgents, certificateBasedClustersEnabled, } = el.dataset; @@ -48,6 +49,7 @@ export default () => { canAddCluster: parseBoolean(canAddCluster), canAdminCluster: parseBoolean(canAdminCluster), gitlabVersion, + kasVersion, displayClusterAgents: parseBoolean(displayClusterAgents), certificateBasedClustersEnabled: parseBoolean(certificateBasedClustersEnabled), }, diff --git a/app/assets/javascripts/diffs/components/diff_line_note_form.vue b/app/assets/javascripts/diffs/components/diff_line_note_form.vue index 7a30740e31b..a2f0e2c2653 100644 --- a/app/assets/javascripts/diffs/components/diff_line_note_form.vue +++ b/app/assets/javascripts/diffs/components/diff_line_note_form.vue @@ -1,6 +1,6 @@