← Back to issue list

feat: oxidize streaming_brief feature

View original Github issue

Metadata

Project
craft-cli
Number
#419
Type
pull request
State
merged
Author
bepri
Labels
—
Created
Updated
Closed

Current evaluation

Merged in canonical/craft-cli#419, restoring streaming_brief output and prefixing messages piped through Emitter.open_stream.

Resolution: closed resolved

Reason: PR #419 was approved and merged. Its implementation restores streaming_brief behavior for brief-mode log events above DEBUG and adds prefixed output from open_stream.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [ ] Have you followed the guidelines for contributing? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint && make test`? --- I recommend reviewing per-commit. Adds back the `streaming_brief` feature, which really only is noticeable in a niche circumstance where `streaming_brief=True` and a logging event with a verbosity level `> logging.DEBUG` is received. Below is a minimal script to demonstrate this behavior. ```py import logging import subprocess from time import sleep from craft_cli import EmitterMode from craft_cli._rs.emitter import Emitter logger = logging.getLogger(__name__) e = Emitter("blah.log", EmitterMode.BRIEF, "example.com", "Hello", streaming_brief=True) logger.info("Testing") with e.open_stream("Counting") as pipe: for i in range(5): logger.info("Printing %d", i) sleep(0.3) subprocess.run(["echo", str(i)], check=True, stdout=pipe) sleep(0.3) e.message("Done") ``` As a fly-by, this adds back the ability to prefix messages piped with `Emitter.open_stream`, as mentioned at https://github.com/canonical/craft-cli/pull/416#discussion_r2800282094. This behavior is shown in the testing script as well.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in canonical/craft-cli#419, restoring streaming_brief output and prefixing messages piped through Emitter.open_stream.
stealth/space-bunny-alpha — closed resolved Merged the oxidized streaming_brief restoration, including prefixed output for messages piped through open_stream.
qwen/qwen3.6-35b-a3b — — Merged after maintainer approval. The change re-adds the streaming_brief feature for niche logging scenarios and restores message prefixing for Emitter.open_stream. Commits were force-pushed to clean history before merging.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-cli#416 (confidence 95%)

    Its open_stream review discussion identified the missing message-prefix behavior addressed by #419.

Related issues

Issue Project State Summary Similarity
#4331 enable "streaming brief" CLI mode snapcraft merged Merged into main, enabling streaming brief CLI mode in commit e1491d1da and fixing #4317, alongside craft-library and craft-parts dependency updates.
73%
#416 feat: oxidize open_stream craft-cli merged Merged PR #416 restored Rust-backed Emitter.open_stream(), refactoring Printer to static state and adding Emitter.init_logger(). It built on prerequisite emitter oxidation in #411.
73%
#349 enable "streaming brief" CLI mode rockcraft merged PR #349 merged as 316e7bcf, enabling streaming Brief output, updating craft dependencies, and cleaning up rock-packing progress messages; fixes #345.
73%
#166 emitter: add "streaming brief" feature craft-cli merged Merged PR #166 as commit c7e4492, adding opt-in streaming BRIEF mode for progress updates, INFO logs, and open_stream() pipe text; fixes #165.
72%
#411 feat: oxidize the emitter craft-cli merged Merged #411 reimplemented Craft CLI's emitter in Rust with PyO3/Maturin, removed global emit, and switched the build backend.
71%