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>2022-01-04 17:47:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-04 17:47:28 +0300
commit901adec7f6b9d5372de49112ec388ba9007ef4d9 (patch)
treeb2b5dd538671305ff9df45b1b24a9243aab715a1
parent3bc07a0be9ce3b8f736890a0513283f04796b37e (diff)
Add latest changes from gitlab-org/gitlab@14-6-stable-ee
-rw-r--r--app/assets/javascripts/editor/source_editor_instance.js8
-rw-r--r--app/services/merge_requests/squash_service.rb2
-rw-r--r--data/whats_new/202112200001_14_06.yml57
-rw-r--r--spec/factories/pages_domains.rb12
-rw-r--r--spec/factories_spec.rb1
-rw-r--r--spec/fixtures/ssl/letsencrypt_expired_x3.pem98
-rw-r--r--spec/frontend/editor/source_editor_instance_spec.js11
-rw-r--r--spec/models/pages_domain_spec.rb13
-rw-r--r--spec/services/merge_requests/squash_service_spec.rb16
9 files changed, 92 insertions, 126 deletions
diff --git a/app/assets/javascripts/editor/source_editor_instance.js b/app/assets/javascripts/editor/source_editor_instance.js
index 8372a59964b..95a43c2b2d0 100644
--- a/app/assets/javascripts/editor/source_editor_instance.js
+++ b/app/assets/javascripts/editor/source_editor_instance.js
@@ -50,6 +50,10 @@ const utils = {
}
return extensionsStore.get(extensionName);
},
+
+ hasFullApiRegistered: (targetMethods, newMethods) => {
+ return newMethods.find((fn) => !targetMethods.includes(fn)) === undefined;
+ },
};
/** Class representing a Source Editor Instance */
@@ -132,7 +136,9 @@ export default class EditorInstance {
const existingExt = utils.getStoredExtension(extensionsStore, definition.extensionName);
if (existingExt) {
if (isEqual(extension.setupOptions, existingExt.setupOptions)) {
- return existingExt;
+ if (utils.hasFullApiRegistered(this.extensionsAPI, Object.keys(existingExt.api))) {
+ return existingExt;
+ }
}
this.unuseExtension(extensionsStore, existingExt);
}
diff --git a/app/services/merge_requests/squash_service.rb b/app/services/merge_requests/squash_service.rb
index 0600fd1d740..90cf4af7e41 100644
--- a/app/services/merge_requests/squash_service.rb
+++ b/app/services/merge_requests/squash_service.rb
@@ -5,7 +5,7 @@ module MergeRequests
def execute
# If performing a squash would result in no change, then
# immediately return a success message without performing a squash
- if merge_request.commits_count == 1 && message == merge_request.first_commit.safe_message
+ if merge_request.commits_count == 1 && message&.strip == merge_request.first_commit.safe_message&.strip
return success(squash_sha: merge_request.diff_head_sha)
end
diff --git a/data/whats_new/202112200001_14_06.yml b/data/whats_new/202112200001_14_06.yml
new file mode 100644
index 00000000000..77491629892
--- /dev/null
+++ b/data/whats_new/202112200001_14_06.yml
@@ -0,0 +1,57 @@
+- title: Seamless worldwide performance with Geo
+ body: |
+ In GitLab 14.6, Geo secondary sites transparently proxy write requests to the primary site while accelerating most read requests. Systems administrators can provide all GitLab users across their organization with a single URL that automatically uses the Geo site closest to them. Users no longer need to use different configuration to benefit from Geo, or worry about what operations won’t work on Geo secondary sites. Globally distributed teams now benefit from accelerated git clone or git pull commands, and a seamless worldwide experience.
+ stage: Enablement
+ self-managed: true
+ gitlab-com: false
+ packages: [Premium, Ultimate]
+ url: 'https://docs.gitlab.com/ee/administration/geo/secondary_proxy/'
+ image_url: https://about.gitlab.com/images/14_6/geo_secondary_proxy_flow.png
+ published_at: 2021-12-22
+ release: 14.6
+- title: GitLab Agent's activity information
+ body: |
+ Being able to monitor your cluster's activity helps you detect and troubleshoot faulty events, and rest assured when they succeed. GitLab now ships with an activity list for the GitLab Agent that logs real-time events. This first implementation logs connection and token statuses and will be followed with more events in future releases.
+ stage: Configure
+ self-managed: true
+ gitlab-com: true
+ packages: [Free, Premium, Ultimate]
+ url: 'https://docs.gitlab.com/ee/user/clusters/agent/install/#view-agent-activity-information'
+ image_url: https://about.gitlab.com/images/14_6/gitlab_agent_activity_events_v14_6.png
+ published_at: 2021-12-22
+ release: 14.6
+- title: SAST Support for .NET 6
+ body: |
+ We have updated our .NET SAST analyzer, [Security Code Scan](https://security-code-scan.github.io/), to support this new version, which is also now supported with [our SAST language detection](https://docs.gitlab.com/ee/user/application_security/sast/#supported-languages-and-frameworks), allowing GitLab SAST to automatically detect .NET 6 projects. This change was part of a community contribution by [@vasyl11](https://gitlab.com/vasyl11) at [Clay Solutions](https://my-clay.com/), who we thank for their efforts.
+ stage: Secure
+ self-managed: true
+ gitlab-com: true
+ packages: [Free, Premium, Ultimate]
+ url: 'https://docs.gitlab.com/ee/user/application_security/sast/analyzers'
+ image_url: https://about.gitlab.com/images/14_6/14_6-cover-image.jpg
+ published_at: 2021-12-22
+ release: 14.6
+- title: Toggle wiki editors seamlessly
+ body: |
+ Editing wiki pages with the new rich Markdown editor makes it easier for everyone to contribute regardless of how well they know Markdown syntax. You may also prefer to write raw Markdown in some situations, but use the WYSIWYG interface for more complex or tedious formatting tasks, like creating tables.
+
+ Previous versions of GitLab required you to save changes before switching between the rich Markdown editor and the Markdown source, adding more steps and friction to your edits. In GitLab 14.6 you can now seamlessly switch between the two editing experiences without committing your changes, choosing the editor that suits your needs at any given moment.
+ stage: Create
+ self-managed: true
+ gitlab-com: true
+ packages: [Free, Premium, Ultimate]
+ url: 'https://docs.gitlab.com/ee/user/project/wiki/#content-editor'
+ image_url: https://docs.gitlab.com/ee/user/project/wiki/img/content_editor_v14.6.png
+ published_at: 2021-12-22
+ release: 14.6
+- title: Custom ruleset composability for SAST and Secret Detection
+ body: |
+ Custom Rulesets let users tailor the behavior of SAST and Secret Detection analyzers to their organization’s preferences. We're introducing the ability to add rules from multiple sources, like Git repositories, local files, and raw source changes. This change makes it easier to synthesize and manage multiple custom rulesets from different locations, which organizations can use to inherit rules across repositories and sources for greater flexibility. Initially, this change is available for our [SAST Semgrep, Nodejs, and Gosec analyzers](https://docs.gitlab.com/ee/user/application_security/sast/#customize-rulesets) and [Secret Detection](https://docs.gitlab.com/ee/user/application_security/secret_detection/#custom-rulesets). We will expand this capability to our other analyzers [in future releases](https://gitlab.com/groups/gitlab-org/-/epics/4179).
+ stage: Secure
+ self-managed: true
+ gitlab-com: true
+ packages: [Ultimate]
+ url: 'https://docs.gitlab.com/ee/user/application_security/sast/#customize-rulesets'
+ image_url: https://docs.gitlab.com/ee/user/application_security/img/mr_security_scanning_results_v14_3.png
+ published_at: 2021-12-22
+ release: 14.6
diff --git a/spec/factories/pages_domains.rb b/spec/factories/pages_domains.rb
index f3f2af79b76..2ba5cbb48bf 100644
--- a/spec/factories/pages_domains.rb
+++ b/spec/factories/pages_domains.rb
@@ -258,18 +258,6 @@ ZDXgrA==
certificate_source { :gitlab_provided }
end
- # This contains:
- # webdioxide.com
- # Let's Encrypt R3
- # ISRG Root X1 (issued by DST Root CA X3)
- #
- # DST Root CA X3 expired on 2021-09-30, but ISRG Root X1 should be trusted on most systems.
- trait :letsencrypt_expired_x3_root do
- certificate do
- File.read(Rails.root.join('spec/fixtures/ssl', 'letsencrypt_expired_x3.pem'))
- end
- end
-
trait :explicit_ecdsa do
certificate do
'-----BEGIN CERTIFICATE-----
diff --git a/spec/factories_spec.rb b/spec/factories_spec.rb
index 811ed18dce3..08286f57b3b 100644
--- a/spec/factories_spec.rb
+++ b/spec/factories_spec.rb
@@ -31,7 +31,6 @@ RSpec.describe 'factories' do
[:pages_domain, :with_trusted_chain],
[:pages_domain, :with_trusted_expired_chain],
[:pages_domain, :explicit_ecdsa],
- [:pages_domain, :letsencrypt_expired_x3_root],
[:project_member, :blocked],
[:remote_mirror, :ssh],
[:user_preference, :only_comments],
diff --git a/spec/fixtures/ssl/letsencrypt_expired_x3.pem b/spec/fixtures/ssl/letsencrypt_expired_x3.pem
deleted file mode 100644
index 462df721ed7..00000000000
--- a/spec/fixtures/ssl/letsencrypt_expired_x3.pem
+++ /dev/null
@@ -1,98 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIGJDCCBQygAwIBAgISBOSAE/WwQGsTbDJI1vDL9+eKMA0GCSqGSIb3DQEBCwUA
-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5cHQu
-b3JnMDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuaWRlbnRydXN0LmNvbS9E
-U1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFHm0WeZ7tuXkAXOACIjIGlj26Ztu
-MA0GCSqGSIb3DQEBCwUAA4IBAQAKcwBslm7/DlLQrt2M51oGrS+o44+/yQoDFVDC
-5WxCu2+b9LRPwkSICHXM6webFGJueN7sJ7o5XPWioW5WlHAQU7G75K/QosMrAdSW
-9MUgNTP52GE24HGNtLi1qoJFlcDyqSMo59ahy2cI2qBDLKobkx/J3vWraV0T9VuG
-WCLKTVXkcGdtwlfFRjlBz4pYg1htmf5X6DYO8A4jqv2Il9DjXA6USbW1FzXSLr9O
-he8Y4IWS6wY7bCkjCWDcRQJMEhg76fsO3txE+FiYruq9RUWhiF1myv4Q6W+CyBFC
-Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5
------END CERTIFICATE-----
diff --git a/spec/frontend/editor/source_editor_instance_spec.js b/spec/frontend/editor/source_editor_instance_spec.js
index f9518743ef8..99c4ff4f3fa 100644
--- a/spec/frontend/editor/source_editor_instance_spec.js
+++ b/spec/frontend/editor/source_editor_instance_spec.js
@@ -277,6 +277,17 @@ describe('Source Editor Instance', () => {
expect(extensionStore.set).toHaveBeenCalledWith('SEClassExtension', extension1);
});
+ it('correctly registers methods from the existing extension on an instance', () => {
+ const seInstance2 = new SourceEditorInstance({}, extensionStore);
+ seInstance.use({ definition: SEClassExtension });
+ const val1 = seInstance.classExtMethod();
+
+ seInstance2.use({ definition: SEClassExtension });
+
+ expect(seInstance2.classExtMethod).toBeDefined();
+ expect(seInstance2.classExtMethod()).toBe(val1); // from helpers.js we know classExtMethod()returns a string. Hence `toBe`
+ });
+
it.each`
desc | currentSetupOptions | newSetupOptions | expectedCallTimes
${'updates'} | ${undefined} | ${defSetupOptions} | ${2}
diff --git a/spec/models/pages_domain_spec.rb b/spec/models/pages_domain_spec.rb
index d476e18a72c..8a5b1e73194 100644
--- a/spec/models/pages_domain_spec.rb
+++ b/spec/models/pages_domain_spec.rb
@@ -287,19 +287,6 @@ RSpec.describe PagesDomain do
it { is_expected.to be_truthy }
end
-
- # The LetsEncrypt DST Root CA X3 expired on 2021-09-30, but the
- # cross-sign in ISRG Root X1 enables it to function provided a chain
- # of trust can be established with the system store. See:
- #
- # 1. https://community.letsencrypt.org/t/production-chain-changes/150739
- # 2. https://letsencrypt.org/2020/12/21/extending-android-compatibility.html
- # 3. https://www.openssl.org/blog/blog/2021/09/13/LetsEncryptRootCertExpire/
- context 'with a LetsEncrypt bundle with an expired DST Root CA X3' do
- let(:domain) { build(:pages_domain, :letsencrypt_expired_x3_root) }
-
- it { is_expected.to be_truthy }
- end
end
describe '#expired?' do
diff --git a/spec/services/merge_requests/squash_service_spec.rb b/spec/services/merge_requests/squash_service_spec.rb
index af48e8f5dae..4b21812503e 100644
--- a/spec/services/merge_requests/squash_service_spec.rb
+++ b/spec/services/merge_requests/squash_service_spec.rb
@@ -76,6 +76,22 @@ RSpec.describe MergeRequests::SquashService do
service.execute
end
end
+
+ context 'when squash message matches commit message but without trailing new line' do
+ let(:service) { described_class.new(project: project, current_user: user, params: { merge_request: merge_request, squash_commit_message: merge_request.first_commit.safe_message.strip }) }
+
+ it 'returns that commit SHA' do
+ result = service.execute
+
+ expect(result).to match(status: :success, squash_sha: merge_request.diff_head_sha)
+ end
+
+ it 'does not perform any git actions' do
+ expect(repository).not_to receive(:squash)
+
+ service.execute
+ end
+ end
end
context 'the squashed commit' do