Repository navigation
v0.7.0
Added
fetch_logs(deployment_id, revision_number, pod, start_time=None, end_time=None, chunk_size=10)(#152) — one generator for both shapes of deployment log reading. Discover pod names withget_deployment_pods();podis required.- With
end_timeset it reads a window (start_time/end_timeare epoch milliseconds, inclusive on both ends) and terminates on its own once the window is delivered or the store has no more lines to give. - Without
end_timeit tails: it never terminates, and once caught up it yields an empty chunk each time nothing new is stored yet, so the caller decides when to sleep or break. Passing an earlierstart_timeand noend_timedelivers the backlog and then follows, in one pass. start_timedefaults to the current time, resolved whenfetch_logsis called rather than at the firstnext(), so lines logged while the generator sits unstarted are not skipped.- Nothing is fetched before the first
next(), and memory is bounded by the dedup window rather than by the length of the stream. Every stored line is delivered at most once — the server re-delivers a look-behind span to protect late arrivals, and the SDK filters it out, so callers need noseenset and no overlapping windows. chunk_size(1 to 5000) is the number of lines requested per round trip. A bulk read of history wants a large value; the log read path is rate limited upstream, and a page the store answers as busy is retried with exponential backoff rather than ending the stream.
- With
Deprecated
-
get_deployment_logs(),get_deployment_logs_range(),deployment_log_session()and theDeploymentLogSessionclass (#152). They keep working unchanged and now emit aDeprecationWarningnamingfetch_logs()as the replacement.Nothing is removed in this release. If your test suite turns warnings into errors (
-W error, or pytest'sfilterwarnings = error), expect these to surface on upgrade.
Changed
typing-extensions>=4.5is now a declared runtime dependency (#152), used for the PEP 702@deprecateddecorator that marks the readers above for type checkers and IDEs as well as at runtime.cryptographyis pinned to 50.0.0, up from 48.0.1 (#147), which closes GHSA-g6cj-pr64-35w5. The advisory covers PKCS#7 EnvelopedData decryption, an API this SDK does not call; the pin is what forced the bump.
Fixed
- The source distribution now ships
requirements.txt, so installing from the tarball no longer fails withFileNotFoundError(#153). Wheel installs were never affected, and pip prefers wheels, so this only showed up when a source build was forced.