Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Fails "test_reopen(LogTest)" test with "TypeError: no implicit conversion of Pathname into String" since logger v1.6.3 on Windows #4742

Open
Watson1978 opened this issue Dec 22, 2024 · 1 comment
Labels
CI Test/CI issues

Comments

@Watson1978
Copy link
Contributor

Describe the bug

If update logger gem to v1.6.3 or later, it fails test_reopen(LogTest) test.

PS C:\src\fluentd> bundle exec ruby -I"lib:test" .\test\test_log.rb
Loaded suite ./test/test_log
Started
Finished in 0.2304898 seconds.
------------------------------------------------------------------------------------------------------------------------
108 tests, 142 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
------------------------------------------------------------------------------------------------------------------------
468.57 tests/s, 616.08 assertions/s
PS C:\src\fluentd> git stash
Saved working directory and index state WIP on master: f85b503a test_cat: specify the reading size to read in binary mode (#4730)
PS C:\src\fluentd> bundle exec ruby -I"lib:test" .\test\test_log.rb
Loaded suite ./test/test_log
Started
E
========================================================================================================================
Error: test_reopen(LogTest): TypeError: no implicit conversion of Pathname into String
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/logger-1.6.4/lib/logger/log_device.rb:99:in `initialize'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/logger-1.6.4/lib/logger/log_device.rb:99:in `new'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/logger-1.6.4/lib/logger/log_device.rb:99:in `fixup_mode'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/logger-1.6.4/lib/logger/log_device.rb:112:in `open_logfile'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/logger-1.6.4/lib/logger/log_device.rb:85:in `set_dev'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/logger-1.6.4/lib/logger/log_device.rb:62:in `block in reopen'
C:/Ruby33-x64/lib/ruby/3.3.0/monitor.rb:201:in `synchronize'
C:/Ruby33-x64/lib/ruby/3.3.0/monitor.rb:201:in `mon_synchronize'
C:/Ruby33-x64/lib/ruby/gems/3.3.0/gems/logger-1.6.4/lib/logger/log_device.rb:57:in `reopen'
C:/src/fluentd/lib/fluent/log.rb:749:in `reopen'
C:/src/fluentd/lib/fluent/log.rb:239:in `reopen!'
./test/test_log.rb:697:in `test_reopen'
     694:     message = "This is test message."
     695:
     696:     log.info message
  => 697:     log.reopen!
     698:     log.info message
     699:
     700:     assert { path.read.lines.count{ |line| line.include?(message) } == 2 }
========================================================================================================================
Finished in 0.235612 seconds.
------------------------------------------------------------------------------------------------------------------------
108 tests, 140 assertions, 0 failures, 1 errors, 0 pendings, 0 omissions, 0 notifications
99.0741% passed
------------------------------------------------------------------------------------------------------------------------
458.38 tests/s, 594.20 assertions/s

To Reproduce

Run bundle exec ruby -I"lib:test" .\test\test_log.rb

Expected behavior

No error

Your Environment

- Fluentd version:
- Package version:
- Operating system:
- Kernel version:

Your Configuration

none

Your Error Log

See above

Additional context

No response

@Watson1978
Copy link
Contributor Author

Related to ruby/logger#107

@Watson1978 Watson1978 changed the title CI: Fails "test_reopen(LogTest)" test with "TypeError: no implicit conversion of Pathname into String" test since logger v1.6.3 on Windows CI: Fails "test_reopen(LogTest)" test with "TypeError: no implicit conversion of Pathname into String" since logger v1.6.3 on Windows Dec 22, 2024
@Watson1978 Watson1978 moved this to Triage in Fluentd Kanban Dec 23, 2024
@Watson1978 Watson1978 moved this from Triage to To-Do in Fluentd Kanban Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Test/CI issues
Projects
Status: To-Do
Development

No branches or pull requests

1 participant