Skip to content

Change rake task 'verbose' parameter#938

Open
nadjaheitmann wants to merge 1 commit intotheforeman:developfrom
ATIX-AG:fix-tests-upstream
Open

Change rake task 'verbose' parameter#938
nadjaheitmann wants to merge 1 commit intotheforeman:developfrom
ATIX-AG:fix-tests-upstream

Conversation

@nadjaheitmann
Copy link
Copy Markdown
Contributor

The verbose option does not work anymore, so we have to explicitly pass the '--verbose' option now.

The verbose option does not work anymore, so we have to explicitly pass
the '--verbose' option now.
@nadjaheitmann nadjaheitmann marked this pull request as ready for review April 29, 2026 07:38
@adamruzicka
Copy link
Copy Markdown
Contributor

Before

# bundle exec rake test TEST="test/util_test.rb"
/Users/aruzicka/.local/share/rv/rubies/ruby-3.3.10/bin/ruby -w -I"lib:.:lib:test" -W1 /Users/aruzicka/.local/share/rv/gems/ruby/3.3.0/gems/rake-13.3.0/lib/rake/rake_test_loader.rb "test/util_test.rb"
/Users/aruzicka/vcs/foreman/smart-proxy/lib/proxy/log.rb:2: warning: syslog was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.4.0.
You can add syslog to your Gemfile or gemspec to silence this warning.
Loaded suite /Users/aruzicka/.local/share/rv/gems/ruby/3.3.0/gems/rake-13.3.0/lib/rake/rake_test_loader
Started
Finished in 0.171441 seconds.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
12 tests, 15 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
69.99 tests/s, 87.49 assertions/s

After

bundle exec rake test TEST="test/util_test.rb"
/Users/aruzicka/vcs/foreman/smart-proxy/lib/proxy/log.rb:2: warning: syslog was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.4.0.
You can add syslog to your Gemfile or gemspec to silence this warning.
Loaded suite /Users/aruzicka/.local/share/rv/gems/ruby/3.3.0/gems/rake-13.3.0/lib/rake/rake_test_loader
Started
ProxyUtilTest:
  test_commandtask_as_array_with_exit_0:                                                                                                                                                                                                                        .: (0.042590)
  test_commandtask_with_exit_0:                                                                                                                                                                                                                                 .: (0.037225)
  test_commandtask_with_exit_1:                                                                                                                                                                                                                                 .: (0.035014)
  test_commandtask_with_input_and_exit_0:                                                                                                                                                                                                                       .: (0.037801)
  test_strict_encode64:                                                                                                                                                                                                                                         .: (0.000079)
  test_to_bool_default_true:                                                                                                                                                                                                                                    .: (0.000046)
  test_to_bool_empty:                                                                                                                                                                                                                                           .: (0.000028)
  test_to_bool_false_bool:                                                                                                                                                                                                                                      .: (0.000032)
  test_to_bool_true:                                                                                                                                                                                                                                            .: (0.000026)
  test_to_bool_true_bool:                                                                                                                                                                                                                                       .: (0.000023)
  test_util_shell_escape:                                                                                                                                                                                                                                       .: (0.000125)
  test_util_should_support_path:                                                                                                                                                                                                                                .: (0.000022)

Finished in 0.153628 seconds.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
12 tests, 15 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
78.11 tests/s, 97.64 assertions/s

Well it does change things, but according to the source it shouldn't be necessary? Have you found out why it doesn't work anymore?

@nadjaheitmann
Copy link
Copy Markdown
Contributor Author

Well it does change things, but according to the source it shouldn't be necessary? Have you found out why it doesn't work anymore?

I have relied on the bug explanation tbh: https://projects.theforeman.org/issues/39248

While this PR sure does not redesign or modernize the test suite, it at least unblocks the failing CI tests.

@m-bucher
Copy link
Copy Markdown

Well it does change things, but according to the source it shouldn't be necessary? Have you found out why it doesn't work anymore?

Something along the way seems to interpret the -v as a --version parameter. Not sure what that might be though.

Looking at the Before and After output, it seems to me that the t.verbose (which adds -v to the parameters) never really worked, because the Before output looks not-verbose.
The root cause might be in the plumbing of the rake-tasks unless it is a problem in rake itself 😅

IMHO this PR fixes the pipeline for now so 👍
😁

@ekohl
Copy link
Copy Markdown
Member

ekohl commented Apr 29, 2026

@nadjaheitmann which rake version are you using? ruby/rake@5886caa fixed a regression in Rake 13.4.0/13.4.1.

@nadjaheitmann
Copy link
Copy Markdown
Contributor Author

@nadjaheitmann which rake version are you using? ruby/rake@5886caa fixed a regression in Rake 13.4.0/13.4.1.

In this run, we have the pipeline failing and use rake 13.4.2: https://github.com/theforeman/smart-proxy/actions/runs/25096463025/job/73534458532#step:5:243

I started that run on this branch but with the fix commit reverted to double-check the issue was actually solved by the fix.

@nadjaheitmann
Copy link
Copy Markdown
Contributor Author

Reading through the issue description, @ogajduse proposed a fix directly in ci-reporter/ci_reporter_test_unit#13 which is closer to the root cause of the problem than this PR which is more targeted at resolving the symptoms. But it is very unlikely to be merged given the project has not received any changes during the last 10 years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants