-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add support for time_slice slo #313
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the importer needs to support it too
looks mostly right, thx for the PR |
I will try to update imported this week / Mon. Thank for review and hints 👍 |
@grosser added |
d3370b6
to
3a00b85
Compare
@@ -19,10 +19,15 @@ def import(resource, id) | |||
raise(ArgumentError, "#{resource} is not supported") | |||
|
|||
data = @api.show(model.api_resource, id) | |||
# get sli specification before normalization. | |||
sli_specification = data[:sli_specification] || data.dig(:sli_specification, :time_slice) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how can it be in 2 different places ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... fixed this, we had some temp-fix code that added it to read-only :D
@@ -35,7 +35,9 @@ def build_json | |||
type: type | |||
) | |||
|
|||
if v = query | |||
if type == 'time_slice' | |||
data[:sliSpecification] = :sli_specification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be the actual call ?
data[:sliSpecification] = :sli_specification | |
data[:sliSpecification] = sli_specification |
fixing here #314 |
Add suport for
time_slice
SLO, that insteadquery
usesliSpecification
:I'm a beginner at Ruby, so if some of my code isn't well-written, I would appreciate feedback.
Checklist
path:
in Gemfile)