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

fix(operator): fix calculation of deployment interval metrics #822

Merged
merged 3 commits into from
Feb 13, 2023

Conversation

bacherfl
Copy link
Member

@bacherfl bacherfl commented Feb 13, 2023

Closes #807

This PR fixes the calculation of the deployment interval metrics.

When calculating these metrics for AppVersions, which support multiple revisions for the same version since the last release, the earliest revision of a KeptnAppVersion's predecessor is being used as a reference.

Screenshot 2023-02-13 at 10 23 23

Signed-off-by: Florian Bacher florian.bacher@dynatrace.com

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Merging #822 (248bfd3) into main (b5c5801) will increase coverage by 0.80%.
The diff coverage is 84.37%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #822      +/-   ##
==========================================
+ Coverage   57.75%   58.55%   +0.80%     
==========================================
  Files          91       97       +6     
  Lines        7243     7552     +309     
==========================================
+ Hits         4183     4422     +239     
- Misses       2891     2938      +47     
- Partials      169      192      +23     
Impacted Files Coverage Δ
operator/controllers/common/metrics.go 79.41% <79.16%> (-5.08%) ⬇️
...r/apis/lifecycle/v1alpha2/keptnappversion_types.go 97.59% <100.00%> (ø)
.../lifecycle/v1alpha2/keptnworkloadinstance_types.go 95.32% <100.00%> (ø)
operator/controllers/common/otel_utils.go 70.64% <100.00%> (+4.46%) ⬆️
operator/controllers/common/providers/provider.go 80.00% <0.00%> (-20.00%) ⬇️
...lers/lifecycle/keptnworkloadinstance/controller.go 81.16% <0.00%> (-1.64%) ⬇️
operator/controllers/common/providers/common.go 100.00% <0.00%> (ø)
operator/controllers/common/providers/dynatrace.go
...perator/controllers/common/providers/prometheus.go
... and 15 more
Flag Coverage Δ
component-tests 41.52% <0.00%> (-6.89%) ⬇️
keptn-lifecycle-operator 54.67% <84.37%> (+1.07%) ⬆️
klt-cert-manager 67.50% <ø> (ø)
scheduler 21.17% <ø> (ø)

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

Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
@sonarcloud
Copy link

sonarcloud bot commented Feb 13, 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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bacherfl bacherfl marked this pull request as ready for review February 13, 2023 10:20
@bacherfl bacherfl merged commit a798eed into keptn:main Feb 13, 2023
@bacherfl bacherfl deleted the fix/807/interval-metrics branch February 13, 2023 12:07
@keptn-bot keptn-bot mentioned this pull request Feb 13, 2023
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.

Metrics keptn.deployment.deploymentinterval and keptn.app.deploymentinterval not calculated
3 participants