Fix Tenzir version probe#41
Conversation
Route the version probe through an explicit stdout sink so the query remains compatible with current TQL pipeline semantics. 🤖 Assisted-By: OpenAI Codex
Record the version probe compatibility fix as a bugfix entry for PR #41. 🤖 Assisted-By: OpenAI Codex
Try the v6-compatible stdout sink first, then fall back to the legacy v5 probe until tenzir/tenzir can bootstrap onto the next release candidate. 🤖 Assisted-By: OpenAI Codex
Describe the compatibility outcome without exposing implementation details from the version probe. 🤖 Assisted-By: OpenAI Codex
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4cb3821927
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| except subprocess.CalledProcessError: | ||
| continue | ||
| raise RuntimeError("failed to detect Tenzir version") |
There was a problem hiding this comment.
Preserve interrupt/error exit codes from version probe
This loop swallows every CalledProcessError and then raises a generic RuntimeError, which drops the subprocess return code and bypasses the existing interrupt-aware handling in run_cli (the caller only checks CalledProcessError to detect interrupt exits). If version probing fails because the process was interrupted or terminated, the harness now reports an untyped runtime failure instead of taking the normal interrupt/error path.
Useful? React with 👍 / 👎.
| "version | select version | write_lines", | ||
| ): | ||
| try: | ||
| return subprocess.check_output([*command, pipeline]).decode().strip() |
There was a problem hiding this comment.
Suppress expected stderr from fallback probe attempt
The first probe command is expected to fail on v5 binaries (per the inline comment), but subprocess.check_output is called without redirecting stderr, so that expected failure will emit an error message on every startup even when the fallback succeeds. This creates noisy/false error output for supported v5 environments and can confuse users or stderr-sensitive automation.
Useful? React with 👍 / 👎.
🔍 Problem
tenzir/tenzirstill needs to consume this harness before that release candidate is published, so the probe cannot become v6-only yet.🛠️ Solution
💬 Review