Skip to content

chore: Switch go-yaml library to Nobl9 fork - #482

Merged
nieomylnieja merged 4 commits into
mainfrom
switch-go-yaml-library-to-nobl9-fork
Jul 8, 2024
Merged

chore: Switch go-yaml library to Nobl9 fork#482
nieomylnieja merged 4 commits into
mainfrom
switch-go-yaml-library-to-nobl9-fork

Conversation

@nieomylnieja

Copy link
Copy Markdown
Collaborator

Motivation

Modules using nobl9-go cannot rely on replace clause in the SDK if they are using go-yaml package as well, in such scenario these modules have to using replace clause too and this in turn breaks go install, here's an example:

go install github.com/nobl9/sloctl/cmd/sloctl@latest
go: downloading github.com/nobl9/sloctl v0.3.2
go: github.com/nobl9/sloctl/cmd/sloctl@latest (in github.com/nobl9/[email protected]):
	The go.mod file for the module providing named packages contains one or
	more replace directives. It must not contain directives that would cause
	it to be interpreted differently than if it were the main module.

Comment thread .golangci.yml Outdated
Co-authored-by: kskitek <[email protected]>
@nieomylnieja
nieomylnieja merged commit ea8a2e1 into main Jul 8, 2024
@nieomylnieja
nieomylnieja deleted the switch-go-yaml-library-to-nobl9-fork branch July 8, 2024 07:40
nieomylnieja added a commit to nobl9/sloctl that referenced this pull request Jul 8, 2024
## Motivation

The `replace` clause in `go.mod` was causing `go install` to fail with:

```
go install [github.com/nobl9/sloctl/cmd/sloctl@latest](http://github.com/nobl9/sloctl/cmd/sloctl@latest)
go: downloading [github.com/nobl9/sloctl](http://github.com/nobl9/sloctl) v0.3.2
go: [github.com/nobl9/sloctl/cmd/sloctl@latest](http://github.com/nobl9/sloctl/cmd/sloctl@latest) (in [github.com/nobl9/[email protected]](http://github.com/nobl9/[email protected])):
    The go.mod file for the module providing named packages contains one or
    more replace directives. It must not contain directives that would cause
```

## Related changes

- nobl9/nobl9-go#482

## Release Notes

Fixed `go install` malfunction introduced in `v0.3.2` caused by
`replace` clause in `go.mod`.
nieomylnieja added a commit 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants