chore: switch replay commands to SDK endpoints - #482
Merged
Conversation
Replace custom replay HTTP requests with typed SDK replay and object APIs. Updates the nobl9-go dependency and adds coverage for source SLO config parsing.
matkaras
approved these changes
Aug 11, 2026
Replace manual manifest decoding with SDK types and add replay e2e coverage for project-scoped SLO resolution.
matkaras
approved these changes
Aug 14, 2026
Switch Replay SLO retrieval to the generic manifest endpoint and decode returned objects locally. Expand e2e fixtures and assertions to verify existing SLOs are not misclassified as missing.
Stop the status-check ticker on completion, add unit tests for source SLO decoding, conflict errors, and composite SLOs, and tighten replay e2e response validation.
nieomylnieja
added a commit
to nobl9/nobl9-go
that referenced
this pull request
Aug 25, 2026
## Motivation Replay clients currently maintain separate HTTP requests and models. A versioned SDK interface provides one public contract for managing Replays and reduces drift between consumers. ## Summary - Added Replay V1 methods to run Replays, list active requests, inspect status, request cancellation, delete queued requests, and check availability. - Added validated requests and typed response values for Replay types, statuses, cancellation states, sources, durations, and availability reasons. - Preserved RFC3339 `createdAt` values and unknown availability reasons returned by the Nobl9 platform. - Required availability requests to select either an SLO or a data source and rejected non-positive or overflowing durations without reintroducing the former 30-day SDK limit. - Replaced the legacy `sdk/models` Replay API with `sdk/endpoints/replay/v1`. ## Related changes - [sloctl #482](nobl9/sloctl#482) ## Testing - Added end-to-end coverage for availability by SLO and data source, `timeRange.startDate`, source-SLO objective mapping, and `Run`, `List`, `GetStatus`, `Cancel`, and `Delete` flows, including queued, in-progress, canceled, and completed states plus RFC3339 `createdAt`. - Added unit coverage for request validation and serialization, selector modes, duration boundaries and overflow, status conversion, and unknown availability reasons. ## Release Notes Added a versioned Replay API to start Replays, inspect status and availability, list active requests, request cancellation, and delete queued requests. Replay types now live under `sdk/endpoints/replay/v1`. ## Breaking Changes Removed the `sdk/models` package, including its legacy Replay types and helpers. Consumers must migrate to `sdk/endpoints/replay/v1`. `models.Replay` is replaced by `v1.RunRequest`, acronym fields use `SLO`, and the unsupported `EndDate` field has no replacement.
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.
Motivation
The related Go SDK change includes a versioned Replay API. Sloctl no longer needs separate Replay HTTP requests and models.
Summary
sdk/endpoints/replay/v1.createdAtvalues in Replay list output.nobl9-gotov0.135.0-rc1.0.20260813210234-1ab7747b42f5and updated the Go requirement to 1.26.6.Related changes
Testing
createdAtvalues and coarse Replay status values.Breaking Changes
Building sloctl from source now requires Go 1.26.6 instead of Go 1.26.5.