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

[Metrics UI] Fix validating Metrics Explorer URL #74311

Merged
merged 4 commits into from
Aug 5, 2020

Conversation

Zacqary
Copy link
Contributor

@Zacqary Zacqary commented Aug 4, 2020

Summary

Fixes #73175

#66503 broke loading a URL state in the metrics explorer because we changed the groupBy parameter from string to string | string[], and didn't update the io-ts real-time type checker to reflect this.

This PR should fix the issue and all other issues of this type in the future. Instead of having two different Typescript definitions and io-ts definitions for the Metric Explorer Options, every type is now canonically defined in io-ts and extracted into Typescript.

In the unlikely event that this breaks again, I added a test for mapToUrlState to ensure that a valid URL will always parse.

Checklist

@Zacqary Zacqary added Feature:Metrics UI Metrics UI feature v8.0.0 Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v7.9.0 labels Aug 4, 2020
@Zacqary Zacqary requested a review from a team as a code owner August 4, 2020 22:13
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@Zacqary Zacqary force-pushed the 73175-fix-reusable-url branch from ceed5fe to 4879236 Compare August 4, 2020 22:13
Copy link
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

LGTM (thanks for the test)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
infra 3.6MB +5.1KB 3.6MB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@Zacqary Zacqary merged commit 0737241 into elastic:master Aug 5, 2020
@Zacqary Zacqary deleted the 73175-fix-reusable-url branch August 5, 2020 18:13
Zacqary added a commit to Zacqary/kibana that referenced this pull request Aug 5, 2020
Zacqary added a commit to Zacqary/kibana that referenced this pull request Aug 5, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 6, 2020
* master: (208 commits)
  Observability Overview fix extra basepath prepend for alerting fetch (elastic#74465)
  [Lens] Clean and inline disabling of react-hooks/exhaustive-deps eslint rule (elastic#70010)
  Skip "space with index pattern management disabled" functional test for cloud env (elastic#74073)
  Filter out non-security jobs when collecting Detections telemetry (elastic#74456)
  [Security Solution][Test] Enzyme test for related events button (elastic#74411)
  [SECURITY_SOLUTION] add z-index to get over nav bar (elastic#74427)
  Rename package configs SO to package policies (elastic#74422)
  [DOCS] Add Kibana alerts to Stack Monitoring (elastic#73762)
  skip flaky suite (elastic#71390)
  [ML] DF Analytics: adds functional tests for edit form (elastic#73885)
  Rename agent configs SO to agent policies (elastic#74397)
  [Jenkins] run CI when plugin readmes change (elastic#74388)
  [Metrics UI] Fix validating Metrics Explorer URL (elastic#74311)
  fixing encoding issue with \ for enroll command (elastic#74379)
  [Ingest Manager] Update package registry for testing to f6b01d (elastic#74341)
  Change experimental message for visualizations (elastic#74354)
  [Alerting] Reload the Alerts List when alerts are deleted (elastic#73715)
  [Enterprise Search] Fix/DRY out plugin i18n strings (elastic#74323)
  update empty prompt in analytics list (elastic#74174)
  [Task Manager] Correctly handle `running` tasks when calling RunNow and reduce flakiness in related tests (elastic#73244)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Metrics UI Metrics UI feature release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.9.0 v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Metrics UI] The URL generated by the Metrics Explorer is not reusable
4 participants