Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: PC-14184 Add sourceSLO field in replay config file #213

Merged
merged 10 commits into from
Oct 7, 2024

Conversation

piotrkwarcinski
Copy link
Contributor

@piotrkwarcinski piotrkwarcinski commented Sep 17, 2024

Motivation

Run replay using an SLO as a data source.

Summary

  • Added sourceSLO field to replay configuration file.
- slo: a-prometheus-http-requests-goodtotal-ratio
  project: pkw-test
  from: 2024-09-12T00:00:00+02:00
  sourceSLO:
    slo: prometheus-http-requests-goodtotal-ratio
    project: amazon-prometheus
    objectivesMap:
      - source: objective-1
        target: objective-2
  • All sourceSLO slos are added to the initial sloctl request that checks if the user has permissions to all SLOs and if they exist.

Related changes

Testing

  • Added unit tests for sourceSLO validation in nobl9-go

Release Notes

Replaying SLOs using file configuration now allows for replays to be run using another SLO as a data source. This can be done by specifying the sourceSLO field in a replayed SLO. The field must provide the slo name, its project, and a mapping for objectives to match the source and target SLO objectives.

@n9-machine-user n9-machine-user added enhancement New feature or request go minor labels Sep 17, 2024
@piotrkwarcinski piotrkwarcinski changed the title feat: Add source slo in replay config file feat: PC-14184 Add source slo in replay config file Sep 25, 2024
@piotrkwarcinski piotrkwarcinski changed the title feat: PC-14184 Add source slo in replay config file feat: PC-14184 Add sourceSLO field in replay config file Sep 25, 2024
@piotrkwarcinski piotrkwarcinski marked this pull request as ready for review September 26, 2024 08:42
internal/replay.go Show resolved Hide resolved
ditrytus pushed a commit to nobl9/nobl9-go that referenced this pull request Oct 3, 2024
## Motivation

Run replay using an SLO as a data source.

## Summary

Added `sourceSLO` struct
```
- slo: a-prometheus-http-requests-goodtotal-ratio
  project: pkw-test
  from: 2024-09-12T00:00:00+02:00
  sourceSLO:
    slo: prometheus-http-requests-goodtotal-ratio
    project: amazon-prometheus
    objectivesMap:
      - source: objective-1
        target: objective-2
```
* Added new status for SLO named `sourceSLO` which returns the
replayStatus of the SLO that uses this SLO as a data source.

## Related changes

* n9: nobl9/n9#15419
* sloctl : nobl9/sloctl#213

## Testing

- Added unit tests for validating `sourceSLO` struct.

## Release Notes

Added support for `sourceSlo` in Replay, allowing the specification of
another SLO as a data source. The status field of an SLO now allows to
return the status of the target replay for this SLO.
@ditrytus ditrytus merged commit e502ae2 into main Oct 7, 2024
5 checks passed
@ditrytus ditrytus deleted the PC-14184-replay-with-source-slo branch October 7, 2024 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants