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: update prometheus api to support range.step #1801

Merged
merged 18 commits into from
Aug 10, 2023

Conversation

rakshitgondwal
Copy link
Member

@rakshitgondwal rakshitgondwal commented Jul 28, 2023

Relates to #1736

Changes made:

  • Updated Prometheus API to support the range.step value.
  • Added a new EvaluateQueryForStep func in prometheus.go that returns a []slice with the result values inside it. Later, aggregation functions would be applied to the values inside this slice.
  • This function will return the Marshal value of the resultSlice as a whole for the rawValue.

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for keptn-lifecycle-toolkit ready!

Name Link
🔨 Latest commit cee2b3e
🔍 Latest deploy log https://app.netlify.com/sites/keptn-lifecycle-toolkit/deploys/64d4bce75bf81f000823babf
😎 Deploy Preview https://deploy-preview-1801--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.

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #1801 (cee2b3e) into main (7eb8afe) will increase coverage by 0.15%.
The diff coverage is 84.74%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1801      +/-   ##
==========================================
+ Coverage   83.37%   83.52%   +0.15%     
==========================================
  Files         136      136              
  Lines        8348     8391      +43     
==========================================
+ Hits         6960     7009      +49     
+ Misses       1130     1126       -4     
+ Partials      258      256       -2     
Files Changed Coverage Δ
...trollers/common/providers/prometheus/prometheus.go 86.36% <84.74%> (+3.48%) ⬆️

... and 2 files with indirect coverage changes

Flag Coverage Δ
certificate-operator 68.55% <ø> (ø)
component-tests 59.22% <ø> (+1.08%) ⬆️
lifecycle-operator 84.88% <ø> (ø)
metrics-operator 83.35% <84.74%> (+0.40%) ⬆️
scheduler 32.12% <ø> (ø)

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

rakshitgondwal and others added 7 commits August 3, 2023 17:20
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
bacherfl and others added 3 commits August 9, 2023 14:49
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
@rakshitgondwal rakshitgondwal marked this pull request as ready for review August 9, 2023 13:34
@rakshitgondwal rakshitgondwal requested a review from a team as a code owner August 9, 2023 13:34
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Copy link
Member

@bacherfl bacherfl left a comment

Choose a reason for hiding this comment

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

great work so far! I have added one more suggestion, but then I think this PR will be ready

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
bacherfl
bacherfl previously approved these changes Aug 10, 2023
Copy link
Member

@bacherfl bacherfl left a comment

Choose a reason for hiding this comment

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

lgtm! approved with one optional suggestion

Signed-off-by: Rakshit Gondwal <rakshitgondwal3@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Aug 10, 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 1 Code Smell

No Coverage information No Coverage information
0.1% 0.1% Duplication

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.

None yet

3 participants