This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
go-sdk is missing functionality to fetch SLI configs #8685
christian-kreuzberger-dtx
started this conversation in
General
Replies: 1 comment 2 replies
-
I agree that this should not be implemented over and over again, but rather refactored/extracted into its own helper function that can be accessed independently of |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Several integrations for fetching SLIs use a function called
GetSLIConfiguration
which is part of go-utils:https://github.com/keptn/go-utils/blob/65503489d75aac53e74e089babc7a5258887d93c/pkg/lib/keptn/keptn_base.go#L83-L86
This function requires a
KeptnBase
instance to be present, which in return requires a cloud event to be present (among other things like KeptnOptions), e.g.:By switching to the go-sdk approach for implementing handlers, we are losing this functionality, as
NewKeptn
, as we're lacking the actual Cloud Event as well as keptn options (also, reconstructing the cloud event seems to be not the best idea... - but feel free to proof me wrong).Problem
The lack of this implementation within go-sdk means that all services that are currently using
GetSLIConfiguration
need to re-implement this functionality based on the sdk. A first approach has already been done by dynatrace-service:https://github.com/keptn-contrib/dynatrace-service/blob/ddfadcff9a656974fe4e0d81c54c94602de3fce8/internal/keptn/config_client.go#L136-L172
(this also has
context.Context
as params, which is helpful)This means that we will have multiple different implementations of this function, which will lead to increased maintenance costs for everyone involved in the future.
In addition, the
GetSLIConfiguration
will most likely no longer be-usable in go-utils, therefore we will have dead-code in go-utils.Evidence of Usage
Proposal (please discuss)
GetSLIConfiguration
when using go-sdkBeta Was this translation helpful? Give feedback.
All reactions