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

fluent-bit: link against Nix dependencies, fix Darwin builds, and add NixOS module #365493

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

commiterate
Copy link
Contributor

@commiterate commiterate commented Dec 16, 2024

Link against Nix dependencies, fix Darwin builds, and add NixOS module (upstreams commiterate/nix-fluent-bit).

fluent-bit vends its dependencies by keeping a copy of their sources under lib/ in their source tree and building them from source. All of the dependencies their CMake setup can source from the system are already Nix packages (e.g. libbacktrace, luajit).

Darwin builds have also been silently broken for awhile now.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions labels Dec 16, 2024
@commiterate commiterate force-pushed the init/fluent-bit-module branch from f956bdc to d699387 Compare December 16, 2024 04:41
ci/OWNERS Outdated
Comment on lines 147 to 148
/nixos/modules/services/monitoring/fluent-bit.nix @samrose @fpletz
/nixos/tests/fluent-bit.nix @samrose @fpletz
Copy link
Contributor Author

@commiterate commiterate Dec 16, 2024

Choose a reason for hiding this comment

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

@samrose @fpletz This is tentative. Will adjust if either of you aren't interested in maintaining this alongside the fluent-bit package.

Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, I'm not using fluent-bit anymore. Please remove me because I can't really maintain it. AFAIK @samrose wasn't really active in the last few years maintaining this package so if he doesn't respond it's probably best to remove him too.

You can add yourself and I'll be happy to review your changes though. 😄

Copy link
Contributor Author

@commiterate commiterate Dec 19, 2024

Choose a reason for hiding this comment

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

Removed you from the ci/OWNERS file and the package maintainers list. I'll keep @samrose in the meanwhile.

Copy link
Contributor Author

@commiterate commiterate Jan 4, 2025

Choose a reason for hiding this comment

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

@tiredofit @elohmeier Either of you interested in being a maintainer for the fluent-bit package and NixOS module? Saw both of you are using it in public repos and are already in maintainers/maintainers-list.nix.

Decided to go with Vector instead of Fluent Bit while fixing up the package and adding the NixOS module so I won't be using this anymore.

@commiterate commiterate force-pushed the init/fluent-bit-module branch from d699387 to 3a9ac5a Compare December 16, 2024 04:42
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Dec 16, 2024
@commiterate commiterate force-pushed the init/fluent-bit-module branch 6 times, most recently from 1a806f0 to a77fc83 Compare December 18, 2024 18:08
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin labels Dec 18, 2024
@commiterate commiterate force-pushed the init/fluent-bit-module branch from a77fc83 to 29466a6 Compare December 18, 2024 18:22
@ofborg ofborg bot requested review from fpletz and samrose December 19, 2024 06:46
@commiterate commiterate force-pushed the init/fluent-bit-module branch from 95cfa06 to 50b271d Compare December 21, 2024 03:32
@commiterate commiterate changed the title fluent-bit: add NixOS module fluent-bit: link against Nix dependencies, fix Darwin builds, and add NixOS module Dec 21, 2024
@commiterate commiterate force-pushed the init/fluent-bit-module branch 2 times, most recently from bf82913 to 236b9b4 Compare December 21, 2024 04:54
@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 1 labels Dec 21, 2024
@fpletz
Copy link
Member

fpletz commented Dec 22, 2024

Please rebase due to the version bump from #366830.

pkgs/by-name/fl/fluent-bit/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/fl/fluent-bit/package.nix Outdated Show resolved Hide resolved
nixos/modules/services/monitoring/fluent-bit.nix Outdated Show resolved Hide resolved
nixos/modules/services/monitoring/fluent-bit.nix Outdated Show resolved Hide resolved
'';
example = "/etc/fluent-bit/fluent-bit.yaml";
};
configuration = lib.mkOption {
Copy link
Member

Choose a reason for hiding this comment

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

Let's follow RFC 42 here

Suggested change
configuration = lib.mkOption {
settings = lib.mkOption {

Copy link
Contributor Author

@commiterate commiterate Jan 1, 2025

Choose a reason for hiding this comment

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

Does the RFC mandate the option be named settings? Outside of the option name, it seems like this is adhering to the RFC.

Generally I've been trying to expose options with names based on the program's command line options (in this case fluent-bit uses --config so I've expanded that to configuration) or their relevant config file field name (e.g. graceLimit based on grace).

description = ''
See {option}`configurationFile`.

{option}`configurationFile` takes precedence over {option}`configuration`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{option}`configurationFile` takes precedence over {option}`configuration`.
{option}`configurationFile` takes precedence over {option}`settings`.

@commiterate commiterate force-pushed the init/fluent-bit-module branch from 43fd7da to 4f31d27 Compare January 1, 2025 20:45
@commiterate commiterate force-pushed the init/fluent-bit-module branch 3 times, most recently from 04feac1 to a178dea Compare January 4, 2025 03:29
@commiterate commiterate force-pushed the init/fluent-bit-module branch from a178dea to 5853cde Compare January 6, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: darwin Running or building packages on Darwin 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants