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

Prometheus: Use the frontend package in Prometheus and remove feature toggle #86080

Merged
merged 23 commits into from
Apr 15, 2024

Conversation

bohandley
Copy link
Contributor

@bohandley bohandley commented Apr 12, 2024

What is this?

This PR fully switches the core Grafana Prometheus frontend over to the grafana/prometheus frontend package. This PR accomplishes 4 things.

  1. Add links for history for all files in the package that were copied/decoupled from core Grafana
  2. Removes redundant core Prometheus frontend code but keeps the custom vendor authentication needed for the config.
  3. Fixes imports for code outside of Prometheus, i.e. DataTrails, Expressions, and more.
  4. Removes the feature toggle that was used to test the frontend package.

Why do we need this?

The frontend package has been tested in ops by feature toggle rollout and in the AMP DS, an external Prometheus data source plugin.

  1. Release the toggle
  2. Turn the toggle on in ops for the last two weeks
  3. Successfully using the frontend package in AMP.

The frontend package code is working. It is time to switch over to it so we do not have to duplicate our work in the frontend package and core Prometheus Typescript files.

Special notes for reviewer:
This work is dependent on this PR in Grafana Enterprise to fix an import that relies on old core Prometheus code. More specifically, the RawQuery component should be imported from grafana/experimental since the refactor of the shared code into that package (grafana/promtheus needs to use that package too and we will at a later date).

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@bohandley bohandley added datasource/Prometheus no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes type/feature-toggle-removal labels Apr 12, 2024
@bohandley bohandley added this to the 11.1.x milestone Apr 12, 2024
@bohandley bohandley self-assigned this Apr 12, 2024
@bohandley bohandley marked this pull request as ready for review April 12, 2024 23:16
@bohandley bohandley requested review from grafanabot, a team and torkelo as code owners April 12, 2024 23:16
@bohandley bohandley requested review from ivanortegaalba, kaydelaney, leeoniya, baldm0mma, gillesdemey and tomratcliffe and removed request for a team April 12, 2024 23:16
@bohandley bohandley force-pushed the bohandley/prometheus-frontend-package-use-GA branch from 1938030 to a3625c9 Compare April 15, 2024 19:14
bohandley added a commit that referenced this pull request Apr 15, 2024
* add native histogram functions to code editor

* add native histogram function types for query builder

* add functions to query builder

* add test to show parsing breaks from code to builder

* add histogram_avg to code editor

* add histogram_avg to builder and make parity between package and core

* add functions to hard coded promql file for highlighting

* remove native histogram test so that it can be added in #85942

* remove functions from core prometheus js to prevent merge conflict in #86080

* use xit for test instead of removing it
@bohandley bohandley requested a review from a team as a code owner April 15, 2024 20:27
@bohandley bohandley requested review from joshhunt and L-M-K-B and removed request for a team April 15, 2024 20:27
@bohandley bohandley merged commit f85470d into main Apr 15, 2024
20 of 21 checks passed
@bohandley bohandley deleted the bohandley/prometheus-frontend-package-use-GA branch April 15, 2024 21:45
xlson added a commit that referenced this pull request Apr 16, 2024
* main: (482 commits)
  I18N: Split loadTranslations i18next plugin into seperate file (#86217)
  Grafana UI: `StackingEditor` and `addHideFrom` - Replace `HorizontalGroup` with `Stack` (#86192)
  Dashboard: Migration -  Add public dashboard tag in the nav bar (#86204)
  mssql: decouple sqleng (#86130)
  Docs: Fix typos (#85651)
  Playlists: Enable kubernetesPlaylists by default in OSS (#86259)
  DashboardScene: Fixes saving dashboard with angular panels  (#86098)
  DashboardScene: Fix empty row repeat issue (#86095)
  Prometheus: Use the frontend package in Prometheus and remove feature toggle (#86080)
  docs: add annotations play link (#86206)
  Chore: add missing modowner (#86234)
  docs: add thresholds play link (#86212)
  docs: added logs panel play link; added dedup options, reformatted fig (#86209)
  docs: query data/relative time range override play link (#86213)
  Docs: added bar gauge play link (#86205)
  Docs: add template var Play link; cleanup existing (#86074)
  Prometheus: Add native histogram functions (#86002)
  K8s: add ID token to requests outbound to new query endpoint (#86214)
  Prometheus: Respect dashboard queries when querying ad hoc filter labels (#85674)
  Chore: Use `handleReducedMotion` to smooth the animation in `LoadingBar` (#85808)
  ...
@kevinwcyu kevinwcyu modified the milestones: 11.1.x, 11.1.0 Jun 21, 2024
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

4 participants