Skip to content

plugins: fix compilation if FLB_SQLDB (sqlite3) is disabled#10239

Open
ThomasDevoogdt wants to merge 7 commits into
fluent:masterfrom
ThomasDevoogdt:bugfix/sqlite3-disabled
Open

plugins: fix compilation if FLB_SQLDB (sqlite3) is disabled#10239
ThomasDevoogdt wants to merge 7 commits into
fluent:masterfrom
ThomasDevoogdt:bugfix/sqlite3-disabled

Conversation

@ThomasDevoogdt

@ThomasDevoogdt ThomasDevoogdt commented Apr 22, 2025

Copy link
Copy Markdown
Contributor

Fixes:

Summary by CodeRabbit

  • New Features

    • SQLDB support is now optional; enabling it restores partial-match checklist behavior and improved blob upload tracking.
    • Added a new post-upload action: "Add Suffix".
  • Bug Fixes

    • Non-database builds now fail fast for DB-only modes/events to avoid unexpected behavior.
    • Improved initialization and cleanup to prevent leftover state on failures.
  • Tests

    • CI and unit tests now run with DB-enabled and DB-disabled variants; DB-only tests are conditional.

@patrick-stephens

Copy link
Copy Markdown
Contributor

Let's make sure this compiles for all existing targets as well.

Would it be better to disable the features within the plugins that need the DB rather than the whole plugin @leonardo-albertovich ? It feels a bit like a large hammer, e.g. no tail input even if you don't use db. We would have to make the config options and any other usage conditional though so it may be worse.

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

Let's make sure this compiles for all existing targets as well.

How can it not? Currently, FLB_SQLDB is enabled by default, and will stay like that. The problem is the other way around, if not enabled, then compilation breaks.

Would it be better to disable the features within the plugins that need the DB rather than the whole plugin @leonardo-albertovich ? It feels a bit like a large hammer, e.g. no tail input even if you don't use db. We would have to make the config options and any other usage conditional though so it may be worse.

For me fine, but I would do that on a per feature basis. Perhaps just continue with this PR, and then fine-tune some features that might compile with some small fixups.

In general, it would be much better if all options are toggled in the automated tests, on one reference compilation system. Perhaps even by incremental builds. But either way, I just want to fix compilation now.

@ThomasDevoogdt

ThomasDevoogdt commented May 2, 2025

Copy link
Copy Markdown
Contributor Author

@patrick-stephens @edsiper I changed this PR so that plugins are still compiled, but without database support. I hope this answers #10239 (comment).

Tested by doing this:

cd build/
cmake -GNinja -DFLB_SQLDB=OFF ../
ninja

and

cd build/
cmake -GNinja -DFLB_PREFER_SYSTEM_LIBS=ON -DFLB_SQLDB=OFF ../
ninja

@patrick-stephens

Copy link
Copy Markdown
Contributor

Not sure if the CI failure is relevant or something else

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

Not sure if the CI failure is relevant or something else

I just added #ifdef FLB_HAVE_SQLDB, which is true by default, so I don't think it's relevant.

@patrick-stephens

Copy link
Copy Markdown
Contributor

@leonardo-albertovich just checking your comments were covered?

@leonardo-albertovich

Copy link
Copy Markdown
Contributor

I'll review this PR again tomorrow. @ThomasDevoogdt if you have any questions that were unanswered (I think I missed some) please repeat them so I can address them tomorrow.

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

I'll review this PR again tomorrow. @ThomasDevoogdt if you have any questions that were unanswered (I think I missed some) please repeat them so I can address them tomorrow.

I don't have any open questions. If you see any shortcomings in this PR, then I will try to address them. But beware that I won't do any in depth refactorings, for that, someone closser to the matter should step in.

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

I'll review this PR again tomorrow. @ThomasDevoogdt if you have any questions that were unanswered (I think I missed some) please repeat them so I can address them tomorrow.

@leonardo-albertovich I think this PR is finalized, it would be nice having it merged. By this, the runtime tests would also start to work, limiting the chance that I have to rework this anytime soon.

@leonardo-albertovich

Copy link
Copy Markdown
Contributor

I don't have merge privileges anymore so you should ask @edsiper about it and wait for him to have time to dedicate to this.

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@edsiper @patrick-stephens ping ...

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@edsiper @patrick-stephens ping ...

Hi, this week is perhaps the ideal moment to merge it? @edsiper

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@patrick-stephens Thx for the approval, can you also merge this?

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@patrick-stephens @edsiper Happy New Year! 🎉

It's perhaps the ideal moment to merge this pull request now.

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@patrick-stephens @edsiper Again a week later. Can this be merged please?

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@patrick-stephens @edsiper ping

@ThomasDevoogdt

ThomasDevoogdt commented Jan 27, 2026

Copy link
Copy Markdown
Contributor Author

@patrick-stephens

Copy link
Copy Markdown
Contributor

@leonardo-albertovich I think you are happy the changes are done?

@leonardo-albertovich

Copy link
Copy Markdown
Contributor

IIRC it looked fine but I deferred to Eduardo on this one.

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@edsiper @leonardo-albertovich @patrick-stephens @cosmo0920 And any other maintainer, I can understand that this doesn't have a high priority, but how much patience do you expect me to have? It takes months and months until I get a proper review, and in the end an approve, to then get buried in the Fluent Bit Next graveyard. I'm fine with applying fixes to maintain fluent-bit in Buildroot, I also saw many of my commits and proposal being reused by other package maintainers, so I guess that they are somewhat worth it. So I would appreciate it that also this one gets merged over time.

E.g. Upstream usage of the FLB_PREFER_SYSTEM_LIB(S) usage:

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@celalettin1286 @cosmo0920 @edsiper @niedbalski @patrick-stephens Can anyone review this pull request, and finally also merge this?

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@celalettin1286 @cosmo0920 @edsiper @niedbalski @patrick-stephens ping again ...

How many times do I still have to rebase this until someone merges this PR? This PR is a year old! I'm starting to loose my patience here.

…AVE_SQLDB

Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
Signed-off-by: Thomas Devoogdt <thomas@devoogdt.com>
@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@leonardo-albertovich ping

1 similar comment
@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@leonardo-albertovich ping

@patrick-stephens

Copy link
Copy Markdown
Contributor

This is fine by me so will ping @cosmo0920 , I don't think @leonardo-albertovich has time for this at the moment

@ThomasDevoogdt

Copy link
Copy Markdown
Contributor Author

@patrick-stephens oké

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

Labels

ok-package-test Run PR packaging tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants