Release v4.2.0#117
Merged
Merged
Conversation
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.
🚀 v4.2.0
Make sure to use squash & merge when merging!
Once this is merged, another job will kick off automatically and publish the package.
📝 Changelog
Changelog
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
4.2.0 (2026-06-16)
Features
4.1.2 (2026-06-15)
Features
4.2.0 (2026-MM-DD)
Features
Added segment management methods to
ChatClient:CreateSegment,UpdateSegment, andAddSegmentTargets. Segments targeted by a campaign can now be created and edited through the SDK, completing the campaign workflow without falling back to raw REST (CHA-3483).Standardized error handling per the Server-Side SDK Error Handling Spec (CHA-2958).
*StreamError:ErrApiResponse,ErrRateLimited,ErrTransport,ErrTaskFailed. Useerrors.Is(err, ...)to branch anderrors.As(err, &streamErr)to extract typed fields.ErrRateLimitedalso satisfieserrors.Is(err, ErrApiResponse).StreamError:Unrecoverable,Details,RawResponseBody,RetryAfter,ErrorType,Task. No existing field accesses change.*StreamErrorwithErrTransport; the original error is preserved viaerrors.Unwrap.ErrorTypeis one ofconnection_reset,timeout,dns_failure,tls_handshake_failed,unknown(matches the logging spec error.type enum).Retry-Afterresponse header is parsed on HTTP 429 (both RFC 7231 §7.1.3 integer-seconds and HTTP-date forms) and exposed asStreamError.RetryAfter. Auto-retry is not part of this SDK; callers compose their own retry strategy usingRetryAfterandUnrecoverable.ErrApiResponsewithcode=0,Message="failed to parse error response", and the raw body preserved onRawResponseBody. The JSON parse error is reachable via the cause chain.WaitForTask(ctx, client, taskID, opts...)polls the task-status endpoint until terminal state. Onstatus="failed"returns*StreamErrorwithErrTaskFailedandTaskpopulated from the backend'sErrorResult. On timeout / context cancellation returns*StreamErrorwithErrTransportandErrorType="timeout". Defaults: 1s poll interval, 60s wait timeout — override withWithWaitForTaskPollInterval/WithWaitForTaskTimeout.stack.Wraphelper (~30 lines,runtime.Caller-based, no external dependency) replacesfmt.Errorf("...: %w", err)in every user-facing path.fmt.Sprintf("%+v", err)now prints the captured wrap site for any error produced by the SDK.Explicit HTTP connection pool configuration (CHA-2956).
Four new functional options:
WithMaxConnsPerHost(int): default5WithIdleTimeout(time.Duration): default55sWithConnectTimeout(time.Duration): default10sWithRequestTimeout(time.Duration): default30s(was6s; see Behavior changes)These tune the underlying
*http.Transport.WithHTTPClientcontinues to act as an escape hatch; when set, none of the four new options apply.INFO log on client construction lists the effective pool config.
Behavior changes
RequestTimeoutis now30s(was6s). Aligns the Go SDK with the cross-SDK contract in CHA-2956. Existing callers usingWithTimeout(...)are unaffected. Callers relying on the 6s ceiling for fail-fast behavior should passWithRequestTimeout(6 * time.Second)(orWithTimeout(...), kept as an alias for backward compatibility).5and closes idle sockets after55s(vs. unlimited / unbounded previously). Behavior matches legacystream-chat-go(5 / 59s) modulo the 4s tighter idle window.4.1.1 (2026-05-21)
4.1.0 (2026-05-01)
4.0.6 (2026-04-23)
Features
Bug Fixes
4.0.4 (2026-03-31)
4.0.3 (2026-03-23)
4.0.2 (2026-03-19)
Bug Fixes
4.0.1 (2026-03-19)
4.0.0 (2026-03-05)
Breaking Changes
Response, input types withRequest. See MIGRATION_v3_to_v4.md for the complete rename mapping.Event(WebSocket envelope type) renamed toWSEvent. Base event type renamed fromBaseEventtoEvent(with fieldtypeinstead ofT).*Presetembeds to modularHas*types (HasChannel,HasMessage,HasUserCommonFields, etc.).Pagerrenamed toPagerResponseand migrated from offset-based to cursor-based pagination (next/prevtokens).github.com/GetStream/getstream-go/v4togithub.com/GetStream/getstream-go/v4.Added
WHEventenvelope type for receiving webhook payloads, utility functions for decoding and verifying webhook signatures, and a full set of individual typed event structs for every event across all products (Chat, Video, Moderation, Feeds) usable as discriminated event types.3.8.0 (2026-02-03)
3.7.0 (2025-11-28)
3.6.0 (2025-11-18)
3.5.0 (2025-11-13)
3.4.0 (2025-11-12)
3.3.0 (2025-10-10)
3.2.0 (2025-09-30)
3.1.2 (2025-09-19)
3.1.1 (2025-09-02)
Features
3.1.0-feeds (2025-08-25)
3.0.0-feeds (2025-08-13)
3.0.1-feeds (2025-08-13)
3.0.0-feeds (2025-08-05)
2.1.0 (2025-05-06)
2.0.0 (2025-04-30)
1.2.0 (2025-02-10)
1.2.0 (2025-02-10)
1.1.0 (2025-01-13)
1.0.0 (2024-12-31)
0.0.1: Initial release of the package (2024-10-28)