Skip to content

v0.7.0

Choose a tag to compare

@V2arK V2arK released this 17 Sep 15:15
· 1 commit to main since this release
33f3962

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 with get_deployment_pods(); pod is required.
    • With end_time set it reads a window (start_time/end_time are 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_time it 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 earlier start_time and no end_time delivers the backlog and then follows, in one pass.
    • start_time defaults to the current time, resolved when fetch_logs is called rather than at the first next(), 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 no seen set 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.

Deprecated

  • get_deployment_logs(), get_deployment_logs_range(), deployment_log_session() and the DeploymentLogSession class (#152). They keep working unchanged and now emit a DeprecationWarning naming fetch_logs() as the replacement.

    Nothing is removed in this release. If your test suite turns warnings into errors (-W error, or pytest's filterwarnings = error), expect these to surface on upgrade.

Changed

  • typing-extensions>=4.5 is now a declared runtime dependency (#152), used for the PEP 702 @deprecated decorator that marks the readers above for type checkers and IDEs as well as at runtime.
  • cryptography is 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 with FileNotFoundError (#153). Wheel installs were never affected, and pip prefers wheels, so this only showed up when a source build was forced.