-
Notifications
You must be signed in to change notification settings - Fork 1.8k
http_client: Add required headers that might be missing depending on build #11008
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
base: master
Are you sure you want to change the base?
Conversation
WalkthroughTwo headers were added to src/flb_http_client.c: Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
4f9ea07
to
63e526c
Compare
Do you have a Dockerfile we can use to test it with? |
Please follow the contribution guide and PR template - your commits and PR title need updating to follow the standard. |
…build Adds missing headers when building without AWS features Signed-off-by: DoumanAsh <[email protected]>
63e526c
to
b458c76
Compare
No, I was testing it on my alpine server
Will update, sorry about that |
I created docker image with the same environment as my server (Alpine 3.22) I'm using this patch https://github.com/DoumanAsh/configs/blob/master/fluent-bit/patch.txt to fix build But if you use current
If you use my patch it successfully builds Note that it includes direct link to Build command:
|
Please note that I didn't create this PR to enable support of Alpine, only to let you know that missing includes can be adjusted to enable build without above mentioned features enabled |
Debian based build:
Docker file: FROM debian:stable-slim as builder
RUN set -eux && apt-get update && apt-get install -y --no-install-recommends libssl-dev flex bison libyaml-dev ninja-build git cmake ca-certificates gcc g++ make && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN git clone --depth 1 --branch v4.1.1 https://github.com/fluent/fluent-bit.git
RUN cd fluent-bit/build && cmake .. -D FLB_OUT_KAFKA_REST=off -D FLB_OUT_KAFKA=off -D FLB_EXAMPLES=off -D FLB_SHARED_LIB=off -D FLB_SIGNV4=off -DFLB_SIGNV4=Off -DFLB_AWS=Off -DFLB_FILTER_AWS=Off -DFLB_OUT_S3=Off -DFLB_OUT_KINESIS_FIREHOSE=Off -DFLB_OUT_KINESIS_STREAMS=Off -DFLB_OUT_CLOUDWATCH_LOGS=Off -DFLB_OUT_BIGQUERY=Off -DFLB_KAFKA=off -DCMAKE_BUILD_TYPE=Release -DFLB_DEBUG=off -DFLB_RELEASE=on -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DFLB_WITHOUT_flb-it-pack=Yes -DFLB_WITHOUT_flb-it-utils=Yes -DFLB_WITHOUT_flb-it-aws_util=Yes -DFLB_WITHOUT_flb-it-aws_credentials_process=Yes -DFLB_TLS=Yes -DFLB_HTTP_SERVER=Yes -G Ninja -DFLB_CORO_STACK_SIZE=24576 -DFLB_LUAJIT=off -DFLB_OUT_DATADOG=off -DFLB_OUT_AZURE=off -DFLB_OUT_AZURE_KUSTO=off -DFLB_OUT_PGSQL=off -DFLB_OUT_SLACK=off -DFLB_OUT_STACKDRIVER=off -DFLB_OUT_SPLUNK=off -DFLB_OUT_TD=off && cmake --build . Using this PR, build will be successful too |
Yeah I think musl is the problem on Alpine: https://docs.fluentbit.io/manual/installation/downloads/docker#why-there-is-no-fluent-bit-docker-image-based-on-alpine-linux Thanks for the updates. |
Ah, but I'm successfully running my build of fluent-bit to collect logs and metrics, so far there have been no issues to it (I do not really use docker, but rather just run Alpine on my server) Nevertheless, as I mentioned, the same issue (missing headers) is observed with debian based image so feel free to merge this PR if you'd like it fixed (I imagine it is not really issue for most) |
For my local build I used following configuration to build:
It seems these headers are added transiently via other headers
I didn't look deeper into it but I found someone reporting similar problems
#9664
I was building version 4.1.0 on Alpine Linux (due to fluent-bit package still being in edge)
Summary by CodeRabbit