ethanlin01x opened a new issue, #3791:
URL: https://github.com/apache/iggy/issues/3791
### Bug description
The examples CI job reports success for the Rust and C# preflight without
executing a single CLI command from the root README.
Both preflights (`scripts/run-examples-from-readme.sh:188`, `:350`) extract
CLI commands with:
```bash
run_readme_commands "README.md" '^\`cargo r --bin iggy -- '
```
Two independent bugs stack here:
1. **Stale literal.** The README uses `cargo run --bin iggy -- ...`, not
`cargo r`, so the pattern matches nothing on any grep.
2. **GNU grep anchor.** In GNU grep ERE, `` \` `` is a buffer-start anchor,
not a literal backtick. Even with the literal fixed, `` ^\` `` requires line
start *and* buffer start, so only line 1 could ever match: the corrected
pattern matches 9 lines with BSD grep but 0 with GNU grep — and CI runs on
Linux.
`run_readme_commands` (`scripts/utils.sh:305`) silently returns on zero
matches, so both preflights pass green. As a result the 9 CLI commands in the
README (stream create/list/get, topic create/list/get, message send ×2, message
poll) are never exercised, and no other CI check covers them.
### Affected area / component
CI / build / tooling
### Deployment
Not applicable
### Versions
_No response_
### Hardware / environment
_No response_
### Sample code
```bash
# GNU grep (Linux/CI): current pattern and literal-fixed pattern both match 0
$ docker run --rm -v "$PWD/README.md:/README.md:ro" debian:stable-slim bash
-c "
grep -cE '^\\\`cargo r --bin iggy -- ' /README.md
grep -cE '^\\\`cargo run --bin iggy -- ' /README.md
grep -cE '^[\\\`]cargo run --bin iggy -- ' /README.md"
0
0
9
```
### Logs
_No response_
### Iggy server config
_No response_
### Reproduction
Run `./scripts/run-examples-from-readme.sh --language rust --skip-tls` on
Linux: the preflight completes without printing a single `Checking command from
README.md:` line for the CLI commands.
### Contribution
- [x] I'm willing to submit a pull request to fix this bug
### Good first issue
- [ ] I think this could be a good first issue for a new contributor
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]