Resolve final CE/EE differences
We are getting very close to having resolved all differences in CE and EE. There are a few more differences that I found after tweaking my diff script a bit:
app/models/concerns/prometheus_adapter.rb
diff --git a/app/models/concerns/prometheus_adapter.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/app/models/concerns/prometheus_adapter.rb
index 9ac4722c6b1..aab0589f7ca 100644
--- a/app/models/concerns/prometheus_adapter.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/app/models/concerns/prometheus_adapter.rb
@@ -5,6 +5,8 @@ module PrometheusAdapter
included do
include ReactiveCaching
+ # We can't prepend outside of this model due to the use of `included`, so this must stay here.
+ prepend_if_ee('EE::PrometheusAdapter') # rubocop: disable Cop/InjectEnterpriseEditionModule
self.reactive_cache_lease_timeout = 30.seconds
self.reactive_cache_refresh_interval = 30.seconds
app/models/discussion_note.rb
diff --git a/app/models/discussion_note.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/app/models/discussion_note.rb
index 142cbdcdfa6..5049107da2c 100644
--- a/app/models/discussion_note.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/app/models/discussion_note.rb
@@ -4,6 +4,9 @@
#
# A note of this type can be resolvable.
class DiscussionNote < Note
+ # This prepend must stay here because the `validates` below depends on it.
+ prepend_if_ee('EE::DiscussionNote') # rubocop: disable Cop/InjectEnterpriseEditionModule
+
# Names of all implementers of `Noteable` that support discussions.
def self.noteable_types
%w(MergeRequest Issue Commit Snippet)
lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
diff --git a/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
index 2afc99d0bf8..56ce33203ad 100644
--- a/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/ci/templates/Security/Container-Scanning.gitlab-ci.yml
@@ -1,4 +1,4 @@
-# Read more about this feature here: https://docs.gitlab.com/ee/user/project/merge_requests/container_scanning.html
+# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/container_scanning/
container_scanning:
stage: test
lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml
diff --git a/lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml
index 15b84f1540d..c8930bc6263 100644
--- a/lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml
@@ -1,4 +1,4 @@
-# Read more about this feature here: https://docs.gitlab.com/ee/user/project/merge_requests/dependency_scanning.html
+# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/
#
# Configure the scanning tool through the environment variables.
# List of the variables: https://gitlab.com/gitlab-org/security-products/dependency-scanning#settings
lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml
diff --git a/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml
index b6555e627a1..f10a445f7c9 100644
--- a/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/ci/templates/Security/License-Management.gitlab-ci.yml
@@ -1,4 +1,8 @@
-# Read more about this feature here: https://docs.gitlab.com/ee/user/project/merge_requests/license_management.html
+# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/license_management/
+#
+# Configure the scanning tool through the environment variables.
+# List of the variables: https://gitlab.com/gitlab-org/security-products/license-management#settings
+# How to set: https://docs.gitlab.com/ee/ci/yaml/#variables
variables:
LICENSE_MANAGEMENT_SETUP_CMD: '' # If needed, specify a command to setup your environment with a custom package manager.
lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
diff --git a/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
index 90278122361..a61731a24b7 100644
--- a/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/lib/gitlab/ci/templates/Security/SAST.gitlab-ci.yml
@@ -1,4 +1,4 @@
-# Read more about this feature here: https://docs.gitlab.com/ee/user/project/merge_requests/sast.html
+# Read more about this feature here: https://docs.gitlab.com/ee/user/application_security/sast/
#
# Configure the scanning tool through the environment variables.
# List of the variables: https://gitlab.com/gitlab-org/security-products/sast#settings
spec/db/schema_spec.rb
diff --git a/spec/db/schema_spec.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/db/schema_spec.rb
index 52af470efac..601546283d0 100644
--- a/spec/db/schema_spec.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/db/schema_spec.rb
@@ -4,6 +4,8 @@ require 'spec_helper'
require Rails.root.join('ee', 'spec', 'db', 'schema_support') if Gitlab.ee?
describe 'Database schema' do
+ prepend ::EE::DB::SchemaSupport
+
let(:connection) { ActiveRecord::Base.connection }
let(:tables) { connection.tables }
spec/requests/git_http_spec.rb
diff --git a/spec/requests/git_http_spec.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/requests/git_http_spec.rb
index 5c9a5b73ee5..e58f1b7d9dc 100644
--- a/spec/requests/git_http_spec.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/requests/git_http_spec.rb
@@ -1,4 +1,4 @@
-require "spec_helper"
+require 'spec_helper'
describe 'Git HTTP requests' do
include ProjectForksHelper
spec/spec_helper.rb
diff --git a/spec/spec_helper.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/spec_helper.rb
index bd504f1553b..8e0646e0cc9 100644
--- a/spec/spec_helper.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/spec_helper.rb
@@ -32,6 +32,8 @@ end
require 'rainbow/ext/string'
Rainbow.enabled = false
+require_relative '../ee/spec/spec_helper'
+
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
# Requires helpers, and shared contexts/examples first since they're used in other support files
spec/support/helpers/test_env.rb
diff --git a/spec/support/helpers/test_env.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/support/helpers/test_env.rb
index a4acf76e1a3..08c86f689ad 100644
--- a/spec/support/helpers/test_env.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/spec/support/helpers/test_env.rb
@@ -419,3 +419,8 @@ module TestEnv
true
end
end
+
+require_relative '../../../ee/spec/support/helpers/ee/test_env'
+
+::TestEnv.prepend_if_ee('::EE::TestEnv')
+::TestEnv.extend_if_ee('::EE::TestEnv')