Skip to content

fix(inkless:test): load inkless_produce_consume_test without the Antithesis SDK - #887

Open
giuseppelillo wants to merge 1 commit into
mainfrom
fix/produce-consume-test-antithesis-import
Open

giuseppelillo wants to merge 1 commit into
mainfrom
fix/produce-consume-test-antithesis-import

Conversation

@giuseppelillo

Copy link
Copy Markdown
Contributor

inkless_produce_consume_test.py imports antithesis.assertions at module level. Only the Antithesis driver image (antithesis/Dockerfile-driver) installs the SDK. In the ducker image that the nightly Inkless system tests use, ducktape fails to import the module, logs a warning, and skips the file:

Failed to import kafkatest.tests.inkless.inkless_produce_consume_test, which may indicate a broken test that cannot be loaded: ModuleNotFoundError: No module named 'antithesis'
Didn't find any tests in /opt/kafka-dev/tests/kafkatest/tests/inkless/inkless_produce_consume_test.py

The other files in the directory still load, so the nightly passes without running this test. The 2026-11-19 nightly (44442270818) shows both log lines.

Outside Antithesis the test now falls back to no-op always_or_unreachable, unreachable, and reachable functions. Each always_or_unreachable and unreachable call is followed by a plain assert on the same condition, so the test still fails on a mismatch. The Antithesis driver, which generates its test from this file in antithesis/test_generator/docker_script.sh, keeps using the real SDK.

Testing

  • Run 44538947084 dispatched only this file before the fix. Ducktape printed "No tests to run!", and the job failed.
  • Run 44695891008 dispatched only this file with the fix. Ducktape discovered 2 tests, and test_inkless passed for COMBINED_KRAFT and ISOLATED_KRAFT in 2 minutes 15 seconds.
  • make vale reports no alerts on the new comment.

🤖 Generated with Claude Code

…thesis SDK

`inkless_produce_consume_test.py` imports `antithesis.assertions` at
module level. Only the Antithesis driver image installs the SDK, so in
the ducker image ducktape fails to import the module, logs a warning,
finds no tests in it, and skips it. The nightly Inkless system tests
have passed without running this test.

Outside Antithesis the test now falls back to no-op assertions. Each
Antithesis assertion is followed by a plain `assert` on the same
condition, so the test still fails on a mismatch. The Antithesis
driver keeps using the real SDK.

Assisted-by: Claude Opus 5.5
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