Repository navigation
feat: sync Go client with Apify OpenAPI spec v2-2026-10-01T153946Z - #27
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Syncs the Go client from OpenAPI spec
v2-2026-09-24T114302Ztov2-2026-10-01T153946Z(apify/apify-docs#2975, apify/apify-docs#3024, apify/apify-docs#3037) and ports the Go-relevant changes from the referenceapify-client-jsv3 batch (apify/apify-client-js#985 … #1104).ClientVersionbumped to0.10.0; full details inCHANGELOG.md.Added
Build.ImageDigest.ActorClient.StartRaw/CallRawandRunClient.MetamorphRawfor raw-bytes Actor input.DatasetClient.CreateItemsPublicURLWithFormat.APIError.IsNotFound/IsRateLimited/IsServerError/ … status predicates (Go counterpart of JS's error subclasses).WithTimeoutShort/Medium/Long/Max(WithTimeoutkept as an alias forWithTimeoutMax).WithRequestCompression(auto / brotli / gzip).ScheduleInvoked, the typed entry ofScheduleClient.GetLog.Fixed
BatchAddRequestssplits batches by both the 25-request limit and the payload-size limit, and rejects an oversized single request before sending anything.RunClient.Dataset(),.Log(), …) is now an error, not "absent".ScheduleClient.GetLogparses the JSON log instead of returning raw text.Task.Descriptionis now*string(nullable per the spec)./v2is no longer appended twice inWithBaseURL/WithPublicBaseURL.RunClient.Metamorphsends the target Actor ID inusername~nameform.X-Apify-Pagination-Count, so filtered or unwound pages no longer skip or re-read rows.Signature changes:
DatasetClient.GetStatistics,TaskClient.GetInputandScheduleClient.GetLogno longer return a presence bool (a 404 there is now an error).Task.Descriptionchanged fromstringto*string.Review
Reviewed via
/review-client. The first round asked for timeout tiers, configurable compression, payload-aware batch splitting and anidErrguard fix; these landed inb708a0a, 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 withAPIFY_TOKEN, examples and doc-snippet compilation all passGenerated by Claude Code