HomeFreeBSD

www/gitlab: fix error uninitialized constant ActiveSupport…

Description

www/gitlab: fix error uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger

The upgrade of gem concurrent-ruby to 1.3.5 made a bug in activesupport visible.
The bug seems to be fixed for rails 7.1 and 7.2 but not 7.0 which gitlab uses.
https://github.com/rails/rails/pull/49372
https://github.com/rails/rails/issues/54260

So we import the Logger to fix the error message:
bundler: failed to load command: puma (/usr/local/bin/puma)
/usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:12:in `<module:LoggerThreadSafeLevel>': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)

Logger::Severity.constants.each do |severity|
      ^^^^^^^^^^
    from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:9:in `<module:ActiveSupport>'
    from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:8:in `<top (required)>'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger_silence.rb:5:in `<top (required)>'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/logger.rb:3:in `<top (required)>'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support.rb:29:in `<top (required)>'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from /usr/local/lib/ruby/gems/3.2/gems/activesupport-7.0.8.7/lib/active_support/all.rb:3:in `<top (required)>'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from /usr/local/www/gitlab/gems/gitlab-utils/lib/gitlab/utils.rb:4:in `<top (required)>'
    from /usr/local/www/gitlab/gems/gitlab-utils/lib/gitlab/utils/all.rb:3:in `require_relative'
    from /usr/local/www/gitlab/gems/gitlab-utils/lib/gitlab/utils/all.rb:3:in `<top (required)>'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from <internal:/usr/local/lib/ruby/site_ruby/3.2/rubygems/core_ext/kernel_require.rb>:37:in `require'
    from /usr/local/www/gitlab/lib/gitlab/cluster/lifecycle_events.rb:3:in `<top (required)>'
    from /usr/local/www/gitlab/config/puma.rb:38:in `require_relative'
    from /usr/local/www/gitlab/config/puma.rb:38:in `_load_from'
    from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/dsl.rb:135:in `instance_eval'
    from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/dsl.rb:135:in `_load_from'
    from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/configuration.rb:246:in `block in load'
    from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/configuration.rb:246:in `each'
    from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/configuration.rb:246:in `load'
    from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/launcher.rb:56:in `initialize'
    from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/cli.rb:66:in `new'
    from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/lib/puma/cli.rb:66:in `initialize'
    from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/bin/puma:8:in `new'
    from /usr/local/lib/ruby/gems/3.2/gems/puma-6.5.0/bin/puma:8:in `<top (required)>'
    from /usr/local/bin/puma:25:in `load'
    from /usr/local/bin/puma:25:in `<top (required)>'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli/exec.rb:59:in `load'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli/exec.rb:59:in `kernel_load'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli/exec.rb:23:in `run'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli.rb:452:in `exec'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor.rb:538:in `dispatch'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli.rb:35:in `dispatch'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/cli.rb:29:in `start'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/exe/bundle:28:in `block in <top (required)>'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
    from /usr/local/lib/ruby/gems/3.2/gems/bundler-2.6.3/exe/bundle:20:in `<top (required)>'
    from /usr/local/bin/bundle:25:in `load'
    from /usr/local/bin/bundle:25:in `<main>'

Details

Provenance
mfechnerAuthored on Wed, Feb 5, 8:13 AM
Parents
R11:fddfbb65ca4f: security/trivy: update to 0.59.1
Branches
Unknown
Tags
Unknown