From 88db57927aa1057e14624592fdc5bc85224dd9b4 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 28 Sep 2021 03:11:11 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../mr_widget_pipeline_container.vue | 5 +++- app/assets/stylesheets/framework/tables.scss | 1 + .../stylesheets/framework/typography.scss | 10 ++++---- doc/.vale/gitlab/Acronyms.yml | 6 +++++ doc/administration/auth/index.md | 2 +- doc/administration/nfs.md | 2 +- .../postgresql/replication_and_failover.md | 4 +-- doc/administration/smime_signing_email.md | 6 ++--- .../load_balancing/active_record_proxy.rb | 2 +- .../mr_widget_pipeline_container_spec.js | 25 +++++++++++++------ .../active_record_proxy_spec.rb | 7 ++++++ .../support/database/cross-join-allowlist.yml | 22 ---------------- spec/support/database/prevent_cross_joins.rb | 2 +- 13 files changed, 49 insertions(+), 45 deletions(-) diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline_container.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline_container.vue index a8272002f16..a05e8747a43 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline_container.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline_container.vue @@ -88,6 +88,9 @@ export default { return this.mr.preferredAutoMergeStrategy; }, + ciStatus() { + return this.isPostMerge ? this.mr?.mergePipeline?.details?.status?.text : this.mr.ciStatus; + }, }, }; @@ -97,7 +100,7 @@ export default { :pipeline="pipeline" :pipeline-coverage-delta="mr.pipelineCoverageDelta" :builds-with-coverage="mr.buildsWithCoverage" - :ci-status="mr.ciStatus" + :ci-status="ciStatus" :has-ci="mr.hasCI" :pipeline-must-succeed="mr.onlyAllowMergeIfPipelineSucceeds" :source-branch="branch" diff --git a/app/assets/stylesheets/framework/tables.scss b/app/assets/stylesheets/framework/tables.scss index 92405c00c5e..c6bc8fa0eac 100644 --- a/app/assets/stylesheets/framework/tables.scss +++ b/app/assets/stylesheets/framework/tables.scss @@ -23,6 +23,7 @@ table { @include gl-text-gray-500; } + .md &:not(.code), &.table { margin-bottom: $gl-padding; diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss index aeb3bb2286f..c40433651ab 100644 --- a/app/assets/stylesheets/framework/typography.scss +++ b/app/assets/stylesheets/framework/typography.scss @@ -160,8 +160,6 @@ } table:not(.code) { - @extend .table; - @extend .table-bordered; margin: 16px 0; color: $gl-text-color; border: 0; @@ -172,9 +170,11 @@ tbody { background-color: $white; - td { - border-color: $gray-100; - } + } + + td, + th { + border: 1px solid $border-color; } tr { diff --git a/doc/.vale/gitlab/Acronyms.yml b/doc/.vale/gitlab/Acronyms.yml index ecb1dd33fa8..b75f81dd075 100644 --- a/doc/.vale/gitlab/Acronyms.yml +++ b/doc/.vale/gitlab/Acronyms.yml @@ -49,6 +49,7 @@ exceptions: - ECS - EFS - EKS + - ELB - EOL - EXIF - FAQ @@ -98,6 +99,7 @@ exceptions: - LESS - LFS - LRU + - LTM - LTS - MIME - MIT @@ -119,6 +121,7 @@ exceptions: - PEM - PEP - PGP + - PID - PKCS - PHP - PNG @@ -129,6 +132,7 @@ exceptions: - RAM - RBAC - RDP + - RDS - REST - RFC - RHEL @@ -140,6 +144,7 @@ exceptions: - RVM - SAAS - SAML + - SAN - SAST - SATA - SCIM @@ -173,6 +178,7 @@ exceptions: - TODO - TOML - TTL + - UID - UDP - UID - UNIX diff --git a/doc/administration/auth/index.md b/doc/administration/auth/index.md index a072cc73c43..6dff8d623ab 100644 --- a/doc/administration/auth/index.md +++ b/doc/administration/auth/index.md @@ -45,7 +45,7 @@ For more information, see the links shown on this page for each external provide | Capability | SaaS | Self-Managed | |-------------------------------------------------|-----------------------------------------|------------------------------------| -| **User Provisioning** | SCIM
JIT Provisioning | LDAP Sync | +| **User Provisioning** | SCIM
Just-In-Time (JIT) Provisioning | LDAP Sync | | **User Detail Updating** (not group management) | Not Available | LDAP Sync | | **Authentication** | SAML at top-level group (1 provider) | LDAP (multiple providers)
Generic OAuth2
SAML (only 1 permitted per unique provider)
Kerberos
JWT
Smartcard
OmniAuth Providers (only 1 permitted per unique provider) | | **Provider-to-GitLab Role Sync** | SAML Group Sync | LDAP Group Sync | diff --git a/doc/administration/nfs.md b/doc/administration/nfs.md index 4876508bea4..f1a02c66211 100644 --- a/doc/administration/nfs.md +++ b/doc/administration/nfs.md @@ -217,7 +217,7 @@ use the `hard` option, because (from the man page): > use the soft option only when client responsiveness is more important than data integrity Other vendors make similar recommendations, including -[SAP](http://wiki.scn.sap.com/wiki/x/PARnFQ) and NetApp's +[System Applications and Products in Data Processing (SAP)](http://wiki.scn.sap.com/wiki/x/PARnFQ) and NetApp's [knowledge base](https://kb.netapp.com/Advice_and_Troubleshooting/Data_Storage_Software/ONTAP_OS/What_are_the_differences_between_hard_mount_and_soft_mount), they highlight that if the NFS client driver caches data, `soft` means there is no certainty if writes by GitLab are actually on disk. diff --git a/doc/administration/postgresql/replication_and_failover.md b/doc/administration/postgresql/replication_and_failover.md index 2e0820b69c9..2205b74e34c 100644 --- a/doc/administration/postgresql/replication_and_failover.md +++ b/doc/administration/postgresql/replication_and_failover.md @@ -847,7 +847,7 @@ Investigate further if: - `reply_time` is not current. The `lsn` fields relate to which write-ahead-log segments have been replicated. -Run the following on the leader to find out the current LSN: +Run the following on the leader to find out the current Log Sequence Number (LSN): ```shell echo 'SELECT pg_current_wal_lsn();' | gitlab-psql @@ -1248,7 +1248,7 @@ To fix the problem, ensure the loopback interface is included in the CIDR addres 1. [Reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure) for the changes to take effect. 1. Check that [all the replicas are synchronized](#check-replication-status) -### Errors in Patroni logs: the requested start point is ahead of the WAL flush position +### Errors in Patroni logs: the requested start point is ahead of the Write Ahead Log (WAL) flush position This error indicates that the database is not replicating: diff --git a/doc/administration/smime_signing_email.md b/doc/administration/smime_signing_email.md index 0a2f55ecf61..8fdd87a5b2d 100644 --- a/doc/administration/smime_signing_email.md +++ b/doc/administration/smime_signing_email.md @@ -69,10 +69,10 @@ The key needs to be readable by the GitLab system user (`git` by default). The key needs to be readable by the GitLab system user (`git` by default). -### How to convert S/MIME PKCS #12 / PFX format to PEM encoding +### How to convert S/MIME PKCS #12 format to PEM encoding -Typically S/MIME certificates are handled in binary PKCS #12 format (`.pfx` or `.p12` -extensions), which contain the following in a single encrypted file: +Typically S/MIME certificates are handled in binary Public Key Cryptography Standards (PKCS) #12 format +(`.pfx` or `.p12` extensions), which contain the following in a single encrypted file: - Public certificate - Intermediate certificates (if any) diff --git a/lib/gitlab/database/load_balancing/active_record_proxy.rb b/lib/gitlab/database/load_balancing/active_record_proxy.rb index deaea62d774..5462c2a3188 100644 --- a/lib/gitlab/database/load_balancing/active_record_proxy.rb +++ b/lib/gitlab/database/load_balancing/active_record_proxy.rb @@ -7,7 +7,7 @@ module Gitlab # "connection" method. module ActiveRecordProxy def connection - ::Gitlab::Database::LoadBalancing.proxy + ::Gitlab::Database::LoadBalancing.proxy || super end end end diff --git a/spec/frontend/vue_mr_widget/components/mr_widget_pipeline_container_spec.js b/spec/frontend/vue_mr_widget/components/mr_widget_pipeline_container_spec.js index 5ec719b17d6..efe2bf75c3f 100644 --- a/spec/frontend/vue_mr_widget/components/mr_widget_pipeline_container_spec.js +++ b/spec/frontend/vue_mr_widget/components/mr_widget_pipeline_container_spec.js @@ -1,5 +1,6 @@ import { mount } from '@vue/test-utils'; import MockAdapter from 'axios-mock-adapter'; +import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import axios from '~/lib/utils/axios_utils'; import ArtifactsApp from '~/vue_merge_request_widget/components/artifacts_list_app.vue'; import DeploymentList from '~/vue_merge_request_widget/components/deployment/deployment_list.vue'; @@ -12,12 +13,14 @@ describe('MrWidgetPipelineContainer', () => { let mock; const factory = (props = {}) => { - wrapper = mount(MrWidgetPipelineContainer, { - propsData: { - mr: { ...mockStore }, - ...props, - }, - }); + wrapper = extendedWrapper( + mount(MrWidgetPipelineContainer, { + propsData: { + mr: { ...mockStore }, + ...props, + }, + }), + ); }; beforeEach(() => { @@ -30,6 +33,7 @@ describe('MrWidgetPipelineContainer', () => { }); const findDeploymentList = () => wrapper.findComponent(DeploymentList); + const findCIErrorMessage = () => wrapper.findByTestId('ci-error-message'); describe('when pre merge', () => { beforeEach(() => { @@ -69,15 +73,21 @@ describe('MrWidgetPipelineContainer', () => { beforeEach(() => { factory({ isPostMerge: true, + mr: { + ...mockStore, + pipeline: {}, + ciStatus: undefined, + }, }); }); it('renders pipeline', () => { expect(wrapper.find(MrWidgetPipeline).exists()).toBe(true); + expect(findCIErrorMessage().exists()).toBe(false); expect(wrapper.find(MrWidgetPipeline).props()).toMatchObject({ pipeline: mockStore.mergePipeline, pipelineCoverageDelta: mockStore.pipelineCoverageDelta, - ciStatus: mockStore.ciStatus, + ciStatus: mockStore.mergePipeline.details.status.text, hasCi: mockStore.hasCI, sourceBranch: mockStore.targetBranch, sourceBranchLink: mockStore.targetBranch, @@ -92,7 +102,6 @@ describe('MrWidgetPipelineContainer', () => { targetBranch: 'Foo', }, }); - expect(wrapper.find(MrWidgetPipeline).props().sourceBranchLink).toBe('Foo'); }); diff --git a/spec/lib/gitlab/database/load_balancing/active_record_proxy_spec.rb b/spec/lib/gitlab/database/load_balancing/active_record_proxy_spec.rb index 8886ce9756d..2ccb52f7b14 100644 --- a/spec/lib/gitlab/database/load_balancing/active_record_proxy_spec.rb +++ b/spec/lib/gitlab/database/load_balancing/active_record_proxy_spec.rb @@ -16,5 +16,12 @@ RSpec.describe Gitlab::Database::LoadBalancing::ActiveRecordProxy do expect(dummy.new.connection).to eq(proxy) end + + it 'returns a connection when no proxy is present' do + allow(Gitlab::Database::LoadBalancing).to receive(:proxy).and_return(nil) + + expect(ActiveRecord::Base.connection) + .to eq(ActiveRecord::Base.retrieve_connection) + end end end diff --git a/spec/support/database/cross-join-allowlist.yml b/spec/support/database/cross-join-allowlist.yml index 37d2b8aaacb..839b8436900 100644 --- a/spec/support/database/cross-join-allowlist.yml +++ b/spec/support/database/cross-join-allowlist.yml @@ -6,9 +6,6 @@ - "./ee/spec/features/merge_trains/user_adds_merge_request_to_merge_train_spec.rb" - "./ee/spec/features/merge_trains/user_adds_to_merge_train_when_pipeline_succeeds_spec.rb" - "./ee/spec/features/projects/pipelines/pipeline_spec.rb" -- "./ee/spec/features/projects/settings/auto_rollback_spec.rb" -- "./ee/spec/features/projects/settings/pipeline_subscriptions_spec.rb" -- "./ee/spec/features/projects/settings/protected_environments_spec.rb" - "./ee/spec/finders/ee/namespaces/projects_finder_spec.rb" - "./ee/spec/finders/security/findings_finder_spec.rb" - "./ee/spec/graphql/ee/resolvers/namespace_projects_resolver_spec.rb" @@ -47,38 +44,23 @@ - "./ee/spec/services/ee/merge_requests/refresh_service_spec.rb" - "./ee/spec/workers/scan_security_report_secrets_worker_spec.rb" - "./spec/controllers/admin/runners_controller_spec.rb" -- "./spec/controllers/groups/runners_controller_spec.rb" - "./spec/controllers/groups/settings/ci_cd_controller_spec.rb" - "./spec/controllers/projects/merge_requests_controller_spec.rb" -- "./spec/controllers/projects/runners_controller_spec.rb" - "./spec/controllers/projects/settings/ci_cd_controller_spec.rb" - "./spec/features/admin/admin_runners_spec.rb" -- "./spec/features/groups/settings/ci_cd_spec.rb" - "./spec/features/ide/user_opens_merge_request_spec.rb" - "./spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb" - "./spec/features/merge_request/user_sees_merge_widget_spec.rb" -- "./spec/features/merge_request/user_sees_pipelines_from_forked_project_spec.rb" -- "./spec/features/merge_request/user_sees_pipelines_spec.rb" -- "./spec/features/project_group_variables_spec.rb" -- "./spec/features/project_variables_spec.rb" -- "./spec/features/projects/badges/list_spec.rb" - "./spec/features/projects/infrastructure_registry_spec.rb" - "./spec/features/projects/jobs_spec.rb" - "./spec/features/projects/pipelines/pipeline_spec.rb" - "./spec/features/projects/pipelines/pipelines_spec.rb" -- "./spec/features/projects/settings/pipelines_settings_spec.rb" -- "./spec/features/security/project/internal_access_spec.rb" -- "./spec/features/security/project/private_access_spec.rb" -- "./spec/features/security/project/public_access_spec.rb" -- "./spec/features/triggers_spec.rb" - "./spec/finders/ci/pipelines_for_merge_request_finder_spec.rb" - "./spec/finders/ci/runners_finder_spec.rb" - "./spec/frontend/fixtures/runner.rb" - "./spec/graphql/mutations/ci/runner/delete_spec.rb" - "./spec/graphql/resolvers/ci/group_runners_resolver_spec.rb" -- "./spec/graphql/resolvers/ci/job_token_scope_resolver_spec.rb" - "./spec/graphql/resolvers/merge_request_pipelines_resolver_spec.rb" -- "./spec/graphql/types/ci/job_token_scope_type_spec.rb" - "./spec/lib/api/entities/package_spec.rb" - "./spec/lib/gitlab/background_migration/migrate_legacy_artifacts_spec.rb" - "./spec/mailers/emails/pipelines_spec.rb" @@ -105,8 +87,6 @@ - "./spec/requests/api/commit_statuses_spec.rb" - "./spec/requests/api/graphql/group_query_spec.rb" - "./spec/requests/api/graphql/merge_request/merge_request_spec.rb" -- "./spec/requests/api/graphql/mutations/ci/job_token_scope/add_project_spec.rb" -- "./spec/requests/api/graphql/mutations/ci/job_token_scope/remove_project_spec.rb" - "./spec/requests/api/graphql/mutations/merge_requests/create_spec.rb" - "./spec/requests/api/graphql/packages/composer_spec.rb" - "./spec/requests/api/graphql/packages/conan_spec.rb" @@ -132,8 +112,6 @@ - "./spec/services/merge_requests/refresh_service_spec.rb" - "./spec/support/shared_examples/ci/pipeline_email_shared_examples.rb" - "./spec/support/shared_examples/features/packages_shared_examples.rb" -- "./spec/support/shared_examples/features/search_settings_shared_examples.rb" -- "./spec/support/shared_examples/features/variable_list_shared_examples.rb" - "./spec/support/shared_examples/models/concerns/limitable_shared_examples.rb" - "./spec/support/shared_examples/requests/api/graphql/packages/group_and_project_packages_list_shared_examples.rb" - "./spec/support/shared_examples/requests/api/graphql/packages/package_details_shared_examples.rb" diff --git a/spec/support/database/prevent_cross_joins.rb b/spec/support/database/prevent_cross_joins.rb index 4b78aa9014c..2a3f4904f1f 100644 --- a/spec/support/database/prevent_cross_joins.rb +++ b/spec/support/database/prevent_cross_joins.rb @@ -46,7 +46,7 @@ module Database if schemas.include?(:gitlab_ci) && schemas.include?(:gitlab_main) Thread.current[:has_cross_join_exception] = true raise CrossJoinAcrossUnsupportedTablesError, - "Unsupported cross-join across '#{tables.join(", ")}' modifying '#{schemas.to_a.join(", ")}' discovered " \ + "Unsupported cross-join across '#{tables.join(", ")}' querying '#{schemas.to_a.join(", ")}' discovered " \ "when executing query '#{sql}'. Please refer to https://docs.gitlab.com/ee/development/database/multiple_databases.html#removing-joins-between-ci_-and-non-ci_-tables for details on how to resolve this exception." end end