Skip to content

Releases

v2.0.1

Choose a tag to compare

@github-actions github-actions released this 07 Sep 08:09
5f7f3a4

v2.0.1

Fixed

  • The README and the Helm chart pointed at ghcr.io/2pk03/kaf-s3-connector, which returns
    403. The repository moved to the novatechflow organisation, and the workflow derives
    the image path from the repository owner, so v2.0.0 published to
    ghcr.io/novatechflow/kaf-s3-connector. Every documented docker pull and the chart's
    default image.repository were unusable. Chart version 2.0.1; appVersion stays at
    2.0.0 because the connector itself is unchanged.
  • The README's CI, Docker and container badges pointed at the old owner too, and the
    documented pull example still named v1.0.0.

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 07 Sep 07:55
692e027

v2.0.0

First release since v1.2.5, gathering everything below it. The major bump is for the
breaking changes: delete_after_consume no longer accepts the default auto-commit
configuration, and the LICENSE file changed.

This release also revisits delete_after_consume, which has needed correcting in four
consecutive releases. The conclusion is that the feature is sound only under a
precondition it cannot verify, so the release makes the precondition explicit, refuses
the configuration that is outright unsafe, and promotes S3 lifecycle rules to the
recommended mechanism by making them actually work.

Breaking

  • The LICENSE file carried the Apache License 2.0 text while pyproject.toml, the PyPI
    metadata and the README badge all declared MIT. The file now contains the MIT license,
    matching what every release has been published under.
  • delete_after_consume now requires enable.auto.commit: False and raises otherwise.
    Under auto-commit the object is removed before the payload is processed, so a crash
    loses the record — a window previously covered by a log warning while doing it anyway.
    Since auto-commit is the librdkafka default, this was the combination most users would
    have hit; the project's own test fixture used it.

Fixed

  • multipart_threshold only chose which S3 API to call. Inside upload_fileobj boto3
    applied its own 8 MiB threshold, so a payload between the two sizes uploaded as a single
    part while the reference still dropped its ETag. An explicit TransferConfig now makes
    the setting mean what it says. Found by the new integration suite.
  • ttl_seconds did nothing. It wrote a ttl_epoch user-metadata entry, and S3 lifecycle
    rules can filter on prefix, tags and object size but not on user metadata, so no rule
    could ever act on it. Objects are now also tagged kaf-s3-ttl-seconds=<n>, on both the
    single-PUT and multipart paths, which a lifecycle rule can filter on. Non-positive
    ttl_seconds is rejected rather than silently ignored.

Added

  • Release notes now cover every CHANGELOG section down to the previous git tag, not just
    the section matching the tag. v1.3.0 through v1.8.1 were never tagged, so a release of
    this release would otherwise have announced one section out of eight.
  • An integration suite that runs the connector against a real Kafka broker and a real S3
    service in throwaway containers: round trips across every storage option, plus tests
    pinning the real Kafka and S3 behaviours that past bugs got wrong. Opt-in via
    pytest -m integration, skipped without Docker, and run by a dedicated CI job.
  • config/s3-lifecycle.json: a ready-to-apply lifecycle policy matching the tag the
    producer writes, plus a prefix-based rule and an AbortIncompleteMultipartUpload rule.
    A test asserts the shipped policy and the emitted tag stay in agreement.
  • A startup warning that delete_after_consume is only correct when the topic has a
    single consumer group. No consumer can detect other groups, so a warning is the limit of
    what the library can do about it.

Changed

  • Deferred-deletion bookkeeping moved out of S3Consumer into PendingDeletes, covered
    by its own unit tests. The behaviour is unchanged; it was spread across five methods of
    a class that also does polling, integrity checking and DLQ publication.
  • README has a "Reclaiming S3 storage" section that recommends lifecycle rules, states
    delete_after_consume's precondition plainly, and documents how deferred deletion
    behaves.
  • CI actions moved off Node 20, which GitHub is retiring: actions/checkout v4 to v5,
    actions/setup-python v5 to v6, azure/setup-helm v4 to v5,
    softprops/action-gh-release v2 to v3, pypa/gh-action-pypi-publish 1.9.0 to 1.14.2.
  • ci.yml declares permissions: contents: read; it was the only workflow inheriting the
    repository's default token scope.
  • Added .github/dependabot.yml for grouped monthly action and pip updates.

v1.8.1

Fixed

  • The PyPI workflow's workflow_dispatch trigger could not build. It derived the version
    with ${GITHUB_REF#refs/tags/}, which on a branch leaves the ref intact, so the build
    ran with SETUPTOOLS_SCM_PRETEND_VERSION=refs/heads/main and died on
    InvalidVersion. It now reads the release tag, falls back to the ref only when that ref
    is a tag, and exits with a clear message otherwise. The same class of bug was fixed in
    the Docker workflow in v1.3.0; the shell logic for both is now covered by tests.
  • Stdin producer mode turned blank lines into empty Kafka messages, which are delete
    markers on a compacted topic. Blank lines are skipped and counted as
    stdin_blank_lines, and \r\n line endings are handled.
  • A bucket name with leading or trailing whitespace passed validation and was sent to S3
    verbatim, failing later with a less obvious error. It is now rejected at construction.
  • examples/produce_example.py flushed twice on shutdown, once explicitly and again via
    close(), blocking for up to 60 seconds. close() alone reports what it flushed.

v1.8.0

Fixed

  • commit(message=...) deleted every deferred S3 object, not just those the commit
    covered. Committing one partition's message removed objects belonging to other
    partitions and to later offsets that were still in flight; a crash then lost them,
    because their offsets had never been committed. Deferred deletions are now tracked per
    partition and offset, and a message commit drains only that partition up to that offset.
  • A consumer group rebalance stranded the new partition owner. subscribe() registered no
    rebalance callbacks, so partitions taken away still had deferred deletions queued, and
    the next commit deleted objects for messages another member was about to reprocess.
    Revoked and lost partitions now drop their pending deletions.

Both are reachable only with delete_after_consume and manual commits — the combination
the README recommends for at-least-once delivery — and only in a multi-consumer group,
which is the normal deployment.

Changed

  • subscribe() accepts on_assign, on_revoke and on_lost. The connector registers its
    own listeners either way and calls yours after its own bookkeeping.

v1.7.0

Fixed

  • deterministic_keys combined with compression: "gzip" rejected valid messages.
    gzip.compress embeds an mtime, so re-producing an identical payload wrote different
    bytes to the same key; any earlier message still referencing it then failed its ETag
    check and was rejected as corrupt. Compression is now byte-reproducible (mtime=0).
  • deterministic_keys combined with delete_after_consume silently lost messages.
    Deduplicated messages share one object, so consuming the first deleted it and every
    other message pointing at it was skipped as object_missing — a loss made silent by
    the v1.6.0 change that stopped missing objects from raising. Producers now mark such
    references deterministic, and consumers do not delete objects that carry the mark.

Changed

  • Added a producer backpressure panel to the Grafana dashboard. produce_queue_full was
    emitted from v1.6.0 but had nowhere to show; every metric the code emits is now on the
    dashboard.
  • Documented that a connector instance is not safe to share across threads.

v1.6.0

Fixed

  • A missing S3 object raised a raw botocore ClientError out of poll(), killing the
    consumer. Objects go missing for ordinary reasons — a ttl_seconds lifecycle rule
    fired, another consumer group ran with delete_after_consume, or an auto-committed
    message is being replayed — so the message is now skipped with reason object_missing.
    Credential, bucket and throttling errors still propagate to the caller.
  • produce() raised BufferError as soon as librdkafka's local queue filled, discarding
    the S3 object it had just uploaded. Produce now drains delivery reports and retries for
    up to produce_timeout (30 s) before giving up, applying backpressure instead of
    failing a burst.
  • Inline messages were produced without a delivery callback, so their delivery failures
    were silent — no log line, no produce_error metric. They are now reported like
    offloaded messages; there is simply no S3 object to roll back.
  • The image healthcheck probed a hardcoded port 8000 while METRICS_PORT is configurable,
    so any other port left the container permanently unhealthy. It now reads METRICS_PORT.

Changed

  • The chart had three places to set the port — service.port, env.METRICS_PORT and the
    scrape annotation. Setting only service.port moved the Service, container port and
    both probes while the app kept listening on 8000, producing a liveness restart loop.
    service.port is now the single source of truth for all four.

v1.5.0

Fixed (data loss)

  • Inline JSON objects were silently dropped. Any payload small enough to stay on Kafka
    that happened to be a JSON object was parsed as an S3 reference, found to name no
    bucket or key, and skipped — even with allow_inline_payloads at its default of True.
    A message is now treated as a reference only when it carries both s3_bucket and
    s3_key as strings; everything else is an ordinary inline payload.
  • commit() drained pending S3 deletions immediately after an asynchronous commit, which
    has not yet reached the broker. A crash in that window left the offset uncommitted and
    the object already deleted, defeating the deferral added in v1.4.0. Commits are now
    forced synchronous whenever deletions are pending.

Fixed

  • An unset S3_BUCKET arrives as "", and the check tested for the key rather than a
    value, so the connector started with an empty bucket and rejected every reference. Empty
    and whitespace-only buckets are now rejected at construction on both sides.
  • DLQ records had no size bound. A large malformed message was echoed whole, and since
    JSON escaping expands raw bytes several-fold, the record ...
Read more

v1.2.5

Choose a tag to compare

@github-actions github-actions released this 26 Nov 12:50
Fix workflow to force version from tag using SETUPTOOLS_SCM_PRETEND_V…

v1.2.4

Choose a tag to compare

@github-actions github-actions released this 26 Nov 12:39
Prepare release v1.2.4

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 11:36
v1.2.0

v1.0.0

Choose a tag to compare

@novatechflow novatechflow released this 26 Nov 10:08

Changelog

v1.0.0

  • Hardened non-root Docker image with healthcheck and Prometheus /metrics.
  • Env-driven runtime entrypoint for producer/consumer, DLQ + metrics hooks.
  • Added gzip compression, deterministic keys, TTL metadata, SSE/SSE-KMS support.
  • DLQ handling on producer delivery errors and consumer integrity failures.
  • Optional inline handling, bucket/prefix enforcement, SHA-256 + ETag integrity checks.
  • Helm chart for deployment, Prometheus scrape config, Grafana dashboard sample.
  • GitHub Actions for tests and Docker build/push.