Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
04d17db7
Commit
04d17db7
authored
Mar 21, 2021
by
Lee Tickett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary use of freeze
parent
75891f66
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
37 additions
and
32 deletions
+37
-32
changelogs/unreleased/31343-remove-unnecessary-use-of-freeze2.yml
...gs/unreleased/31343-remove-unnecessary-use-of-freeze2.yml
+5
-0
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+1
-1
ee/app/models/ee/user.rb
ee/app/models/ee/user.rb
+2
-2
ee/app/models/geo/secondary_usage_data.rb
ee/app/models/geo/secondary_usage_data.rb
+1
-1
ee/app/models/geo/tracking_base.rb
ee/app/models/geo/tracking_base.rb
+1
-1
ee/app/models/protected_environment/deploy_access_level.rb
ee/app/models/protected_environment/deploy_access_level.rb
+2
-2
ee/app/services/admin/email_service.rb
ee/app/services/admin/email_service.rb
+1
-1
ee/app/services/ee/auto_merge_service.rb
ee/app/services/ee/auto_merge_service.rb
+2
-2
ee/app/services/geo/create_object_pool_service.rb
ee/app/services/geo/create_object_pool_service.rb
+1
-1
ee/app/services/geo/metrics_update_service.rb
ee/app/services/geo/metrics_update_service.rb
+1
-1
ee/app/services/projects/slack_application_install_service.rb
...pp/services/projects/slack_application_install_service.rb
+1
-1
ee/app/workers/update_all_mirrors_worker.rb
ee/app/workers/update_all_mirrors_worker.rb
+1
-1
ee/lib/ee.rb
ee/lib/ee.rb
+7
-7
ee/lib/ee/banzai/issuable_extractor.rb
ee/lib/ee/banzai/issuable_extractor.rb
+2
-2
ee/lib/ee/gitlab/geo_git_access.rb
ee/lib/ee/gitlab/geo_git_access.rb
+1
-1
ee/lib/gitlab/auth/group_saml/response_store.rb
ee/lib/gitlab/auth/group_saml/response_store.rb
+1
-1
ee/lib/gitlab/ci/parsers/security/formatters/dast.rb
ee/lib/gitlab/ci/parsers/security/formatters/dast.rb
+1
-1
ee/lib/gitlab/database/load_balancing/rack_middleware.rb
ee/lib/gitlab/database/load_balancing/rack_middleware.rb
+1
-1
ee/lib/gitlab/geo/base_request.rb
ee/lib/gitlab/geo/base_request.rb
+1
-1
ee/lib/gitlab/geo/cron_manager.rb
ee/lib/gitlab/geo/cron_manager.rb
+2
-2
ee/lib/gitlab/mirror.rb
ee/lib/gitlab/mirror.rb
+2
-2
No files found.
changelogs/unreleased/31343-remove-unnecessary-use-of-freeze2.yml
0 → 100644
View file @
04d17db7
---
title
:
Remove unnecessary use of freeze
merge_request
:
57057
author
:
Lee Tickett @leetickett
type
:
other
ee/app/models/ee/project.rb
View file @
04d17db7
...
@@ -12,7 +12,7 @@ module EE
...
@@ -12,7 +12,7 @@ module EE
include
::
Gitlab
::
Utils
::
StrongMemoize
include
::
Gitlab
::
Utils
::
StrongMemoize
include
IgnorableColumns
include
IgnorableColumns
GIT_LFS_DOWNLOAD_OPERATION
=
'download'
.
freeze
GIT_LFS_DOWNLOAD_OPERATION
=
'download'
prepended
do
prepended
do
include
Elastic
::
ProjectsSearch
include
Elastic
::
ProjectsSearch
...
...
ee/app/models/ee/user.rb
View file @
04d17db7
...
@@ -11,8 +11,8 @@ module EE
...
@@ -11,8 +11,8 @@ module EE
include
AuditorUserHelper
include
AuditorUserHelper
DEFAULT_ROADMAP_LAYOUT
=
'months'
.
freeze
DEFAULT_ROADMAP_LAYOUT
=
'months'
DEFAULT_GROUP_VIEW
=
'details'
.
freeze
DEFAULT_GROUP_VIEW
=
'details'
MAX_USERNAME_SUGGESTION_ATTEMPTS
=
15
MAX_USERNAME_SUGGESTION_ATTEMPTS
=
15
prepended
do
prepended
do
...
...
ee/app/models/geo/secondary_usage_data.rb
View file @
04d17db7
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
class
Geo::SecondaryUsageData
<
Geo
::
TrackingBase
class
Geo::SecondaryUsageData
<
Geo
::
TrackingBase
include
Gitlab
::
Utils
::
UsageData
include
Gitlab
::
Utils
::
UsageData
GIT_FETCH_EVENT_COUNT_WEEKLY_QUERY
=
'round(sum(increase(grpc_server_handled_total{grpc_method=~"SSHUploadPack|PostUploadPack"}[7d])))'
.
freeze
GIT_FETCH_EVENT_COUNT_WEEKLY_QUERY
=
'round(sum(increase(grpc_server_handled_total{grpc_method=~"SSHUploadPack|PostUploadPack"}[7d])))'
# Eventually, we'll find a way to auto-load this
# Eventually, we'll find a way to auto-load this
# from the metric yaml files that include something
# from the metric yaml files that include something
...
...
ee/app/models/geo/tracking_base.rb
View file @
04d17db7
...
@@ -6,7 +6,7 @@ module Geo
...
@@ -6,7 +6,7 @@ module Geo
class
TrackingBase
<
ApplicationRecord
class
TrackingBase
<
ApplicationRecord
self
.
abstract_class
=
true
self
.
abstract_class
=
true
NOT_CONFIGURED_MSG
=
'Geo secondary database is not configured'
.
freeze
NOT_CONFIGURED_MSG
=
'Geo secondary database is not configured'
SecondaryNotConfigured
=
Class
.
new
(
StandardError
)
SecondaryNotConfigured
=
Class
.
new
(
StandardError
)
if
::
Gitlab
::
Geo
.
geo_database_configured?
if
::
Gitlab
::
Geo
.
geo_database_configured?
...
...
ee/app/models/protected_environment/deploy_access_level.rb
View file @
04d17db7
...
@@ -8,8 +8,8 @@ class ProtectedEnvironment::DeployAccessLevel < ApplicationRecord
...
@@ -8,8 +8,8 @@ class ProtectedEnvironment::DeployAccessLevel < ApplicationRecord
].
freeze
].
freeze
HUMAN_ACCESS_LEVELS
=
{
HUMAN_ACCESS_LEVELS
=
{
Gitlab
::
Access
::
MAINTAINER
=>
'Maintainers'
.
freeze
,
Gitlab
::
Access
::
MAINTAINER
=>
'Maintainers'
,
Gitlab
::
Access
::
DEVELOPER
=>
'Developers + Maintainers'
.
freeze
Gitlab
::
Access
::
DEVELOPER
=>
'Developers + Maintainers'
}.
freeze
}.
freeze
belongs_to
:user
belongs_to
:user
...
...
ee/app/services/admin/email_service.rb
View file @
04d17db7
...
@@ -5,7 +5,7 @@ module Admin
...
@@ -5,7 +5,7 @@ module Admin
include
ExclusiveLeaseGuard
include
ExclusiveLeaseGuard
DEFAULT_LEASE_TIMEOUT
=
10
.
minutes
.
to_i
DEFAULT_LEASE_TIMEOUT
=
10
.
minutes
.
to_i
LEASE_KEY
=
'admin/email_service'
.
freeze
LEASE_KEY
=
'admin/email_service'
def
initialize
(
recipients
,
subject
,
body
)
def
initialize
(
recipients
,
subject
,
body
)
@recipients
,
@subject
,
@body
=
recipients
,
subject
,
body
@recipients
,
@subject
,
@body
=
recipients
,
subject
,
body
...
...
ee/app/services/ee/auto_merge_service.rb
View file @
04d17db7
...
@@ -4,8 +4,8 @@ module EE
...
@@ -4,8 +4,8 @@ module EE
module
AutoMergeService
module
AutoMergeService
extend
ActiveSupport
::
Concern
extend
ActiveSupport
::
Concern
STRATEGY_MERGE_TRAIN
=
'merge_train'
.
freeze
STRATEGY_MERGE_TRAIN
=
'merge_train'
STRATEGY_ADD_TO_MERGE_TRAIN_WHEN_PIPELINE_SUCCEEDS
=
'add_to_merge_train_when_pipeline_succeeds'
.
freeze
STRATEGY_ADD_TO_MERGE_TRAIN_WHEN_PIPELINE_SUCCEEDS
=
'add_to_merge_train_when_pipeline_succeeds'
EE_STRATEGIES
=
[
STRATEGY_MERGE_TRAIN
,
STRATEGY_ADD_TO_MERGE_TRAIN_WHEN_PIPELINE_SUCCEEDS
].
freeze
EE_STRATEGIES
=
[
STRATEGY_MERGE_TRAIN
,
STRATEGY_ADD_TO_MERGE_TRAIN_WHEN_PIPELINE_SUCCEEDS
].
freeze
class_methods
do
class_methods
do
...
...
ee/app/services/geo/create_object_pool_service.rb
View file @
04d17db7
...
@@ -6,7 +6,7 @@ module Geo
...
@@ -6,7 +6,7 @@ module Geo
include
Gitlab
::
Geo
::
LogHelpers
include
Gitlab
::
Geo
::
LogHelpers
LEASE_TIMEOUT
=
1
.
hour
.
freeze
LEASE_TIMEOUT
=
1
.
hour
.
freeze
LEASE_KEY_PREFIX
=
'object_pool:create'
.
freeze
LEASE_KEY_PREFIX
=
'object_pool:create'
attr_reader
:pool_repository
attr_reader
:pool_repository
...
...
ee/app/services/geo/metrics_update_service.rb
View file @
04d17db7
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
module
Geo
module
Geo
class
MetricsUpdateService
class
MetricsUpdateService
METRIC_PREFIX
=
'geo_'
.
freeze
METRIC_PREFIX
=
'geo_'
def
execute
def
execute
return
unless
Gitlab
::
Geo
.
enabled?
return
unless
Gitlab
::
Geo
.
enabled?
...
...
ee/app/services/projects/slack_application_install_service.rb
View file @
04d17db7
...
@@ -4,7 +4,7 @@ module Projects
...
@@ -4,7 +4,7 @@ module Projects
class
SlackApplicationInstallService
<
BaseService
class
SlackApplicationInstallService
<
BaseService
include
Gitlab
::
Routing
include
Gitlab
::
Routing
SLACK_EXCHANGE_TOKEN_URL
=
'https://slack.com/api/oauth.access'
.
freeze
SLACK_EXCHANGE_TOKEN_URL
=
'https://slack.com/api/oauth.access'
def
execute
def
execute
slack_data
=
exchange_slack_token
slack_data
=
exchange_slack_token
...
...
ee/app/workers/update_all_mirrors_worker.rb
View file @
04d17db7
...
@@ -8,7 +8,7 @@ class UpdateAllMirrorsWorker # rubocop:disable Scalability/IdempotentWorker
...
@@ -8,7 +8,7 @@ class UpdateAllMirrorsWorker # rubocop:disable Scalability/IdempotentWorker
LEASE_TIMEOUT
=
5
.
minutes
LEASE_TIMEOUT
=
5
.
minutes
SCHEDULE_WAIT_TIMEOUT
=
4
.
minutes
SCHEDULE_WAIT_TIMEOUT
=
4
.
minutes
LEASE_KEY
=
'update_all_mirrors'
.
freeze
LEASE_KEY
=
'update_all_mirrors'
RESCHEDULE_WAIT
=
1
.
second
RESCHEDULE_WAIT
=
1
.
second
def
perform
def
perform
...
...
ee/lib/ee.rb
View file @
04d17db7
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
module
EE
module
EE
SUBSCRIPTIONS_URL
=
::
Gitlab
::
SubscriptionPortal
::
SUBSCRIPTIONS_URL
SUBSCRIPTIONS_URL
=
::
Gitlab
::
SubscriptionPortal
::
SUBSCRIPTIONS_URL
SUBSCRIPTIONS_COMPARISON_URL
=
"https://about.gitlab.com/pricing/gitlab-com/feature-comparison"
.
freeze
SUBSCRIPTIONS_COMPARISON_URL
=
"https://about.gitlab.com/pricing/gitlab-com/feature-comparison"
SUBSCRIPTIONS_GRAPHQL_URL
=
"
#{
SUBSCRIPTIONS_URL
}
/graphql"
.
freeze
SUBSCRIPTIONS_GRAPHQL_URL
=
"
#{
SUBSCRIPTIONS_URL
}
/graphql"
SUBSCRIPTIONS_MORE_MINUTES_URL
=
"
#{
SUBSCRIPTIONS_URL
}
/buy_pipeline_minutes"
.
freeze
SUBSCRIPTIONS_MORE_MINUTES_URL
=
"
#{
SUBSCRIPTIONS_URL
}
/buy_pipeline_minutes"
SUBSCRIPTIONS_MORE_STORAGE_URL
=
"
#{
SUBSCRIPTIONS_URL
}
/buy_storage"
.
freeze
SUBSCRIPTIONS_MORE_STORAGE_URL
=
"
#{
SUBSCRIPTIONS_URL
}
/buy_storage"
SUBSCRIPTIONS_PLANS_URL
=
"
#{
SUBSCRIPTIONS_URL
}
/plans"
.
freeze
SUBSCRIPTIONS_PLANS_URL
=
"
#{
SUBSCRIPTIONS_URL
}
/plans"
SUBSCRIPTION_PORTAL_ADMIN_EMAIL
=
ENV
.
fetch
(
'SUBSCRIPTION_PORTAL_ADMIN_EMAIL'
,
'gl_com_api@gitlab.com'
)
SUBSCRIPTION_PORTAL_ADMIN_EMAIL
=
ENV
.
fetch
(
'SUBSCRIPTION_PORTAL_ADMIN_EMAIL'
,
'gl_com_api@gitlab.com'
)
SUBSCRIPTION_PORTAL_ADMIN_TOKEN
=
ENV
.
fetch
(
'SUBSCRIPTION_PORTAL_ADMIN_TOKEN'
,
'customer_admin_token'
)
SUBSCRIPTION_PORTAL_ADMIN_TOKEN
=
ENV
.
fetch
(
'SUBSCRIPTION_PORTAL_ADMIN_TOKEN'
,
'customer_admin_token'
)
CUSTOMER_SUPPORT_URL
=
'https://support.gitlab.com'
.
freeze
CUSTOMER_SUPPORT_URL
=
'https://support.gitlab.com'
CUSTOMER_LICENSE_SUPPORT_URL
=
'https://support.gitlab.com/hc/en-us/requests/new?ticket_form_id=360000071293'
.
freeze
CUSTOMER_LICENSE_SUPPORT_URL
=
'https://support.gitlab.com/hc/en-us/requests/new?ticket_form_id=360000071293'
end
end
ee/lib/ee/banzai/issuable_extractor.rb
View file @
04d17db7
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
module
EE
module
EE
module
Banzai
module
Banzai
module
IssuableExtractor
module
IssuableExtractor
EPIC_REFERENCE_TYPE
=
'@data-reference-type="epic"'
.
freeze
EPIC_REFERENCE_TYPE
=
'@data-reference-type="epic"'
VULNERABILITY_REFERENCE_TYPE
=
'@data-reference-type="vulnerability"'
.
freeze
VULNERABILITY_REFERENCE_TYPE
=
'@data-reference-type="vulnerability"'
private
private
...
...
ee/lib/ee/gitlab/geo_git_access.rb
View file @
04d17db7
...
@@ -8,7 +8,7 @@ module EE
...
@@ -8,7 +8,7 @@ module EE
include
GrapePathHelpers
::
NamedRouteMatcher
include
GrapePathHelpers
::
NamedRouteMatcher
extend
::
Gitlab
::
Utils
::
Override
extend
::
Gitlab
::
Utils
::
Override
GEO_SERVER_DOCS_URL
=
'https://docs.gitlab.com/ee/administration/geo/replication/using_a_geo_server.html'
.
freeze
GEO_SERVER_DOCS_URL
=
'https://docs.gitlab.com/ee/administration/geo/replication/using_a_geo_server.html'
private
private
...
...
ee/lib/gitlab/auth/group_saml/response_store.rb
View file @
04d17db7
...
@@ -4,7 +4,7 @@ module Gitlab
...
@@ -4,7 +4,7 @@ module Gitlab
module
Auth
module
Auth
module
GroupSaml
module
GroupSaml
class
ResponseStore
class
ResponseStore
STORAGE_KEY
=
'last_saml_debug_response'
.
freeze
STORAGE_KEY
=
'last_saml_debug_response'
REDIS_EXPIRY_TIME
=
5
.
minutes
REDIS_EXPIRY_TIME
=
5
.
minutes
attr_reader
:session_id
attr_reader
:session_id
...
...
ee/lib/gitlab/ci/parsers/security/formatters/dast.rb
View file @
04d17db7
...
@@ -6,7 +6,7 @@ module Gitlab
...
@@ -6,7 +6,7 @@ module Gitlab
module
Security
module
Security
module
Formatters
module
Formatters
class
Dast
class
Dast
FORMAT_VERSION
=
'2.0'
.
freeze
FORMAT_VERSION
=
'2.0'
def
initialize
(
report
)
def
initialize
(
report
)
@report
=
report
@report
=
report
...
...
ee/lib/gitlab/database/load_balancing/rack_middleware.rb
View file @
04d17db7
...
@@ -7,7 +7,7 @@ module Gitlab
...
@@ -7,7 +7,7 @@ module Gitlab
# API calls are handled separately as different API endpoints need to
# API calls are handled separately as different API endpoints need to
# stick based on different objects.
# stick based on different objects.
class
RackMiddleware
class
RackMiddleware
STICK_OBJECT
=
'load_balancing.stick_object'
.
freeze
STICK_OBJECT
=
'load_balancing.stick_object'
# Unsticks or continues sticking the current request.
# Unsticks or continues sticking the current request.
#
#
...
...
ee/lib/gitlab/geo/base_request.rb
View file @
04d17db7
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
module
Gitlab
module
Gitlab
module
Geo
module
Geo
class
BaseRequest
class
BaseRequest
GITLAB_GEO_AUTH_TOKEN_TYPE
=
'GL-Geo'
.
freeze
GITLAB_GEO_AUTH_TOKEN_TYPE
=
'GL-Geo'
attr_reader
:request_data
attr_reader
:request_data
...
...
ee/lib/gitlab/geo/cron_manager.rb
View file @
04d17db7
...
@@ -26,8 +26,8 @@ module Gitlab
...
@@ -26,8 +26,8 @@ module Gitlab
GEO_JOBS
=
(
COMMON_JOBS
+
PRIMARY_JOBS
+
SECONDARY_JOBS
).
freeze
GEO_JOBS
=
(
COMMON_JOBS
+
PRIMARY_JOBS
+
SECONDARY_JOBS
).
freeze
CONFIG_WATCHER
=
'geo_sidekiq_cron_config_worker'
.
freeze
CONFIG_WATCHER
=
'geo_sidekiq_cron_config_worker'
CONFIG_WATCHER_CLASS
=
'Geo::SidekiqCronConfigWorker'
.
freeze
CONFIG_WATCHER_CLASS
=
'Geo::SidekiqCronConfigWorker'
def
execute
def
execute
return
unless
Geo
.
connected?
return
unless
Geo
.
connected?
...
...
ee/lib/gitlab/mirror.rb
View file @
04d17db7
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
module
Gitlab
module
Gitlab
module
Mirror
module
Mirror
# Runs scheduler every minute
# Runs scheduler every minute
SCHEDULER_CRON
=
'* * * * *'
.
freeze
SCHEDULER_CRON
=
'* * * * *'
PULL_CAPACITY_KEY
=
'MIRROR_PULL_CAPACITY'
.
freeze
PULL_CAPACITY_KEY
=
'MIRROR_PULL_CAPACITY'
JITTER
=
1
.
minute
JITTER
=
1
.
minute
# TODO: Dynamically determine mirror update interval based on total number
# TODO: Dynamically determine mirror update interval based on total number
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment