summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-02 00:09:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-02 00:09:14 +0000
commitd8714cf67ce4db786b26b64f0f0bef50fb6976e6 (patch)
tree9a3cc1da29cb2a16113b6b8a1a48b82f368cbb22 /config
parent3feea9b6078811d20b42548ba98272eeed5af9e4 (diff)
downloadgitlab-ce-d8714cf67ce4db786b26b64f0f0bef50fb6976e6.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r--config/feature_flags/development/dynamic_nonce_creation.yml8
-rw-r--r--config/helpers/incremental_webpack_compiler.js13
-rw-r--r--config/initializers/1_settings.rb9
-rw-r--r--config/routes.rb1
-rw-r--r--config/routes/unmatched_project.rb18
5 files changed, 39 insertions, 10 deletions
diff --git a/config/feature_flags/development/dynamic_nonce_creation.yml b/config/feature_flags/development/dynamic_nonce_creation.yml
new file mode 100644
index 00000000000..b135f288554
--- /dev/null
+++ b/config/feature_flags/development/dynamic_nonce_creation.yml
@@ -0,0 +1,8 @@
+---
+name: dynamic_nonce_creation
+introduced_by_url:
+rollout_issue_url:
+milestone: '13.9'
+type: development
+group: group::manage
+default_enabled: false
diff --git a/config/helpers/incremental_webpack_compiler.js b/config/helpers/incremental_webpack_compiler.js
index 889e627d2c5..786bb6071fa 100644
--- a/config/helpers/incremental_webpack_compiler.js
+++ b/config/helpers/incremental_webpack_compiler.js
@@ -21,9 +21,9 @@ class NoopCompiler {
setupMiddleware() {}
}
-class IncrementalWebpackCompiler extends NoopCompiler {
+class IncrementalWebpackCompiler {
constructor(historyFilePath) {
- super();
+ this.enabled = true;
this.history = {};
this.compiledEntryPoints = new Set([
// Login page
@@ -32,8 +32,7 @@ class IncrementalWebpackCompiler extends NoopCompiler {
'pages.root',
]);
this.historyFilePath = historyFilePath;
- this.loadFromHistory();
- this.enabled = true;
+ this._loadFromHistory();
}
filterEntryPoints(entrypoints) {
@@ -65,7 +64,7 @@ class IncrementalWebpackCompiler extends NoopCompiler {
if (fileName.startsWith('pages.') && fileName.endsWith('.chunk.js')) {
const chunk = fileName.replace(/\.chunk\.js$/, '');
- this.addToHistory(chunk);
+ this._addToHistory(chunk);
if (!this.compiledEntryPoints.has(chunk)) {
log(`First time we are seeing ${chunk}. Adding to compilation.`);
@@ -88,7 +87,7 @@ class IncrementalWebpackCompiler extends NoopCompiler {
// private methods
- addToHistory(chunk) {
+ _addToHistory(chunk) {
if (!this.history[chunk]) {
this.history[chunk] = { lastVisit: null, count: 0 };
}
@@ -102,7 +101,7 @@ class IncrementalWebpackCompiler extends NoopCompiler {
}
}
- loadFromHistory() {
+ _loadFromHistory() {
try {
this.history = JSON.parse(fs.readFileSync(this.historyFilePath, 'utf8'));
const entryPoints = Object.keys(this.history);
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 61a323f96a2..2f00d6dd099 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -544,9 +544,12 @@ Settings.cron_jobs['schedule_merge_request_cleanup_refs_worker']['job_class'] =
Settings.cron_jobs['manage_evidence_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['manage_evidence_worker']['cron'] ||= '0 * * * *'
Settings.cron_jobs['manage_evidence_worker']['job_class'] = 'Releases::ManageEvidenceWorker'
-Settings.cron_jobs['namespaces_in_product_marketing_emails_worker'] ||= Settingslogic.new({})
-Settings.cron_jobs['namespaces_in_product_marketing_emails_worker']['cron'] ||= '0 9 * * *'
-Settings.cron_jobs['namespaces_in_product_marketing_emails_worker']['job_class'] = 'Namespaces::InProductMarketingEmailsWorker'
+
+Gitlab.com do
+ Settings.cron_jobs['namespaces_in_product_marketing_emails_worker'] ||= Settingslogic.new({})
+ Settings.cron_jobs['namespaces_in_product_marketing_emails_worker']['cron'] ||= '0 9 * * *'
+ Settings.cron_jobs['namespaces_in_product_marketing_emails_worker']['job_class'] = 'Namespaces::InProductMarketingEmailsWorker'
+end
Gitlab.ee do
Settings.cron_jobs['analytics_devops_adoption_create_all_snapshots_worker'] ||= Settingslogic.new({})
diff --git a/config/routes.rb b/config/routes.rb
index 09aebb5e0bc..8caa924e113 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -277,6 +277,7 @@ Rails.application.routes.draw do
draw :dashboard
draw :user
draw :project
+ draw :unmatched_project
# Issue https://gitlab.com/gitlab-org/gitlab/-/issues/210024
scope as: 'deprecated' do
diff --git a/config/routes/unmatched_project.rb b/config/routes/unmatched_project.rb
new file mode 100644
index 00000000000..b4fe243c7b0
--- /dev/null
+++ b/config/routes/unmatched_project.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+scope(path: '*namespace_id',
+ as: :namespace,
+ namespace_id: Gitlab::PathRegex.full_namespace_route_regex) do
+ scope(path: ':project_id',
+ constraints: { project_id: Gitlab::PathRegex.project_route_regex },
+ as: :project) do
+ post '*all', to: 'application#route_not_found'
+ put '*all', to: 'application#route_not_found'
+ patch '*all', to: 'application#route_not_found'
+ delete '*all', to: 'application#route_not_found'
+ post '/', to: 'application#route_not_found'
+ put '/', to: 'application#route_not_found'
+ patch '/', to: 'application#route_not_found'
+ delete '/', to: 'application#route_not_found'
+ end
+end