• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gtsystem / lightkube
94%

Build:
DEFAULT BRANCH: master
Repo Added 11 Jul 2020 09:53PM UTC
Files 26
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • add_more_docs
  • add_more_docs2
  • async_gen
  • crd-docs
  • fix_72
  • fix_78_2
  • fix_black
  • fixci3
  • http2
  • httpx_0_28_comp
  • list-rev
  • list-rev-attr
  • master
  • status-example
  • v0_17_1
  • v1_16
  • v1_33
  • v1_34

24 Sep 2025 07:04AM UTC coverage: 93.607% (-0.1%) from 93.745%
17969083791

push

github

gtsystem
Fix httpx.ResponseNotRead if streaming unready pod logs

If calling Client.log() on a Pod that exists but the container has not
started yet, the Kubernetes API will return 400, considering that a
client error.

Lightkube will try to convert that httpx.HTTPStatusError into an
ApiError. While doing so, it will read the response body for the Status
object that the Kubernetes API returns on errors.

However, if the `follow` parameter is True, this function will set
`stream` to True, which will instruct httpx to delay reading of the
response. Then, when lightkube attempts to parse the response body,
httpx errors because it has not yet been read.

To fix this, simply read the body before creating the error. Now an
ApiError will be raised with the status set to 400 as expected.

2 of 4 new or added lines in 2 files covered. (50.0%)

1186 of 1267 relevant lines covered (93.61%)

2.81 hits per line

Relevant lines Covered
Build:
Build:
1267 RELEVANT LINES 1186 COVERED LINES
2.81 HITS PER LINE
Source Files on master
  • Tree
  • List 26
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
17969083791 master Fix httpx.ResponseNotRead if streaming unready pod logs If calling Client.log() on a Pod that exists but the container has not started yet, the Kubernetes API will return 400, considering that a client error. Lightkube will try to convert that h... push 24 Sep 2025 07:05AM UTC gtsystem github
93.61
17921513135 master Merge 4e96b7444 into dae9a760c Pull #106 24 Sep 2025 06:54AM UTC web-flow github
93.61
17688032111 http2 Merge 10878d94b into dae9a760c Pull #103 21 Sep 2025 08:45AM UTC web-flow github
93.75
17355602970 master Document support for Kubernetes v1.34 and remove support for Kubernetes 1.18. push 31 Aug 2025 10:04AM UTC gtsystem github
93.75
17355585729 v1_34 Merge 0458fdb10 into ddeb2928c Pull #104 31 Aug 2025 10:02AM UTC web-flow github
93.75
15095200683 master Document support for Kubernetes v1.33. Drop support for Kubernetes v1.17 push 18 May 2025 10:55AM UTC gtsystem github
93.75
15095193091 v1_33 Merge 903fede01 into d7bf4bee8 Pull #99 18 May 2025 10:53AM UTC web-flow github
93.75
15095062877 master Upgrade httpx to 0.28.1 for `proxy` parameter support push 18 May 2025 10:36AM UTC gtsystem github
93.75
15095052185 add_more_docs2 Merge ee471c45c into 7fb0b532e Pull #98 18 May 2025 10:35AM UTC web-flow github
93.75
15094653366 master Added type hint to parameters function push 18 May 2025 09:43AM UTC gtsystem github
93.75
See All Builds (271)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc