Skip to content

Commit

Permalink
build: fix patching cherry picking issues
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Fala <[email protected]>
  • Loading branch information
matthewfala committed Sep 29, 2023
1 parent 3088d43 commit 8911319
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
14 changes: 2 additions & 12 deletions AWS_FLB_CHERRY_PICKS
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ https://github.com/PettitWesley/fluent-bit.git mk_event_add_corruption-one-commi
# Useful debug messages for input events
# input chunk append message with input name context and number of records
https://github.com/PettitWesley/fluent-bit.git chunk-append-context b671ed38e7ae87ab955083e2324ef1972298c5d7

# in_tail file name context for inotify events
https://github.com/PettitWesley/fluent-bit.git tail-modify-debug-context-immutable-cherry-pick ab11d1d7438f5254d04eba8dfc2f10b78cc2244d
https://github.com/PettitWesley/fluent-bit.git tail-modify-debug-context-immutable-cherry-pick 1f3bdeec49ac42b04b921303610ea0f53110ab2c
Expand Down Expand Up @@ -83,15 +84,6 @@ https://github.com/fluent/fluent-bit.git 1.9 81cdf7eced4e420043277237fba092157b1
# upstream engine retry clean up fix https://github.com/fluent/fluent-bit/pull/6862
https://github.com/fluent/fluent-bit.git 1.9 712e5fbe10bee44269d5dfed214c4e087ea1ec2a

# TCP input: user friendly message for skipping logs https://github.com/fluent/fluent-bit/pull/6061
https://github.com/fluent/fluent-bit.git 1.9 c5d57ccf4f85af77e2a2bbb1121df95887e2962f

# ElasticSearch: fix buffer bulk over run https://github.com/fluent/fluent-bit/pull/5770
https://github.com/fluent/fluent-bit.git 1.9 d3a0697c3c4a876250cc6c2c4ff44cd77908ea3c

# windows: fix time zone offset https://github.com/fluent/fluent-bit/pull/6368
https://github.com/fluent/fluent-bit.git 1.9 cae9a8f9cb6eab7449f14d914f9ba1d8d4e93cf0

# quick fix for S3 key $INDEX bug https://github.com/aws/aws-for-fluent-bit/issues/653
https://github.com/PettitWesley/fluent-bit.git index_s3_key_format_quick_fix 5e48218670681aef152aeedcf90a4593ac623470

Expand Down Expand Up @@ -127,7 +119,7 @@ https://github.com/PettitWesley/fluent-bit.git filter-modify-fix-aws-distro 1a72
# AWS core code self-review issue fixes
# upstream version of this: https://github.com/fluent/fluent-bit/pull/7512/files
# use calloc in all credential code to prevent freeing of garbage pointers
https://github.com/PettitWesley/fluent-bit.git aws-distro-crypto-self-review eb48b79b34f91d36d28434390b976e882d553681
https://github.com/PettitWesley/fluent-bit.git aws-distro-crypto-self-review eb48b79b34f91d36d28434390b976e882d553681
# fix brittle XML parsing
https://github.com/PettitWesley/fluent-bit.git aws-distro-crypto-self-review e6401ad3811b42dee0b7f92aba726cca4bee74ec
# add pthread_mutex + trylock to protect cred providers
Expand All @@ -144,5 +136,3 @@ https://github.com/matthewfala/fluent-bit.git immutable-2.32.0-prometheus-sigv4
# multiline: remove incorrect flush
https://github.com/matthewfala/fluent-bit.git immutable-multiline-incorrect-flush 6431a4e584d52170dbe873d93ba532659921740a
https://github.com/matthewfala/fluent-bit.git immutable-multiline-incorrect-flush 35f23875ca356ea30e9aac19854b810cf8ecad8f

# End of cherrypicks (end with a blank line)
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ all: release
export DOCKER_BUILD_FLAGS=--no-cache

.PHONY: release
release: build build-init
release: build build-init linux-plugins
docker system prune -f
docker build $(DOCKER_BUILD_FLAGS) -t amazon/aws-for-fluent-bit:main-release -f ./scripts/dockerfiles/Dockerfile.main-release .
docker tag amazon/aws-for-fluent-bit:main-release amazon/aws-for-fluent-bit:latest
Expand All @@ -28,7 +28,7 @@ release: build build-init
debug: main-debug init-debug

.PHONY: build
build: linux-plugins
build:
docker system prune -f
docker build $(DOCKER_BUILD_FLAGS) -t amazon/aws-for-fluent-bit:build -f ./scripts/dockerfiles/Dockerfile.build .

Expand Down Expand Up @@ -118,7 +118,7 @@ init-debug-s3: main-debug-base build-init
docker build $(DOCKER_BUILD_FLAGS) -t amazon/aws-for-fluent-bit:init-debug-s3 -f ./scripts/dockerfiles/Dockerfile.init-debug-s3 .

.PHONY: main-debug-base
main-debug-base: build
main-debug-base: build linux-plugins
docker build $(DOCKER_BUILD_FLAGS) -t amazon/aws-for-fluent-bit:main-debug-base -f ./scripts/dockerfiles/Dockerfile.main-debug-base .

.PHONY: validate-version-file-format
Expand Down
9 changes: 5 additions & 4 deletions scripts/dockerfiles/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ COPY AWS_FLB_CHERRY_PICKS \
RUN git config --global user.email "[email protected]" \
&& git config --global user.name "FireLens Team"

RUN AWS_FLB_CHERRY_PICKS_COUNT=`cat /AWS_FLB_CHERRY_PICKS | sed '/^#/d' | sed '/^\s*$/d' | wc -l | awk '{ print $1 }'`; \
RUN AWS_FLB_CHERRY_PICKS_COUNT=`awk '{print $0 }' /AWS_FLB_CHERRY_PICKS | sed '/^#/d' | sed '/^\s*$/d' | wc -l | awk '{ print $1 }'`; echo $AWS_FLB_CHERRY_PICKS_COUNT; \
if [ $AWS_FLB_CHERRY_PICKS_COUNT -gt 0 ]; \
then \
cat /AWS_FLB_CHERRY_PICKS | sed '/^#/d' \
| xargs -l bash -c 'git fetch $0 $1 && git cherry-pick $2'; \
| xargs -l bash -c 'git fetch $0 $1 && git cherry-pick $2 || exit 255' && \
\
echo "Cherry Pick Patch Summary:"; \
(echo "Cherry Pick Patch Summary:"; \
echo -n "Base "; \
git log --oneline \
-$((AWS_FLB_CHERRY_PICKS_COUNT+1)) \
| tac | awk '{ print "Commit",NR-1,"--",$0 }'; sleep 2; \
| tac | awk '{ print "Commit",NR-1,"--",$0 }'; sleep 2;)\
fi

0 comments on commit 8911319

Please sign in to comment.