Skip to content

Conversation

@wandergeek
Copy link
Contributor

@wandergeek wandergeek commented Mar 19, 2025

This PR updates the SLO spec to make field optional when dealing with a custom metrics SLO. I have had to make a very unfortunate hack to the client from what appears to be a bug in the generator. It would be good to merge this in now and we can try and fix the upstream issue soon. We are likely due for some more changes to this resource so I think we will need to fix this sooner rather than later.

@wandergeek wandergeek requested a review from Copilot March 19, 2025 03:13
@wandergeek wandergeek self-assigned this Mar 19, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the SLO spec to accommodate optional values for the 'field' property in custom metrics SLO configurations. The key changes include:

  • Updating the CHANGELOG to note that the 'field' property is now optional.
  • Replacing direct type assertions on the 'field' property with the helper function getOrNilString in internal/kibana/slo.go.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

File Description
CHANGELOG.md Added an entry to document making the 'field' optional
internal/kibana/slo.go Modified retrieval of 'field' values to handle nil properly

@wandergeek wandergeek changed the title Update slo field Update custom metrics field to be optional Mar 19, 2025
@tobio
Copy link
Member

tobio commented Mar 19, 2025

The Kibana spec still lists field as required?

@tobio
Copy link
Member

tobio commented Mar 19, 2025

So do the published docs

@wandergeek
Copy link
Contributor Author

@wandergeek
Copy link
Contributor Author

Closing in favor of a larger PR that updates to the latest client

@wandergeek wandergeek closed this Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants