← Back to issue list

chore: remove live logging from pytest configs in k8s and machine profiles

View original Github issue

Metadata

Project
charmcraft
Number
#2863
Type
pull request
State
merged
Author
tromai
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2863 as commit a03f4ccb, removing live pytest logging (`log_cli` and `log_cli_level`) from the Kubernetes and machine profiles.

Resolution: closed resolved

Reason: PR #2863 was approved and merged into main as commit a03f4ccb.

Evaluated by: mr-cal-bot

No scores available.

Issue body

This PR removes `log_cli_level` and `log_cli` from `[tool.pytest.ini_options]` in `pyproject.toml` for the `kubernetes` and `machine` init profiles. **Removing `log_cli`** This change follows the fixes in canonical/operator#2654. Setting `log_cli = true` in `pyproject.toml` causes live logging to appear in **tox -e unit** as a side effect: ``` tests/unit/test_charm.py::test_two ------------------------- live log call ------------------------- ERROR <error_level_message> PASSED ``` **Removing `log_cli_level`** `tox -e unit` and `tox -e integration` both don't need `log_cli_level` in `pyproject.toml`: - `[testenv:integration]` already has `--log-cli-level=INFO` in the CLI command - `[testenv:unit]` doesn't need `log_cli_level=INFO`, and should just rely on the default level `WARNING`. --- - [x] I've followed the [contribution guidelines](https://github.com/canonical/charmcraft/blob/main/CONTRIBUTING.md). - [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [x] I've successfully run `make lint && make test`. - [ ] I've added or updated any relevant documentation. - [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [ ] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #2863 as commit a03f4ccb, removing live pytest logging (`log_cli` and `log_cli_level`) from the Kubernetes and machine profiles.
stealth/space-bunny-alpha — closed resolved Merged PR dropping `log_cli` and `log_cli_level` from `[tool.pytest.ini_options]` in the k8s and machine init profile pyproject.toml templates, so `tox -e unit` no longer emits live logs; integration keeps its own `--log-cli-level=INFO`.
qwen3.6-35b-a3b-mtp-q6 — — Merged to remove log_cli and log_cli_level from pytest configs in kubernetes and machine profiles. This prevents unwanted live logging in tox unit tests, aligning with existing CLI flags and default warning levels.

Update history

Date Change
updated
updated
updated
updated
updated
updated
created

Related work

  • Related To: operator#2654 (confidence 90%)

    PR #2863 cites operator #2654 as the precedent that motivated disabling live pytest logging.

Related issues

Issue Project State Summary Similarity
#2769 chore: update pytest logging options in k8s and machine profiles charmcraft merged Merged PR #2769, updating pytest logging options in the k8s and machine profiles to enable Jubilant’s new logging behavior.
78%