From e6613bfb63e00cffdbe7feb065f7493af69420f8 Mon Sep 17 00:00:00 2001 From: Jon Higgs Date: Tue, 3 Mar 2026 15:40:51 +1100 Subject: [PATCH 1/4] Travis CI is dead and its bones are now dust --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9fc13c9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -services: - - docker -install: skip -jobs: - include: - - name: test - script: - - make test From 476ccb765305cff44f02d72ceccb0cb7fb2fca28 Mon Sep 17 00:00:00 2001 From: Jon Higgs Date: Wed, 4 Mar 2026 12:38:45 +1100 Subject: [PATCH 2/4] Updates --- .tool-versions | 1 + Gemfile.lock | 115 ++++++++++++++++++------ Makefile | 12 ++- UPDATE.md | 5 ++ fluent-plugin-annotation-filter.gemspec | 10 +-- 5 files changed, 107 insertions(+), 36 deletions(-) create mode 100644 .tool-versions create mode 100644 UPDATE.md diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..5876619 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +ruby 3.4.8 diff --git a/Gemfile.lock b/Gemfile.lock index c1f205d..5262c8c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,67 +1,128 @@ PATH remote: . specs: - fluent-plugin-annotation-filter (1.0.6) - fluentd (~> 1.16.1, >= 1.16.1) + fluent-plugin-annotation-filter (1.1.0) + fluentd (~> 1.19.2, >= 1.19.2) GEM remote: https://rubygems.org/ specs: - concurrent-ruby (1.2.2) - cool.io (1.8.0) - diff-lcs (1.5.0) - fluentd (1.16.2) + async (2.10.2) + console (~> 1.10) + fiber-annotation + io-event (~> 1.5, >= 1.5.1) + timers (~> 4.1) + async-http (0.94.2) + async (>= 2.10.2) + async-pool (~> 0.11) + io-endpoint (~> 0.14) + io-stream (~> 0.6) + metrics (~> 0.12) + protocol-http (~> 0.58) + protocol-http1 (~> 0.36) + protocol-http2 (~> 0.22) + protocol-url (~> 0.2) + traces (~> 0.10) + async-pool (0.11.1) + async (>= 2.0) + base64 (0.3.0) + concurrent-ruby (1.3.6) + console (1.23.7) + fiber-annotation + fiber-local + json + cool.io (1.9.3) + csv (3.3.5) + diff-lcs (1.6.2) + drb (2.2.3) + fiber-annotation (0.2.0) + fiber-local (1.1.0) + fiber-storage + fiber-storage (1.0.1) + fluentd (1.19.2) + async-http (~> 0.86) + base64 (~> 0.2) bundler cool.io (>= 1.4.5, < 2.0.0) + csv (~> 3.2) + drb (~> 2.2) http_parser.rb (>= 0.5.1, < 0.9.0) + logger (~> 1.6) msgpack (>= 1.3.1, < 2.0.0) + net-http (~> 0.8) + ostruct (~> 0.6) serverengine (>= 2.3.2, < 3.0.0) sigdump (~> 0.2.5) - strptime (>= 0.2.4, < 1.0.0) tzinfo (>= 1.0, < 3.0) tzinfo-data (~> 1.0) + uri (~> 1.0) webrick (~> 1.4) yajl-ruby (~> 1.0) - http_parser.rb (0.8.0) - msgpack (1.7.2) - power_assert (2.0.3) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + zstd-ruby (~> 1.5) + http_parser.rb (0.8.1) + io-endpoint (0.17.2) + io-event (1.14.2) + io-stream (0.11.1) + json (2.18.1) + logger (1.7.0) + metrics (0.15.0) + msgpack (1.8.0) + net-http (0.9.1) + uri (>= 0.11.1) + ostruct (0.6.3) + power_assert (3.0.1) + protocol-hpack (1.5.1) + protocol-http (0.59.0) + protocol-http1 (0.37.0) + protocol-http (~> 0.58) + protocol-http2 (0.24.0) + protocol-hpack (~> 1.4) + protocol-http (~> 0.47) + protocol-url (0.4.0) + rspec (3.13.2) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.6) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.8) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-support (3.12.1) - serverengine (2.3.2) + rspec-support (~> 3.13.0) + rspec-support (3.13.7) + serverengine (2.4.0) + base64 (~> 0.1) + logger (~> 1.4) sigdump (~> 0.2.2) sigdump (0.2.5) strptime (0.2.5) - test-unit (3.6.1) + test-unit (3.7.7) power_assert + timers (4.4.0) + traces (0.18.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - tzinfo-data (1.2023.3) + tzinfo-data (1.2026.1) tzinfo (>= 1.0.0) - webrick (1.8.1) + uri (1.1.1) + webrick (1.9.2) yajl-ruby (1.4.3) + zstd-ruby (1.5.7.1) PLATFORMS aarch64-linux arm64-darwin-21 arm64-darwin-22 + arm64-darwin-24 x86_64-linux DEPENDENCIES bundler (~> 2.3) fluent-plugin-annotation-filter! - rspec (~> 3.11) - test-unit (~> 3.5) + rspec (~> 3.13) + test-unit (~> 3.7) BUNDLED WITH 2.3.24 diff --git a/Makefile b/Makefile index a37306a..789012b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ .PHONY: all help clean push test build -export VERSION = 1.0.6 +RUBY_IMAGE := ruby:3.4.8-slim-trixie +export VERSION = 1.1.0 export AWS_DEFAULT_REGION = us-east-1 define AWS_CLI_CMD @@ -19,7 +20,7 @@ build: ## Create the docker image. --workdir=/app \ -v `pwd`:/app \ -e VERSION \ - ruby:3.1 \ + ${RUBY_IMAGE} \ gem build fluent-plugin-annotation-filter.gemspec test: ## Run the app tests. @@ -30,7 +31,7 @@ test: ## Run the app tests. -v `pwd`:/app \ -e VERSION \ -e BUNDLE_PATH=/app/gems \ - ruby:3.1 \ + ${RUBY_IMAGE} \ script/docker-rspec.sh push: build ## Publish the gem @@ -43,9 +44,12 @@ push: build ## Publish the gem -e BUNDLE_PATH=/app/gems \ -e GEM_HOST_API_KEY=$$(${AWS_CLI_CMD} secretsmanager get-secret-value --secret-id rubygems_api_key --output json | jq -r '.SecretString | fromjson | .rubygems_api_key') \ -it \ - ruby:3.1 \ + ${RUBY_IMAGE} \ script/push-gem.sh +fluent-plugin-annotation-filter-$(VERSION).gem: fluent-plugin-annotation-filter.gemspec + gem build $< + bundle install clean: ## Cleanup artifacts generated by build. @echo "--- :shower: Cleaning up :shower:" diff --git a/UPDATE.md b/UPDATE.md new file mode 100644 index 0000000..5870b6a --- /dev/null +++ b/UPDATE.md @@ -0,0 +1,5 @@ +# Upgrading + +- Update `./fluentd-plugin-annotation-filter.gemspec` with dependencies +- Update `VERSION` in Makefile +- Run `make fluent-plugin-annotation-filter-$(VERSION).gem` diff --git a/fluent-plugin-annotation-filter.gemspec b/fluent-plugin-annotation-filter.gemspec index 676fcab..2c8703b 100644 --- a/fluent-plugin-annotation-filter.gemspec +++ b/fluent-plugin-annotation-filter.gemspec @@ -17,11 +17,11 @@ Gem::Specification.new do |gem| gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.require_paths = ["lib"] - gem.required_ruby_version = '>= 3.1.2' + gem.required_ruby_version = '>= 4.0.7' - gem.add_runtime_dependency "fluentd", '~> 1.16.1', '>= 1.16.1' + gem.add_runtime_dependency "fluentd", '~> 1.19.2', '>= 1.19.2' - gem.add_development_dependency "bundler", "~> 2.3" - gem.add_development_dependency "rspec", "~> 3.11" # Like all our other Ruby projects, our tests are in RSpec - gem.add_development_dependency "test-unit", "~> 3.5" # TestUnit is, however, used by fluentd's test driver and must be included + gem.add_development_dependency "bundler", "~> 3.4" + gem.add_development_dependency "rspec", "~> 3.13" + gem.add_development_dependency "test-unit", "~> 3.7" # TestUnit is, used by fluentd's test driver and must be included end From 7d722a0a5c576d5dd7d043c4ff41381873db3b6b Mon Sep 17 00:00:00 2001 From: Jon Higgs Date: Wed, 4 Mar 2026 12:44:26 +1100 Subject: [PATCH 3/4] Make the tests pass --- Gemfile.lock | 26 ++++++++++++------------- Makefile | 2 +- fluent-plugin-annotation-filter.gemspec | 4 ++-- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5262c8c..4f0042e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,11 +7,12 @@ PATH GEM remote: https://rubygems.org/ specs: - async (2.10.2) - console (~> 1.10) + async (2.36.0) + console (~> 1.29) fiber-annotation - io-event (~> 1.5, >= 1.5.1) - timers (~> 4.1) + io-event (~> 1.11) + metrics (~> 0.12) + traces (~> 0.18) async-http (0.94.2) async (>= 2.10.2) async-pool (~> 0.11) @@ -27,9 +28,9 @@ GEM async (>= 2.0) base64 (0.3.0) concurrent-ruby (1.3.6) - console (1.23.7) + console (1.34.3) fiber-annotation - fiber-local + fiber-local (~> 1.1) json cool.io (1.9.3) csv (3.3.5) @@ -53,6 +54,7 @@ GEM ostruct (~> 0.6) serverengine (>= 2.3.2, < 3.0.0) sigdump (~> 0.2.5) + strptime (>= 0.2.4, < 1.0.0) tzinfo (>= 1.0, < 3.0) tzinfo-data (~> 1.0) uri (~> 1.0) @@ -61,7 +63,7 @@ GEM zstd-ruby (~> 1.5) http_parser.rb (0.8.1) io-endpoint (0.17.2) - io-event (1.14.2) + io-event (1.14.3) io-stream (0.11.1) json (2.18.1) logger (1.7.0) @@ -100,7 +102,6 @@ GEM strptime (0.2.5) test-unit (3.7.7) power_assert - timers (4.4.0) traces (0.18.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) @@ -113,16 +114,13 @@ GEM PLATFORMS aarch64-linux - arm64-darwin-21 - arm64-darwin-22 - arm64-darwin-24 - x86_64-linux + ruby DEPENDENCIES - bundler (~> 2.3) + bundler (~> 2.6) fluent-plugin-annotation-filter! rspec (~> 3.13) test-unit (~> 3.7) BUNDLED WITH - 2.3.24 + 2.6.9 diff --git a/Makefile b/Makefile index 789012b..2245dfb 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: all help clean push test build -RUBY_IMAGE := ruby:3.4.8-slim-trixie +RUBY_IMAGE := ruby:3.4.8-trixie export VERSION = 1.1.0 export AWS_DEFAULT_REGION = us-east-1 diff --git a/fluent-plugin-annotation-filter.gemspec b/fluent-plugin-annotation-filter.gemspec index 2c8703b..7cb0a3f 100644 --- a/fluent-plugin-annotation-filter.gemspec +++ b/fluent-plugin-annotation-filter.gemspec @@ -17,11 +17,11 @@ Gem::Specification.new do |gem| gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.require_paths = ["lib"] - gem.required_ruby_version = '>= 4.0.7' + gem.required_ruby_version = '>= 3.1' gem.add_runtime_dependency "fluentd", '~> 1.19.2', '>= 1.19.2' - gem.add_development_dependency "bundler", "~> 3.4" + gem.add_development_dependency "bundler", "~> 2.6" gem.add_development_dependency "rspec", "~> 3.13" gem.add_development_dependency "test-unit", "~> 3.7" # TestUnit is, used by fluentd's test driver and must be included end From d080af7c7af37545a0e5dfefcfe6f91002a48a71 Mon Sep 17 00:00:00 2001 From: Jon Higgs Date: Wed, 4 Mar 2026 12:58:00 +1100 Subject: [PATCH 4/4] Fix for AWS_PROFILE to work --- Makefile | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 2245dfb..f2741b2 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,11 @@ RUBY_IMAGE := ruby:3.4.8-trixie export VERSION = 1.1.0 -export AWS_DEFAULT_REGION = us-east-1 -define AWS_CLI_CMD +define AWS docker container run --rm -i \ - -e AWS_ACCESS_KEY_ID \ - -e AWS_DEFAULT_REGION \ - -e AWS_SECRET_ACCESS_KEY \ - -e AWS_SESSION_TOKEN \ + -e AWS_PROFILE \ + -v "${HOME}/.aws:/root/.aws:ro" \ amazon/aws-cli:latest endef @@ -34,6 +31,7 @@ test: ## Run the app tests. ${RUBY_IMAGE} \ script/docker-rspec.sh +push: GEM_HOST_API_KEY = $(shell $(AWS) secretsmanager get-secret-value --secret-id rubygems_api_key --output json | jq -r '.SecretString | fromjson | .rubygems_api_key') push: build ## Publish the gem @echo "--- :fire: Pushing! :fire:" docker run \ @@ -42,15 +40,11 @@ push: build ## Publish the gem -v `pwd`:/app \ -e VERSION \ -e BUNDLE_PATH=/app/gems \ - -e GEM_HOST_API_KEY=$$(${AWS_CLI_CMD} secretsmanager get-secret-value --secret-id rubygems_api_key --output json | jq -r '.SecretString | fromjson | .rubygems_api_key') \ + -e GEM_HOST_API_KEY=$(GEM_HOST_API_KEY) \ -it \ ${RUBY_IMAGE} \ script/push-gem.sh -fluent-plugin-annotation-filter-$(VERSION).gem: fluent-plugin-annotation-filter.gemspec - gem build $< - bundle install - clean: ## Cleanup artifacts generated by build. @echo "--- :shower: Cleaning up :shower:" -rm *.gem