jiengup opened a new issue, #4161:
URL: https://github.com/apache/iggy/issues/4161

   ### Bug description
   
   `scripts/utils.sh::run_readme_commands` extracts commands with `grep -E` and 
processes each matching physical line independently. It does not join shell 
lines ending with a backslash.
   
   For example:
   
   ```bash
   uv run high-level/producer.py \
     'iggy+tcp://iggy:[email protected]:8090'
   ```
   
   The Python examples runner uses the pattern `^uv run `. It captures and 
executes only:
   
   ```bash
   uv run high-level/producer.py \
   ```
   
   The continuation line is ignored because it does not match the pattern. In 
this example, the trailing backslash reaches the program as its optional 
`connection_string` argument, causing `IggyClient.from_connection_string()` to 
fail.
   
   Valid multiline README commands can therefore fail the `examples-python` CI 
lane or be executed differently from what the documentation describes.
   
   The runner should join continued physical lines into one logical shell 
command before applying include/exclude patterns, transformations, and 
execution.
   
   ### Affected area / component
   
   - Documentation
   - CI / build / tooling
   
   ### Deployment
   
   Not applicable
   
   ### Versions
   
   `upstream/master` at `af237a124`
   
   ### Reproduction
   
   1. Add the following command to `examples/python/README.md`:
   
      ```bash
      uv run high-level/producer.py \
        'iggy+tcp://iggy:[email protected]:8090'
      ```
   
   2. Run:
   
      ```bash
      ./scripts/run-examples-from-readme.sh --language python --skip-tls
      ```
   
   3. Observe that `run_readme_commands` executes only the first physical line. 
The producer receives `\` as the positional connection string and exits with an 
error.
   
   ### Expected behavior
   
   The runner executes the complete logical command:
   
   ```bash
   uv run high-level/producer.py 'iggy+tcp://iggy:[email protected]:8090'
   ```
   
   ### Contribution
   
   - [x] I'm willing to submit a pull request to fix this bug
   


-- 
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]

Reply via email to