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(metrics-operator): introduce SLO -> AnalysisDefinition converter #1955

Merged
merged 11 commits into from
Aug 29, 2023
Merged

feat(metrics-operator): introduce SLO -> AnalysisDefinition converter #1955

merged 11 commits into from
Aug 29, 2023

Conversation

odubajDT
Copy link
Contributor

@odubajDT odubajDT commented Aug 25, 2023

Changes

  • introduced convertor for SLO files
  • unit tests
  • converter is part of metrics-operator binary under --convert-slo flag

Usage

./metrics-operator --convert-slo=slo.yaml --slo-namespace=default --definition=defname

Missing pieces

  • There is need to cover the cases when multiple criteria have logical AND operator in between them, see TODOs in setupTarget function and here for more information

Part-of: #1760

@netlify
Copy link

netlify bot commented Aug 25, 2023

Deploy Preview for keptn-lifecycle-toolkit ready!

Name Link
🔨 Latest commit f8898af
🔍 Latest deploy log https://app.netlify.com/sites/keptn-lifecycle-toolkit/deploys/64ec4d0528b0970008fbb43f
😎 Deploy Preview https://deploy-preview-1955--keptn-lifecycle-toolkit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@odubajDT odubajDT changed the title feat(metrics-operator): introduce SLO -> AnalysisDefinition converter feat(metrics-operator): introduce SLO -> AnalysisDefinition converter (WIP) Aug 25, 2023
@codecov
Copy link

codecov bot commented Aug 25, 2023

Codecov Report

Merging #1955 (3d8163c) into main (75baefd) will increase coverage by 0.38%.
The diff coverage is 96.53%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1955      +/-   ##
==========================================
+ Coverage   83.86%   84.25%   +0.38%     
==========================================
  Files         142      143       +1     
  Lines        8845     9018     +173     
==========================================
+ Hits         7418     7598     +180     
+ Misses       1160     1154       -6     
+ Partials      267      266       -1     
Files Changed Coverage Δ
...-operator/api/v1alpha3/analysisdefinition_types.go 100.00% <ø> (ø)
metrics-operator/converter/slo_converter.go 96.53% <96.53%> (ø)

... and 3 files with indirect coverage changes

Flag Coverage Δ
certificate-operator 68.55% <ø> (ø)
component-tests 59.68% <ø> (+1.43%) ⬆️
lifecycle-operator 84.92% <ø> (ø)
metrics-operator 86.39% <96.53%> (+0.99%) ⬆️
scheduler 32.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@odubajDT odubajDT changed the title feat(metrics-operator): introduce SLO -> AnalysisDefinition converter (WIP) feat(metrics-operator): introduce SLO -> AnalysisDefinition converter Aug 28, 2023
@odubajDT odubajDT marked this pull request as ready for review August 28, 2023 11:44
@odubajDT odubajDT requested a review from a team as a code owner August 28, 2023 11:44
metrics-operator/main.go Outdated Show resolved Hide resolved
metrics-operator/converter/slo_converter.go Show resolved Hide resolved
metrics-operator/converter/slo_converter.go Outdated Show resolved Hide resolved
metrics-operator/converter/slo_converter.go Outdated Show resolved Hide resolved
metrics-operator/converter/slo_converter.go Outdated Show resolved Hide resolved
metrics-operator/converter/slo_converter.go Outdated Show resolved Hide resolved
metrics-operator/converter/slo_converter.go Outdated Show resolved Hide resolved
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
bacherfl
bacherfl previously approved these changes Aug 29, 2023
Co-authored-by: RealAnna <89971034+RealAnna@users.noreply.github.com>
Signed-off-by: odubajDT <93584209+odubajDT@users.noreply.github.com>
@sonarcloud
Copy link

sonarcloud bot commented Aug 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

@odubajDT odubajDT merged commit 9c9929c into keptn:main Aug 29, 2023
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants