connectedk8s v1.11.3 Release - #10242
Conversation
…cks (#77) * possible fix * normalize container log prior to reading * update test to test negative condition * add container_log.strip() to remove leading spaces --------- Co-authored-by: John McCormick <mccormickjo@microsoft.com>
|
Hi john mccormick (@jmccormick7), |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Emergency connectedk8s release bump to v1.11.3 to address onboarding/troubleshooting failures caused by Kubernetes Python client 36.x returning container logs as bytes / stringified-bytes, which previously broke log parsing.
Changes:
- Bumped extension version to 1.11.3 and added a corresponding HISTORY entry.
- Added
_logutils.pywithnormalize_container_log/split_container_loghelpers to consistently decode/normalize pod logs. - Updated precheck/troubleshoot flows (and added unit tests) to use the new helpers when parsing and persisting container logs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/connectedk8s/setup.py | Version bump to 1.11.3 for the emergency release. |
| src/connectedk8s/HISTORY.rst | Added 1.11.3 release note describing the client-36.x parsing fix. |
| src/connectedk8s/azext_connectedk8s/tests/unittests/test_precheckutils.py | Added unit coverage for parsing bytes and stringified-bytes log outputs. |
| src/connectedk8s/azext_connectedk8s/_troubleshootutils.py | Normalizes pod logs before writing/parsing; uses splitlines-safe log splitting. |
| src/connectedk8s/azext_connectedk8s/_precheckutils.py | Normalizes diagnostic job logs and uses robust line splitting; writes UTF-8 explicitly. |
| src/connectedk8s/azext_connectedk8s/_logutils.py | New shared utilities to normalize and split container logs safely across client versions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| return result | ||
|
|
||
|
|
||
| def test_completed_job_parses_healthy_1_36_1_output(monkeypatch): |
| escaped_output = repr(CONFORMANCE_PREDIAGNOSTIC_OUTPUT.encode("utf-8")) | ||
| print(f"Stringified Kubernetes log: {escaped_output}") | ||
|
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
🤖 PR Validation — ️✔️ All clear
Emergency fix for environments using kubernetes client 36.0.
Root cause is an encoding bug in the api client for container logs: kubernetes-client/python#2596
This release fixes an issue from a bug in the kubernetes client 36.0 that is not caught by the extension blocking onboarding for customers with this environment setup.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.