Skip to content

tests: cumulative_to_delta: Enable cumulative test case on Windows#11597

Closed
cosmo0920 wants to merge 1 commit intomasterfrom
cosmo0920-enable-cumulative-test-case-on-windows
Closed

tests: cumulative_to_delta: Enable cumulative test case on Windows#11597
cosmo0920 wants to merge 1 commit intomasterfrom
cosmo0920-enable-cumulative-test-case-on-windows

Conversation

@cosmo0920
Copy link
Copy Markdown
Contributor

@cosmo0920 cosmo0920 commented Mar 21, 2026

Another attempt of #11588.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • 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

  • Chores
    • Updated internal test dependencies to improve compatibility.

Note: This release contains no user-facing changes. The updates are internal testing infrastructure improvements.

Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
@cosmo0920 cosmo0920 added this to the Fluent Bit v5.0 milestone Mar 21, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e859f4fe-dd09-4071-8e3a-799074681865

📥 Commits

Reviewing files that changed from the base of the PR and between 6ab5965 and c36f9b2.

📒 Files selected for processing (1)
  • tests/internal/cumulative_to_delta.c

📝 Walkthrough

Walkthrough

A test file's header dependencies are updated: the inclusion of <unistd.h> is removed and replaced with <fluent-bit/flb_compat.h>. No modifications to test logic, control flow, or other code elements are introduced.

Changes

Cohort / File(s) Summary
Header Dependency Update
tests/internal/cumulative_to_delta.c
Removed <unistd.h> inclusion and added <fluent-bit/flb_compat.h> include dependency.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

docs-required

Suggested reviewers

  • edsiper
  • fujimotos
  • koleini

Poem

🐰 A tiny hop through headers we did make,
Swapped one include for flb_compat's sake,
No logic changed, just dependencies aligned,
Clean and simple—exactly what we find! 🌟

🚥 Pre-merge checks | ✅ 3
✅ 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 clearly and specifically describes the main change: enabling the cumulative_to_delta test case on Windows by updating header dependencies for cross-platform compatibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cosmo0920-enable-cumulative-test-case-on-windows

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.

@cosmo0920
Copy link
Copy Markdown
Contributor Author

https://github.com/fluent/cmetrics/pull/258/changes and #11589 would be better to handle this issue.

@cosmo0920 cosmo0920 closed this Mar 21, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c36f9b2cd7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

#include <cmetrics/cmt_map.h>
#include <cmetrics/cmt_metric.h>
#include <cfl/cfl_kvlist.h>
#include <fluent-bit/flb_compat.h>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Include flb_compat before cmetrics on Windows

On Windows this include is too late. tests/internal/cumulative_to_delta.c pulls in cmetrics/cmetrics.h first, and lib/cmetrics/include/cmetrics/cmetrics.h:45 -> cmt_compat.h:24-25 already includes <windows.h>. flb_compat.h then defines WIN32_LEAN_AND_MEAN and includes <winsock2.h>, which has to happen before <windows.h> to avoid the winsock.h/winsock2.h redefinition conflict. I checked tests/internal/CMakeLists.txt:117-123 and .github/workflows/call-windows-unit-tests.yaml:206-253; flb-it-cumulative_to_delta is built in the MSVC Windows unit-test job, so this patch still leaves the Windows build broken instead of enabling the test.

Useful? React with 👍 / 👎.

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.

1 participant