Skip to content

slim: remove every connector and dependency live-ingestion does not use - #6

Open
almostintuitive wants to merge 3 commits into
perf/json-parquet-encode-allocsfrom
slim/live-ingestion-only
Open

almostintuitive wants to merge 3 commits into
perf/json-parquet-encode-allocsfrom
slim/live-ingestion-only

Conversation

@almostintuitive

@almostintuitive almostintuitive commented Sep 29, 2026 •

Copy link
Copy Markdown

Summary

Stacked on #5. This fork exists to run live-ingestion's archivers, so this PR removes every connector and dependency that live-ingestion doesn't use, together with their tests and docs.

What live-ingestion uses. This was taken from all 133 Bento configs rendered in its deploy/gitops (raw and metrics archivers, on staging, production and local):

input kafka_franz
outputs aws_s3, broker, switch, reject_errored
processors protobuf_parquet_encode, json_parquet_encode
metrics prometheus
Bloblang meta(), timestamp_unix_nano(), uuid_v4(), split(), index(), has_suffix()

What's left:

  • the packages holding those components, trimmed to what's used (aws, kafka, protobuf, parquet);
  • prometheus;
  • Bento's dependency-free core: pure (which holds broker, switch and reject_errored) and io (stdin, stdout, file, and the env/file/hostname functions).

parquet_encode and parquet_decode stay only because json_parquet_encode's parity tests run parquet_encode as the reference, and parquet_encode's round-trip tests read back through parquet_decode.

Result: the image goes from 265 MB to 69 MB, go.mod from 456 lines to 132, and 989 files change (about 252k lines deleted). Among the dependencies dropped: sarama, gokrb5/SPNEGO, the Buf registry client, the AWS SDK services other than S3/STS, the GCP and Azure SDKs, and the database drivers.

Commits

  1. Remove the unused connector packages. 51 internal/impl packages go, with their public/components wrappers and the Lambda build.
  2. Keep only what's used in the packages left:
    • aws: only the aws_s3 output (plus its session config).
    • kafka: only the kafka_franz input. Its SASL keeps PLAIN, OAUTHBEARER and SCRAM; AWS_MSK_IAM and GSSAPI go.
    • protobuf: only protobuf_parquet_encode.
    • io: HTTP, sockets, websockets, subprocesses and the like go.
    • pure: components that bring their own library go (lru/ttlru caches; grok, jmespath, jq, json_schema, parse_log, template, unarchive, workflow processors; xml scanner; logger metrics).
    • Internal packages only the removed components used go too.
  3. Docs, examples and test configs.
    • Pages for removed components are deleted, and the guides use kept components in their snippets.
    • Pages that only documented removed features go.
    • Cookbooks and example configs built on removed connectors go; the landing page snippets are rewritten.
    • config/test, resources/ and schemastore are updated to match.
    • The README says up front what this fork carries.

Tests

Tests of removed components are removed. Core tests that used removed components only as fixtures now use kept ones:

test fixture before fixture now
drop_on, fallback, reject_errored http_client output reject and file outputs
sequence csv input file input with the csv scanner
try jmespath mapping
stream API resource test file caches memory caches
stream builder walk dynamic input broker input

Where no kept component could stand in, the test registers a small one of its own through the public API: a processor that runs a test function (for parallel), one that splits a JSON array (for cached), and an output that never connects (for the stream API's readiness check). The config linter's deprecation-warning tests register a deprecated test input and output, since no remaining component is deprecated.

Two groups of tests went because they can't run without removed components:

  • the kafka_franz integration test that produced through the kafka_franz output (Docker-only, never run in CI);
  • the drop_on back-pressure tests, which were already skipped and relied on websocket.

Test plan

  • go build ./..., go vet ./...
  • go test ./...: all pass. TestRetryParallel (timing-based, untouched) failed once under full-suite load, then passed 20 of 20 runs here and 20 of 20 on the base branch.
  • golangci-lint v2.13.2 on ./...: 0 issues
  • make docs' lints (bento lint of config/examples, cookbooks and website/docs), bento template lint, and bento test ./config/test/... (27 tests): all pass
  • Doc-link scan across website/, internal/, public/ and cmd/: nothing links to a removed page, apart from three links upstream already had broken
  • Component examples lint (TestComponentExamples)
  • Image build, dispatched by hand because this branch doesn't match the perf/** trigger: ghcr.io/aperiodic-io/bento:3af13c4a9f is 68.8 MB, against 265.2 MB for parquet: json_parquet_encode allocates a third as often, reuses writers, caches by metadata #5's b7cc98399f. bento list in the image shows only the kept components.
  • live-ingestion's configs on this build: bento lint is clean for all 133 rendered configs on its main, and for the 133 in the pending integration branch, 64 of which use cache_by (with R2_ENDPOINT set, as production sets it).
  • live-ingestion's parity and live harness on this image: to follow with the live-ingestion integration

🤖 Generated with Claude Code

almostintuitive and others added 3 commits September 29, 2026 21:38
live-ingestion (aperiodic-io/live-ingestion) runs this fork as its raw and
metrics archivers, and nothing else: its 133 rendered configs use the
kafka_franz input; the aws_s3, broker, switch and reject_errored outputs; the
protobuf_parquet_encode and json_parquet_encode processors; the prometheus
metrics exporter; and Bloblang's meta(), timestamp_unix_nano(), uuid_v4(),
split(), index() and has_suffix().

The 51 internal/impl packages none of those live in go, with their
public/components packages, and so does the Lambda build (cmd/serverless, its
Makefile target and goreleaser builds). What is left: aws, io, kafka, parquet,
prometheus, protobuf and pure. go.mod falls from 456 lines to 187.

Tests of what went, went with it. Tests of what stays that used what went:
- the config linter's deprecation warnings were checked against amqp_1's url
  field and the sql output; no component left is deprecated, so the tests
  register a test input with a deprecated field and a deprecated test output;
- the AWS MSK IAM SASL test goes with kafka/aws, which provided the mechanism;
- a public/service Bloblang benchmark made its rows with lang's fake(), now
  uuid_v4().
Component examples that named removed components (sql_select, redis,
memcached, nats_jetstream, amqp_1, gcp_pubsub, gcp_bigquery, redis_streams,
the avro scanner) name kept ones instead, as the docs tests require.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The packages that hold what live-ingestion uses held much else besides:
- aws: only the aws_s3 output (and the session config it reads) is left;
  the S3 input, cache and processor, SQS, SNS, Kinesis, Firehose, DynamoDB,
  Lambda, Bedrock and CloudWatch go.
- kafka: only the kafka_franz input is left; the sarama kafka input and
  output and the kafka_franz output go. Its SASL keeps PLAIN, OAUTHBEARER and
  SCRAM, which franz-go carries; AWS_MSK_IAM, whose implementation went with
  kafka/aws, and GSSAPI (Kerberos) go.
- protobuf: only protobuf_parquet_encode is left; the protobuf processor and
  its Buf Schema Registry watcher go.
- parquet: the parquet input and parse_parquet go. parquet_encode and
  parquet_decode stay: json_parquet_encode's parity tests run parquet_encode,
  and parquet_encode's tests read it back with parquet_decode.
- io: stdin, stdout, the file input and output and the env/file/hostname
  functions are left, as the defaults and building blocks the core and its
  tests use; HTTP, sockets, websockets, subprocesses, fsnotify, CSV, dynamic
  and the file cache and processor go.
- pure: the components that bring a library of their own go (the lru and
  ttlru caches, grok, jmespath, jq, json_schema, parse_log, template,
  unarchive and workflow processors, the xml scanner, the logger metrics
  exporter, pure/extended's zstd). What is left is dependency-free and holds
  broker, switch and reject_errored, which live-ingestion uses, and the
  building blocks the core's own tests are written with.
- internal/httpclient, internal/tracing/v2, internal/docs/interop and
  internal/component/input/config, used only by what went, go.
go.mod is down to 132 lines from 456; sarama, gokrb5 and SPNEGO, the Buf
registry client, gojq, jmespath, sprig, mxj and the websocket library are
gone.

Tests of what went, went with it. The core's own tests that used what went
as a fixture use kept components instead: reject and file outputs for the
http_client ones (drop_on, fallback, reject_errored), a file input with the
csv scanner for the csv input (sequence), mapping for jmespath (try), memory
caches for file caches (the stream API's resources), broker for dynamic
(stream builder walk), and sleep for jmespath as an empty processor. Where no
kept component could stand in, the test registers its own: a processor that
runs a test function (parallel), one that splits a JSON array (cached), and
an output that never connects (the stream API's readiness). The kafka_franz
integration test that produced through the kafka_franz output goes, and so
do the drop_on back-pressure tests, skipped and written against websocket.
Component examples naming removed components name kept ones, or go where
they only showed a removed one (HTTP enrichment, Lambda).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The 192 generated component pages of components that went are deleted;
  bento_docs_gen regenerates the rest, and the Bloblang function and method
  references.
- Guides, configuration pages and component overviews whose config snippets
  named removed components name kept ones (kafka_franz for kafka, aws_s3,
  file or stdout for outputs, cache for http processors, memory for
  memcached and redis caches, none for jaeger). Pages and sections that only
  documented something removed go: the sync responses, GCP and Azure guides,
  dynamic inputs and outputs, Bloblang message expansion (unarchive), streams
  mode's HTTP endpoints. Links to removed pages are gone; a scan of
  website/, internal/, public/ and cmd/ finds none left other than three the
  upstream docs already had broken.
- Cookbooks and example configs built on removed connectors (custom metrics,
  enrichments, Kafka topic mirroring, joining streams, the Discord bot,
  Redshift, site analytics, tracking downloads) go; the landing page's
  snippets use kept components.
- Template examples: the SQS list template becomes a kafka_franz topic list,
  the dead letter one wraps aws_s3, the alias one aliases sleep.
- bento test configs (config/test): the awk, lru, ttlru, protobuf and
  message expansion tests go; the mock tests mock a sleep instead of an
  http processor, which they never reach either way.
- resources/: the Lambda deployment files and the schema registry and
  tracing docker setups go; the profiling setup drops to a drop output.
  schemastore/bento.json is regenerated (1.97 MB -> 201 KB).
- public/wasm, the guest SDK for the wasm processor, goes.
- README says up front what this fork carries.

make docs' lint of config/examples, cookbooks and docs, template lint and
bento test ./config/test/... all pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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