Skip to content

Update example project tests for Tenzir v6 - #61

Merged
mavam merged 2 commits into
mainfrom
topic/example-project-v6
Aug 23, 2026
Merged

Update example project tests for Tenzir v6#61
mavam merged 2 commits into
mainfrom
topic/example-project-v6

Conversation

@mavam

@mavam mavam commented Aug 23, 2026

Copy link
Copy Markdown
Member

🔍 Problem

example-project is our reference for how a tenzir-test project looks, but
its tests had drifted away from the TQL that Tenzir v6 accepts. Ten of them
failed on a current binary, so anyone following the README saw a broken
project and could not tell harness bugs from example rot.

CI never runs these tests — ci.yml only checks that tenzir-test --help
works on the built wheel — which is why this went unnoticed.

🛠️ Solution

  • from_file on an .ndjson file needs an explicit { read_ndjson } parser
    subpipeline.
  • The http operator is gone. Sending each event as a request body is now
    each { from_http url, body=$this }, which also applies to the Executor
    example in request.py.
  • Module-style names for built-in operators are deprecated, since modules are
    reserved for packages: pipeline::detach, context::create_lookup_table,
    context::update, and context::inspect lose their namespaces.

Baselines are unchanged, so the repaired pipelines produce the same output as
the ones they replace.

💬 Review

Before: 10 failures. After: uvx tenzir-test --root example-project -j 4
leaves only tests that are designed to fail, and they should stay that way:

  • tests/fail.tql and tests/shell/exit-code-test.sh demonstrate failure
    rendering, with hand-doctored baselines and exit 42.
  • tests/python/pure-python/flaky_coin.py is a coin flip with retry: 5, so
    it fails roughly 1 run in 32 by construction.

That mix is the real usability problem here: a green run is impossible, so
drift like this hides in plain sight. Two follow-ups worth discussing, both
out of scope for this PR:

  1. Isolate the intentional failures (own directory, or an expect-failure
    marker) so the rest of the project can run green.
  2. Add a CI job that runs example-project against a released tenzir, which
    would have caught every change here.
📎 Related: #60

mavam added 2 commits August 23, 2026 15:09
The reference project's tests had drifted away from the TQL the current
binary accepts, so a newcomer pointing tenzir-test at example-project saw
failures that had nothing to do with the harness. CI never runs these
tests, which is why the rot went unnoticed.

- 'from_file' on an .ndjson file needs an explicit '{ read_ndjson }'
  parser subpipeline.
- The 'http' operator is gone; sending each event as a request body is now
  'each { from_http url, body=$this }'.
- Module-style names for built-in operators are deprecated because modules
  are reserved for packages: 'pipeline::detach', 'context::create_lookup_table',
  'context::update' and 'context::inspect' lose their namespaces.

Baselines are unchanged, so the repaired pipelines produce the same output.
@mavam
mavam merged commit 47b8ac7 into main Aug 23, 2026
5 checks passed
@mavam
mavam deleted the topic/example-project-v6 branch August 23, 2026 13:45
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