Skip to content

feat: sync Go client with Apify OpenAPI spec v2-2026-10-01T153946Z - #27

Merged
Pijukatel merged 2 commits into
masterfrom
claude/vigilant-sagan-ciag1b
Oct 6, 2026
Merged

Pijukatel merged 2 commits into
masterfrom
claude/vigilant-sagan-ciag1b

Conversation

@Pijukatel

Copy link
Copy Markdown
Collaborator

Summary

Syncs the Go client from OpenAPI spec v2-2026-09-24T114302Z to v2-2026-10-01T153946Z (apify/apify-docs#2975, apify/apify-docs#3024, apify/apify-docs#3037) and ports the Go-relevant changes from the reference apify-client-js v3 batch (apify/apify-client-js#985 … #1104). ClientVersion bumped to 0.10.0; full details in CHANGELOG.md.

Added

  • Build.ImageDigest.
  • ActorClient.StartRaw / CallRaw and RunClient.MetamorphRaw for raw-bytes Actor input.
  • DatasetClient.CreateItemsPublicURLWithFormat.
  • APIError.IsNotFound / IsRateLimited / IsServerError / … status predicates (Go counterpart of JS's error subclasses).
  • Per-operation timeout tiers WithTimeoutShort/Medium/Long/Max (WithTimeout kept as an alias for WithTimeoutMax).
  • WithRequestCompression (auto / brotli / gzip).
  • ScheduleInvoked, the typed entry of ScheduleClient.GetLog.

Fixed

  • BatchAddRequests splits batches by both the 25-request limit and the payload-size limit, and rejects an oversized single request before sending anything.
  • Empty or dot-segment IDs/keys are rejected instead of being embedded in the request path.
  • An ambiguous 404 on ID-less sub-resources (RunClient.Dataset(), .Log(), …) is now an error, not "absent".
  • ScheduleClient.GetLog parses the JSON log instead of returning raw text.
  • Task.Description is now *string (nullable per the spec).
  • /v2 is no longer appended twice in WithBaseURL / WithPublicBaseURL.
  • Already-compressed content types are not re-compressed.
  • RunClient.Metamorph sends the target Actor ID in username~name form.
  • Dataset item iteration advances by X-Apify-Pagination-Count, so filtered or unwound pages no longer skip or re-read rows.

Signature changes: DatasetClient.GetStatistics, TaskClient.GetInput and ScheduleClient.GetLog no longer return a presence bool (a 404 there is now an error). Task.Description changed from string to *string.

Review

Reviewed via /review-client. The first round asked for timeout tiers, configurable compression, payload-aware batch splitting and an idErr guard fix; these landed in b708a0a, and the next round was Approved with no open items.

Test plan

  • go build ./..., go vet ./..., gofmt -l .
  • golangci-lint run (0 issues)
  • go test ./... — unit tests, live-API integration tests with APIFY_TOKEN, examples and doc-snippet compilation all pass

Generated by Claude Code

claude added 2 commits October 2, 2026 14:05
Ports the behavioral delta from apify-client-js PRs #985-#1104 (raw-bytes Actor
input, dataset export-format URLs, build image digest, typed error-status
predicates, path-traversal hardening, ambiguous-404 handling, pagination
scanned-count fix, already-compressed-content-type compression skip, base URL
/v2 idempotency) plus two bugs found independently while verifying the diff
(ScheduleClient.GetLog returning the wrong shape, RunClient.Metamorph sending
an unsanitized target Actor ID).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STUGToGEaEFoBGRbWTvF4m
- Implement per-operation default timeout tiers (short/medium/long,
  5s/30s/360s) replacing the flat 360s timeout, with WithTimeoutShort/
  Medium/Long/Max client options and a noRequestTimeout sentinel for
  WaitForFinish/Call polling; a waitForFinish parameter extends its tier
  to cover the requested server-side hold. Every call site's tier was
  verified against the reference client's per-method default.
- Add WithRequestCompression (auto/brotli/gzip) to choose the request
  compression codec.
- Make RequestQueueClient.BatchAddRequests split batches by payload size
  (not just count) and validate the whole input before sending anything,
  using the published @apify/consts MAX_PAYLOAD_SIZE_BYTES.
- Add the idErr fail-fast guard to ProlongRequestLock/DeleteRequestLock.
- Fold encodePathSegment into safePathSegment.
- Trim a CHANGELOG line describing a non-change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STUGToGEaEFoBGRbWTvF4m
@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 2, 2026 — with Claude
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 2, 2026
@Pijukatel
Pijukatel merged commit a350c91 into master Oct 6, 2026
2 of 6 checks passed
@Pijukatel
Pijukatel deleted the claude/vigilant-sagan-ciag1b branch October 6, 2026 08:34
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