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

Backport main - Metrics Explorer updated with PromQL (#1303) #1305

Merged
merged 5 commits into from
Dec 20, 2023

Conversation

pjfitzgibbons
Copy link
Contributor

  • Metrics Explorer updated with PromQL

including query for Prometheus Metrics and updated Export Panel


Signed-off-by: Peter Fitzgibbons peter.fitzgibbons@gmail.com
(cherry picked from commit d16f2b2)
Signed-off-by: Peter Fitzgibbons peter.fitzgibbons@gmail.com

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

* Metrics Explorer updated with PromQL

including query for Prometheus Metrics and updated Export Panel

Signed-off-by: Peter Fitzgibbons <peter.fitzgibbons@gmail.com>
@pjfitzgibbons pjfitzgibbons force-pushed the backport/backport-1303-to-main branch from 958186a to de680cf Compare December 18, 2023 21:18
.husky/.gitignore Outdated Show resolved Hide resolved
.husky/pre-commit Outdated Show resolved Hide resolved
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Trace Config component renders empty trace config 1`] = `
<TraceConfig
<Component
Copy link
Member

Choose a reason for hiding this comment

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

I think the tests are failing here cause, the OSD is not on main branch.

Signed-off-by: Peter Fitzgibbons <peter.fitzgibbons@gmail.com>
@pjfitzgibbons pjfitzgibbons force-pushed the backport/backport-1303-to-main branch from b76e426 to c610945 Compare December 19, 2023 23:03
Signed-off-by: Peter Fitzgibbons <peter.fitzgibbons@gmail.com>
@ps48
Copy link
Member

ps48 commented Dec 20, 2023

I see now with snapshot updates all tests pass except one from metrics, due to missing package.

Summary of all failing tests
FAIL public/components/metrics/top_menu/__tests__/metrics_export.test.tsx
  ● Test suite failed to run

    Cannot find module '@testing-library/user-event' from 'public/components/metrics/top_menu/__tests__/metrics_export.test.tsx'

       6 | import React, { PropsWithChildren } from 'react';
       7 | import { render, screen, fireEvent } from '@testing-library/react';
    >  8 | import userEvent from '@testing-library/user-event';
         | ^
       9 | import type { RenderOptions } from '@testing-library/react';
      10 | import { configureStore } from '@reduxjs/toolkit';
      11 | import { Provider } from 'react-redux';

      at Resolver.resolveModule (../../node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.<anonymous> (public/components/metrics/top_menu/__tests__/metrics_export.test.tsx:8:1)
      ```

…ration testing.

Correct a snapshot.

Signed-off-by: Peter Fitzgibbons <peter.fitzgibbons@gmail.com>
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: 219 lines in your changes are missing coverage. Please review.

Comparison is base (3c57327) 56.32% compared to head (87d57d5) 57.42%.
Report is 1 commits behind head on main.

Files Patch % Lines
...lic/components/metrics/top_menu/metrics_export.tsx 55.62% 67 Missing ⚠️
public/components/custom_panels/helpers/utils.tsx 25.53% 35 Missing ⚠️
...blic/components/custom_panels/redux/panel_slice.ts 18.91% 30 Missing ⚠️
...components/metrics/sidebar/metrics_edit_inline.tsx 31.81% 15 Missing ⚠️
...c/components/metrics/redux/slices/metrics_slice.ts 84.61% 13 Missing and 1 partial ⚠️
public/components/metrics/helpers/utils.tsx 47.36% 10 Missing ⚠️
public/components/metrics/view/metrics_grid.tsx 74.19% 8 Missing ⚠️
public/components/visualizations/visualization.tsx 45.45% 6 Missing ⚠️
public/components/common/search/search.tsx 0.00% 5 Missing ⚠️
...isualization_container/visualization_container.tsx 82.60% 4 Missing ⚠️
... and 14 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1305      +/-   ##
==========================================
+ Coverage   56.32%   57.42%   +1.09%     
==========================================
  Files         327      330       +3     
  Lines       11944    12091     +147     
  Branches     2741     2792      +51     
==========================================
+ Hits         6728     6943     +215     
+ Misses       5171     5102      -69     
- Partials       45       46       +1     
Flag Coverage Δ
dashboards-observability 57.42% <61.51%> (+1.09%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Peter Fitzgibbons <peter.fitzgibbons@gmail.com>
@pjfitzgibbons
Copy link
Contributor Author

I see now with snapshot updates all tests pass except one from metrics, due to missing package.

Reverted

Copy link
Member

@ps48 ps48 left a comment

Choose a reason for hiding this comment

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

Ignoring the linting errors for now, as linter is not backported to 2.x and this PR is already merged in 2.x

@pjfitzgibbons pjfitzgibbons merged commit f31d969 into main Dec 20, 2023
15 of 30 checks passed
@pjfitzgibbons pjfitzgibbons deleted the backport/backport-1303-to-main branch December 20, 2023 19:17
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.

3 participants