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 #543

Merged
merged 13 commits into from
Oct 3, 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 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

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.

@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 slo data source in replay 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
@klaudia-nobl9 klaudia-nobl9 added the passed-testing Added by QA when tests have passed label Oct 2, 2024
@ditrytus ditrytus enabled auto-merge (squash) October 3, 2024 09:57
@ditrytus ditrytus merged commit 13a5a30 into main Oct 3, 2024
5 checks passed
@ditrytus ditrytus deleted the PC-14184-replay-with-source-slo branch October 3, 2024 10:01
ditrytus added a commit to nobl9/sloctl that referenced this pull request Oct 7, 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

* n9: nobl9/n9#15419
* nobl9-go: nobl9/nobl9-go#543

## 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.

---------

Co-authored-by: Jakub Gruszecki <[email protected]>
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 passed-testing Added by QA when tests have passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants