Skip to content

feat: port contentEncoding, log buffer, and dataset stream from apify-client-js - #29

Open
Pijukatel wants to merge 2 commits into
masterfrom
claude/vigilant-sagan-u46frr
Open

Pijukatel wants to merge 2 commits into
masterfrom
claude/vigilant-sagan-u46frr

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Ports the Go-relevant reference-client changes from the latest apify-client-js batch (apify/apify-client-js#1140, #1141, #1139, #1152) into the Go client. No OpenAPI spec update is pending, so APISpecVersion is unchanged.

  • KeyValueStoreClient.SetRecordRawWithEncoding: uploads an already-compressed record under an explicit Content-Encoding (gzip/br/deflate), skipping the client's own request compression so the value is never compressed twice (apify-client-js#1140).
  • LogClient.GetBuffer/GetBufferWithOptions: raw-bytes counterpart of Get (apify-client-js#1141).
  • DatasetClient.DownloadItemsStream: streaming counterpart of DownloadItems, sharing a new streamRaw base helper with LogClient.StreamWithOptions (ports the net effect of apify-client-js#1139, superseded by #1152, which folded streamItems() into a stream option on downloadItems()).
  • KeyValueStoreClient.GetRecordStream/GetRecordStreamWithOptions: streaming counterpart of GetRecord, matching the reference client's getRecord(key, { stream: true }) (added during review for reference-client parity; also built on streamRaw).

apify-client-js#1145 (a common ApifyClientError base class) was evaluated and not ported: Go has no exception hierarchy to unify, APIError is already the client's single error type, and the Is* status predicates already serve as the idiomatic equivalent (see CHANGELOG.md [0.10.0]).

CHANGELOG.md, docs/storages.md, docs/misc.md updated; ClientVersion bumped 0.11.0 → 0.12.0.

…-client-js

- KeyValueStoreClient.SetRecordRawWithEncoding: upload an already-compressed
  record under an explicit Content-Encoding, skipping the client's own
  request compression (ports apify-client-js #1140).
- LogClient.GetBuffer/GetBufferWithOptions: raw-bytes counterpart of Get
  (ports apify-client-js #1141).
- DatasetClient.DownloadItemsStream: streaming counterpart of DownloadItems,
  sharing a new streamRaw helper with LogClient.StreamWithOptions (ports the
  net effect of apify-client-js #1139/#1152).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3FfQf9r45KVCa5VAYAjkd
@Pijukatel Pijukatel added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Oct 19, 2026 — with Claude
…m port

- Qualify callPreEncoded/putRawWithEncoding/SetRecordRawWithEncoding godoc:
  an empty contentEncoding still unconditionally skips the client's own
  request compression, unlike call/putRaw/SetRecordRaw. Add a unit test
  pinning that a >=1024-byte body is sent uncompressed either way.
- Add KeyValueStoreClient.GetRecordStream/GetRecordStreamWithOptions, the
  reference client's missing getRecord({ stream: true }) counterpart, on
  top of the shared streamRaw helper (now also returns headers so a
  stream caller can read Content-Type).
- Align DatasetClient.DownloadItems to mergedParams, matching its
  DownloadItemsStream sibling and the rest of the resourceContext helpers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3FfQf9r45KVCa5VAYAjkd
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants