Skip to content

Conversation

@cosmo0920
Copy link
Contributor

@cosmo0920 cosmo0920 commented Jan 6, 2026

When nothing found of directory separators on the given argument of dirname(), we need to align this behavior.
After aligning the behavior, we can proceed to load configurations from specified workdir folders.

Closes #11295.

Same as attached in #11295.

service:
  flush: 5
  daemon: false
  log_level: trace
  parsers_file: parsers.yaml

includes:
   - dpc-1.yaml

dpc-1.yaml

env:
  flush_interval: 1
PS> bin/fluent-bit --config repro.yaml --workdir E:\fluent-bit\ -H -P 2021 -Y
  • Debug log output from testing the change

Then, we get to succeeded to load configurations with relative paths.

Fluent Bit v4.2.3
* Copyright (C) 2015-2025 The Fluent Bit Authors
* Fluent Bit is a CNCF graduated project under the Fluent organization
* https://fluentbit.io

______ _                  _    ______ _ _             ___   _____
|  ___| |                | |   | ___ (_) |           /   | / __  \
| |_  | |_   _  ___ _ __ | |_  | |_/ /_| |_  __   __/ /| | `' / /'
|  _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / / /_| |   / /
| |   | | |_| |  __/ | | | |_  | |_/ / | |_   \ V /\___  |_./ /___
\_|   |_|\__,_|\___|_| |_|\__| \____/|_|\__|   \_/     |_(_)_____/

             Fluent Bit v4.2 ΓÇô Direct Routes Ahead
         Celebrating 10 Years of Open, Fluent Innovation!

[2026/01/06 16:13:16.399835100] [ info] Configuration:
[2026/01/06 16:13:16.400089500] [ info]  flush time     | 5.000000 seconds
[2026/01/06 16:13:16.400115300] [ info]  grace          | 5 seconds
[2026/01/06 16:13:16.400131300] [ info]  daemon         | 0
[2026/01/06 16:13:16.400146300] [ info] ___________
[2026/01/06 16:13:16.400161600] [ info]  inputs:
[2026/01/06 16:13:16.400176200] [ info] ___________
[2026/01/06 16:13:16.400190800] [ info]  filters:
[2026/01/06 16:13:16.400205600] [ info] ___________
[2026/01/06 16:13:16.400220200] [ info]  outputs:
[2026/01/06 16:13:16.400234900] [ info] ___________
[2026/01/06 16:13:16.400249500] [ info]  collectors:
[2026/01/06 16:13:16.401349700] [ info] [fluent bit] version=4.2.3, commit=9191f70794, pid=40568
[2026/01/06 16:13:16.401364400] [debug] [engine] maxstdio set: 512
[2026/01/06 16:13:16.401373300] [debug] [engine] coroutine stack size: 98302 bytes (96.0K)
[2026/01/06 16:13:16.401569300] [ info] [storage] ver=1.5.4, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2026/01/06 16:13:16.401583700] [ info] [simd    ] SSE2
[2026/01/06 16:13:16.401591300] [ info] [cmetrics] version=1.0.6
[2026/01/06 16:13:16.401599300] [ info] [ctraces ] version=0.6.6
[2026/01/06 16:13:16.403254900] [ info] [http_server] listen iface=0.0.0.0 tcp_port=2021
[2026/01/06 16:13:16.403282800] [ info] [sp] stream processor started
[2026/01/06 16:13:16.403567500] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
[2026/01/06 16:13:18.419403800] [ info] reloading instance pid=40568 tid=0000017311249D20
[2026/01/06 16:13:18.421596000] [ info] [reload] stop everything of the old context
[2026/01/06 16:13:18.421689600] [ warn] [engine] service will shutdown when all remaining tasks are flushed
[2026/01/06 16:13:18.421723700] [ info] [engine] pausing all inputs..
[2026/01/06 16:13:19.411231000] [ info] [engine] service has stopped (0 pending tasks)
[2026/01/06 16:13:20.438255100] [ info] [reload] start everything
[2026/01/06 16:13:20.439534500] [ info] [fluent bit] version=4.2.3, commit=9191f70794, pid=40568
[2026/01/06 16:13:20.439582700] [debug] [engine] maxstdio set: 512
[2026/01/06 16:13:20.439597000] [debug] [engine] coroutine stack size: 98302 bytes (96.0K)
[2026/01/06 16:13:20.439926100] [ info] [storage] ver=1.5.4, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2026/01/06 16:13:20.439940900] [ info] [simd    ] SSE2
[2026/01/06 16:13:20.439949200] [ info] [cmetrics] version=1.0.6
[2026/01/06 16:13:20.439956800] [ info] [ctraces ] version=0.6.6
[2026/01/06 16:13:20.441680500] [ info] [http_server] listen iface=0.0.0.0 tcp_port=2021
[2026/01/06 16:13:20.441702200] [ info] [sp] stream processor started
[2026/01/06 16:13:20.441974600] [ info] [reload] successful reload done.
[2026/01/06 16:13:20.441972500] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
[2026/01/06 16:13:27.496399800] [ info] reloading instance pid=40568 tid=0000017311249D20
[2026/01/06 16:13:27.497697800] [ info] [reload] stop everything of the old context
[2026/01/06 16:13:27.497963300] [ warn] [engine] service will shutdown when all remaining tasks are flushed
[2026/01/06 16:13:27.498040100] [ info] [engine] pausing all inputs..
[2026/01/06 16:13:28.505692300] [ info] [engine] service has stopped (0 pending tasks)
[2026/01/06 16:13:30.523283900] [ info] [reload] start everything
[2026/01/06 16:13:30.524294900] [ info] [fluent bit] version=4.2.3, commit=9191f70794, pid=40568
[2026/01/06 16:13:30.524306600] [debug] [engine] maxstdio set: 512
[2026/01/06 16:13:30.524317200] [debug] [engine] coroutine stack size: 98302 bytes (96.0K)
[2026/01/06 16:13:30.524511700] [ info] [storage] ver=1.5.4, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2026/01/06 16:13:30.524523000] [ info] [simd    ] SSE2
[2026/01/06 16:13:30.524529700] [ info] [cmetrics] version=1.0.6
[2026/01/06 16:13:30.524535800] [ info] [ctraces ] version=0.6.6
[2026/01/06 16:13:30.526179700] [ info] [http_server] listen iface=0.0.0.0 tcp_port=2021
[2026/01/06 16:13:30.526201800] [ info] [sp] stream processor started
[2026/01/06 16:13:30.526478300] [ info] [reload] successful reload done.
[2026/01/06 16:13:30.526476100] [ info] [engine] Shutdown Grace Period=5, Shutdown Input Grace Period=2
[2026/01/06 16:13:32] [engine] caught signal (SIGINT)
[2026/01/06 16:13:33.544790100] [ warn] [engine] service will shutdown in max 5 seconds
[2026/01/06 16:13:33.544806900] [ info] [engine] pausing all inputs..
[2026/01/06 16:13:34.561899600] [ info] [engine] service has stopped (0 pending tasks)

Also, we can now proceed to handle hot-reloading with relative paths by:

C:\Users\cosmo> curl -XPOST -d '{}' 127.0.0.1:2021/api/v2/reload
{"reload":"done","status":1}
C:\Users\cosmo> curl -XPOST -d '{}' 127.0.0.1:2021/api/v2/reload
{"reload":"in progress","status":-2}
C:\Users\cosmo> curl -XPOST -d '{}' 127.0.0.1:2021/api/v2/reload
{"reload":"done","status":1}
C:\Users\cosmo> curl -XGET 127.0.0.1:2021/api/v2/reload
{"hot_reload_count":2}
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Summary by CodeRabbit

  • Bug Fixes
    • Windows path handling: inputs without a directory component are now treated as the current directory ("."), ensuring consistent normalization and more predictable configuration file path resolution for bare filenames and relative paths.

✏️ Tip: You can customize this high-level summary in your review settings.

@cosmo0920 cosmo0920 requested a review from edsiper as a code owner January 6, 2026 07:15
@cosmo0920 cosmo0920 changed the title config_format: Align the behavior of dirname against POSIX config_format: Align the behavior of dirname against POSIX in Windows Jan 6, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 6, 2026

📝 Walkthrough

Walkthrough

Windows-specific dirname behavior in YAML include handling now returns "." when the input path lacks a directory component, changing how include_dir/include_file are derived for YAML includes on Windows.

Changes

Cohort / File(s) Summary
Windows dirname path resolution
src/config_format/flb_cf_yaml.c
Adjusted Windows-specific dirname logic to return "." for inputs that contain only a filename (no directory component), affecting how include_dir/include_file are derived for YAML includes on Windows.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • edsiper
  • fujimotos
  • koleini

Poem

🐰 I hopped through paths both near and far,
Found a dot where filenames are,
On Windows now the includes play,
No more errors in the way,
Happy configs — huzzah! 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: aligning dirname() behavior on Windows with POSIX standards, which directly addresses the issue of broken YAML includes on Windows.
Linked Issues check ✅ Passed The code change directly addresses issue #11295 by fixing dirname() behavior on Windows to enable correct file resolution in YAML includes when using --workdir.
Out of Scope Changes check ✅ Passed The change is narrowly focused on Windows-specific dirname behavior in the YAML config format module, directly related to fixing the include resolution issue without introducing unrelated modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dfabadf and 74b777b.

📒 Files selected for processing (1)
  • src/config_format/flb_cf_yaml.c
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/config_format/flb_cf_yaml.c
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (31)
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 64bit (Arm64), amd64_arm64, -DCMAKE_SYSTEM_NAME=Windows -DCMA...
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 64bit, x64, x64-windows-static, 3.31.6)
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 32bit, x86, x86-windows-static, 3.31.6)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=Off, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=Off, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_UNDEFINED=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_ADDRESS=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_COMPILER_STRICT_POINTER_TYPES=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_MEMORY=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=Off, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_MEMORY=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_UNDEFINED=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_ARROW=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=Off, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_COVERAGE=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_THREAD=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_THREAD=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_ADDRESS=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, clang, clang++)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, gcc, g++, ubuntu-24.04, clang-14)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, clang, clang++, ubuntu-22.04, clang-12)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, gcc, g++, ubuntu-22.04, clang-12)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, clang, clang++, ubuntu-24.04, clang-14)
  • GitHub Check: pr-compile-centos-7
  • GitHub Check: pr-compile-without-cxx (3.31.6)
  • GitHub Check: PR - fuzzing test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/config_format/flb_cf_yaml.c (1)

532-546: Confirm: state->file->path is never explicitly freed, but the mixed ownership pattern is unsafe.

The dirname() function returns either the string literal "." or a pointer to the modified include_dir (heap-allocated with flb_sds_create()). This is assigned to fstate.path (typed as flb_sds_t), which is then passed to state_create() where it is stored as state->file.

Verification confirms that state->file->path is never destroyed with flb_sds_destroy() or flb_free() anywhere in the codebase. States are popped at lines 2968–2976 (cleanup via state_pop() which calls state_destroy(), which only frees the parser state struct itself, not the file_state members), and include_dir is destroyed afterward at line 3000—after all states referencing fstate have been removed from the list.

However, this pattern is fragile: the mixed ownership model (literal string vs. heap-allocated pointer) lacks enforcement. Any future code that attempts to destroy state->file->path would crash when it encounters the "." literal. Consider always allocating a heap string or adding a type/flag to distinguish ownership.

🧹 Nitpick comments (1)
src/config_format/flb_cf_yaml.c (1)

544-544: Consider simplifying the null terminator assignment.

The post-increment in *ptr++='\0' is unnecessary since the incremented value isn't used (line 545 returns path, not ptr). For clarity, consider:

🔎 Suggested simplification
-    *ptr++='\0';
+    *ptr = '\0';

Note: This is existing code, not introduced by this PR.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9191f70 and a4c0b08.

📒 Files selected for processing (1)
  • src/config_format/flb_cf_yaml.c
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (31)
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 64bit (Arm64), amd64_arm64, -DCMAKE_SYSTEM_NAME=Windows -DCMA...
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 64bit, x64, x64-windows-static, 3.31.6)
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 32bit, x86, x86-windows-static, 3.31.6)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_MEMORY=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=Off, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_THREAD=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_ARROW=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_MEMORY=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_COMPILER_STRICT_POINTER_TYPES=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_UNDEFINED=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_THREAD=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_UNDEFINED=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_COVERAGE=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_ADDRESS=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=Off, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_ADDRESS=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=Off, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=Off, 3.31.6, gcc, g++)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, gcc, g++, ubuntu-24.04, clang-14)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, clang, clang++, ubuntu-22.04, clang-12)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, clang, clang++, ubuntu-24.04, clang-14)
  • GitHub Check: pr-compile-without-cxx (3.31.6)
  • GitHub Check: pr-compile-centos-7
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, gcc, g++, ubuntu-22.04, clang-12)
  • GitHub Check: PR - fuzzing test
🔇 Additional comments (1)
src/config_format/flb_cf_yaml.c (1)

540-541: LGTM! Correct POSIX alignment for dirname behavior.

The change correctly implements POSIX dirname semantics: when there's no directory separator in the path, returning "." represents the current directory. This fix enables proper resolution of YAML includes on Windows when using --workdir, as described in issue #11295.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/config_format/flb_cf_yaml.c (1)

532-546: Handle forward slashes in Windows path parsing.

The dirname function at lines 532-546 only checks for backslash (\) as a directory separator. On Windows, both forward slashes and backslashes are valid path separators in many contexts. If a user specifies include paths with forward slashes in the YAML config, the function will return "." instead of extracting the directory, causing include resolution to fail silently. Consider supporting both separators with strrchr(path, '\\') and strrchr(path, '/').

Additionally, the function lacks NULL input validation. While the single caller at line 2884 operates within controlled config parsing context, defensive checks could prevent unexpected crashes if the function is reused elsewhere.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e90b272 and dfabadf.

📒 Files selected for processing (1)
  • src/config_format/flb_cf_yaml.c
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (31)
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 32bit, x86, x86-windows-static, 3.31.6)
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 64bit (Arm64), amd64_arm64, -DCMAKE_SYSTEM_NAME=Windows -DCMA...
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 64bit, x64, x64-windows-static, 3.31.6)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_THREAD=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_THREAD=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=Off, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_COMPILER_STRICT_POINTER_TYPES=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_UNDEFINED=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=Off, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_MEMORY=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_ADDRESS=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_ARROW=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=Off, 3.31.6, gcc, g++)
  • GitHub Check: PR - fuzzing test
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=Off, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_COVERAGE=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_MEMORY=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_ADDRESS=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_UNDEFINED=On, 3.31.6, clang, clang++)
  • GitHub Check: pr-compile-without-cxx (3.31.6)
  • GitHub Check: pr-compile-centos-7
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, clang, clang++, ubuntu-22.04, clang-12)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, gcc, g++, ubuntu-22.04, clang-12)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, clang, clang++, ubuntu-24.04, clang-14)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, gcc, g++, ubuntu-24.04, clang-14)
🔇 Additional comments (1)
src/config_format/flb_cf_yaml.c (1)

540-541: LGTM - POSIX alignment for dirname achieved.

The change correctly returns "." when no directory separator is found in the path, aligning with POSIX dirname behavior. This fixes issue #11295 where YAML includes with bare filenames failed on Windows when using --workdir.

When nothing found of directory separators on the given argument of
dirname(), we need to align this behavior.
After aligning the behavior, we can proceed to load configurations from specified workdir
folders.

Signed-off-by: Hiroshi Hatake <[email protected]>
@cosmo0920 cosmo0920 force-pushed the cosmo0920-fix-include-feature-in-yaml-on-windows branch from dfabadf to 74b777b Compare January 8, 2026 06:04
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.

YAML configuration files "Includes" broken on Windows OS

3 participants