Skip to content

Conversation

@Watson1978
Copy link
Contributor

Which issue(s) this PR fixes:

What this PR does / why we need it:
test_supervisor.rb uses a constant named TMP_DIR. However, the constant is not defined in this file, it is defined in another file.

TMP_DIR = File.dirname(__FILE__) + "/tmp/config_dsl#{ENV['TEST_ENV_NUMBER']}"

This PR will use expected temporary directory for tests.

Docs Changes:
N/A

Release Note:
N/A

Which issue(s) this PR fixes:
Fixes #

What this PR does / why we need it:

Docs Changes:

Release Note:

**Which issue(s) this PR fixes**:
Fixes #

**What this PR does / why we need it**:
test_supervisor.rb uses a constant named `TMP_DIR`.
However, the constant is not defined in this file, it is defined in
another file.

https://github.com/fluent/fluentd/blob/5a875090dde0222edf789422c7b2f27a828c72c3/test/config/test_dsl.rb#L5

This PR will use expected temporary directory for tests.

**Docs Changes**:
N/A

**Release Note**:
N/A

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@daipom daipom added this to the v1.16.11 milestone Nov 4, 2025
@daipom
Copy link
Contributor

daipom commented Nov 4, 2025

Need to check broken CI

@ashie
Copy link
Member

ashie commented Nov 21, 2025

Need to check broken CI

I believe these errors aren't concerned with this change.

There are 2 patterns in these errors:

https://github.com/fluent/fluentd/actions/runs/19059073415/job/54435056978?pr=5135#step:6:11

/Users/runner/hostedtoolcache/Ruby/2.7.8/arm64/lib/ruby/2.7.0/singleton.rb:162:in `private_class_method': undefined method `new' for class `#<Class:Fluent::Compat::NullOutputChain>' (NameError)
Did you mean?  next
	from /Users/runner/hostedtoolcache/Ruby/2.7.8/arm64/lib/ruby/2.7.0/singleton.rb:162:in `included'
	from /Users/runner/work/fluentd/fluentd/lib/fluent/compat/output_chain.rb:23:in `include'
	from /Users/runner/work/fluentd/fluentd/lib/fluent/compat/output_chain.rb:23:in `<class:NullOutputChain>'
	from /Users/runner/work/fluentd/fluentd/lib/fluent/compat/output_chain.rb:22:in `<module:Compat>'
	from /Users/runner/work/fluentd/fluentd/lib/fluent/compat/output_chain.rb:20:in `<module:Fluent>'
	from /Users/runner/work/fluentd/fluentd/lib/fluent/compat/output_chain.rb:19:in `<top (required)>'
	from /Users/runner/hostedtoolcache/Ruby/2.7.8/arm64/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/
...

It seems that something changed in Ruby 2.7 or gems, similar errors occur on all platforms with Ruby 2.7.
But we don't need Ruby v2.7 support even in v1.16, we can simply drop CI for Ruby 2.7 in v1.16 branch.
No need wasting our time to investigate it.

https://github.com/fluent/fluentd/actions/runs/19059073415/job/54435056998?pr=5135#step:6:4849

 1) Failure: test_supervisor_event_handler(SupervisorTest): <false> is not true.
D:/a/fluentd/fluentd/test/test_supervisor.rb:388:in `test_supervisor_event_handler'
     385: 
     386:     debug_msg = '[debug]: Got Win32 event "TestFluentdEvent_USR1"'
     387:     logs = $log.out.logs
  => 388:     assert{ logs.any?{|log| log.include?(debug_msg) } }
     389:   ensure
     390:     $log.out.reset if $log&.out&.respond_to?(:reset)
     391:   end

2) Failure: test_windows_shutdown_event(SupervisorTest): <false> is not true.
D:/a/fluentd/fluentd/test/test_supervisor.rb:362:in `test_windows_shutdown_event'
     359: 
     360:     debug_msg = '[debug]: Got Win32 event "TestFluentdEvent"'
     361:     logs = $log.out.logs
  => 362:     assert{ logs.any?{|log| log.include?(debug_msg) } }
     363:   ensure
     364:     $log.out.reset if $log&.out&.respond_to?(:reset)
     365:   end

Although I'm not sure the reason yet, same error occurs in #5137 too.
https://github.com/fluent/fluentd/actions/runs/19060858832/job/54440144205?pr=5137#step:6:4753

@ashie ashie merged commit 6d26f8d into v1.16 Nov 21, 2025
20 of 24 checks passed
@ashie ashie deleted the backport-to-1.16/pr5102 branch November 21, 2025 03:04
@Watson1978
Copy link
Contributor Author

Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants