Skip to content

Conversation

@jimin9038
Copy link

@jimin9038 jimin9038 commented Dec 10, 2025

This PR is a short addition noting that environment variables cannot be used in the include section.
Some users may attempt to use environment variables in the include section and eventually run into issues - often ending up at workaround discussions such as this one: fluent/fluent-bit#2020

It would be great to add a note clarifying that the include section does not parse environment variables, and, if possible, include a link to the above issue as a reference for the workaround.

Thank you!

Summary by CodeRabbit

  • Documentation
    • Clarified that environment variables are not supported in include directives.
    • Noted that included file paths must be specified as literal strings.
    • Updated guidance to prevent confusion when referencing external configuration files, ensuring users supply explicit file paths rather than relying on variable expansion.

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

@jimin9038 jimin9038 requested review from a team as code owners December 10, 2025 23:30
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 10, 2025

Walkthrough

Added documentation clarifications stating that include directives in Fluent Bit do not support environment variables and that included file paths must be specified as literal strings.

Changes

Cohort / File(s) Summary
Documentation — YAML includes
administration/configuring-fluent-bit/yaml/includes-section.md
Added note: environment variables are not supported in the includes section; file paths must be literal strings.
Documentation — Classic mode include file
administration/configuring-fluent-bit/classic-mode/configuration-file.md
Added note to Include File section: environment variables are not supported in includes and included file paths must be literal strings.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Documentation-only changes; review wording and placement of the new note in both files.

Poem

🐰 I hop through docs with nibbling light,
I dot the rule in plain daylight,
No env vars here — just strings so true,
Paths penned plainly for me and you,
A tidy include, and off I bite.

Pre-merge checks and finishing touches

✅ Passed checks (3 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: adding a note clarifying that environment variables cannot be used in the include section of Fluent Bit documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9d03311 and c9bd723.

📒 Files selected for processing (2)
  • administration/configuring-fluent-bit/classic-mode/configuration-file.md (1 hunks)
  • administration/configuring-fluent-bit/yaml/includes-section.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • administration/configuring-fluent-bit/yaml/includes-section.md
🔇 Additional comments (1)
administration/configuring-fluent-bit/classic-mode/configuration-file.md (1)

162-163: Clear and appropriately placed clarification.

The note documenting that environment variables aren't supported in includes is well-positioned at the end of the "Config include file" section, immediately after explaining the include mechanics. The text is direct and unambiguous.

Optional enhancement: Consider adding a reference to the related issue (fluent/fluent-bit#2020) mentioned in the PR if linking workarounds is valuable for users encountering this limitation. This would help users find alternative approaches if they need dynamic include paths.

Please confirm that corresponding clarification notes have been added to the YAML configuration documentation as mentioned in the PR discussion, ensuring consistency across both configuration formats.


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
Contributor

@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

🧹 Nitpick comments (1)
administration/configuring-fluent-bit/yaml/includes-section.md (1)

29-30: Consider adding a reference link to guide users toward workarounds.

The clarification accurately states that environment variables aren't supported in the includes section. However, per the PR objectives, a link to the referenced issue (fluent/fluent-bit#2020) should be included to help users discover workaround discussions.

Apply this diff to add context for users seeking alternatives:

-Environment variables are not supported in includes section. The file path must be specified as a literal string.
+Environment variables are not supported in includes section. The file path must be specified as a literal string. For workaround discussions, see [this issue](https://github.com/fluent/fluent-bit/issues/2020).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ef0fa03 and e219304.

📒 Files selected for processing (1)
  • administration/configuring-fluent-bit/yaml/includes-section.md (1 hunks)

@jimin9038 jimin9038 force-pushed the master branch 2 times, most recently from 88b73b5 to 8a75226 Compare December 10, 2025 23:34
Signed-off-by: Jimin Ha <jimin9038@g.skku.edu>
@cosmo0920
Copy link
Contributor

cosmo0920 commented Dec 12, 2025

@eschabell Hi, this is not updating to reflect code changes. This describes the current limitation of Fluent Bit's configuration syntax of YAML.
So, we can :shipit:!

@patrick-stephens
Copy link
Contributor

Is this a limitation of just the YAML format? I thought I'd used env vars for includes in classic before. We should call out the delta if so and/or update the classic docs as well.

@jimin9038
Copy link
Author

@patrick-stephens Sorry for late reply.
Yes, I'm pretty sure that it doesn't work on the classic config now. I specified them on the classic docs as well.

Signed-off-by: Jimin Ha <jimin9038@g.skku.edu>
Copy link
Contributor

@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

🧹 Nitpick comments (1)
administration/configuring-fluent-bit/classic-mode/configuration-file.md (1)

162-163: Adds appropriate clarification on environment variable limitation.

This note correctly documents an existing limitation in Fluent Bit's include functionality, addressing the documentation gap mentioned in the PR. The placement at the end of the "Config include file" section is logical and the statement is clear.

Consider these minor optional improvements:

  • Grammar: Change "in includes section" to "in the includes section" for consistency with the documentation style elsewhere in the file.
  • Cross-reference (optional): If the related YAML docs change includes a reference to the GitHub issue (#2020) mentioned in the PR objectives as a workaround discussion, consider adding a similar reference here for consistency and to help users seeking workarounds.
-Environment variables aren't supported in includes section. The file path must be specified as a literal string.
+Environment variables are not supported in the includes section. The file path must be specified as a literal string.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 88b73b5 and 9d03311.

📒 Files selected for processing (2)
  • administration/configuring-fluent-bit/classic-mode/configuration-file.md (1 hunks)
  • administration/configuring-fluent-bit/yaml/includes-section.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • administration/configuring-fluent-bit/yaml/includes-section.md

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.

5 participants