Skip to content

[Lens] Type safe migrations#65576

Merged
wylieconlon merged 6 commits intoelastic:masterfrom
wylieconlon:lens/type-safe-migration
May 7, 2020
Merged

[Lens] Type safe migrations#65576
wylieconlon merged 6 commits intoelastic:masterfrom
wylieconlon:lens/type-safe-migration

Conversation

@wylieconlon
Copy link
Copy Markdown
Contributor

Part of #64748

Checklist

@wylieconlon wylieconlon added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// Feature:Lens labels May 6, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@wylieconlon wylieconlon marked this pull request as ready for review May 6, 2020 22:57
@wylieconlon wylieconlon requested a review from a team May 6, 2020 22:57
@wylieconlon wylieconlon requested a review from a team as a code owner May 6, 2020 22:57
@wylieconlon wylieconlon added release_note:skip Skip the PR/issue when compiling release notes v7.9.0 v8.0.0 labels May 6, 2020
Copy link
Copy Markdown
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

LGTM.

Would superseed #65569.

Copy link
Copy Markdown
Contributor

@rudolf rudolf left a comment

Choose a reason for hiding this comment

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

It seems like the code is often more defensive than the type by using optional chaining even if the type says it should always be defined. I don't think we should relax the code, better to be defensive, but if there's any doubt that these properties might not exist I think it's better to reflect that in the type too.

Copy link
Copy Markdown
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

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

Tested on Firefox by creating a bunch of saved objects in 7.6.1 and then importing them here and checking - I found one bug, but I don't think it's related to this issue, so I submitted it here: #65677

@wylieconlon
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@wylieconlon
Copy link
Copy Markdown
Contributor Author

@rudolf The chaining operations are there because they used to be needed, but you're right that they are no longer necessary. They are there because I didn't rewrite the migrations entirely. I can update.

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

History

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

@wylieconlon wylieconlon merged commit 8cf6730 into elastic:master May 7, 2020
@wylieconlon wylieconlon deleted the lens/type-safe-migration branch May 7, 2020 20:02
wylieconlon pushed a commit to wylieconlon/kibana that referenced this pull request May 7, 2020
* [Lens] Type safe migrations

* Commit API changes

* Remove optional chaining for required properties

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
wylieconlon pushed a commit that referenced this pull request May 7, 2020
* [Lens] Type safe migrations

* Commit API changes

* Remove optional chaining for required properties

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request May 8, 2020
…or-part-mvp-2

* 'master' of github.com:elastic/kibana: (259 commits)
  SavedObjects bulkCreate API should return migrationVersion and strip the type & namespace from the id (elastic#65150)
  Drilldown count tooltip (elastic#65105)
  plugins logs start with "plugins." prefix (elastic#65710)
  [ML] Fix pagination reset on search query update. (elastic#65668)
  [SIEM] Add types to the mappings objects so extra keys cannot be introduced
  [apm] Update machine learning flyout and service maps docs (elastic#65517)
  change api endpoint and throw error (elastic#65790)
  [Maps] remove SLA percentage metric (elastic#65718)
  [Reporting] APM integration for baseline performance measurements (elastic#59967)
  fix(NA): noParse regex for windows on kbn optimizer (elastic#65755)
  [ML] DFA: ensure at least one field is included in analysis before job can be created (elastic#65320)
  [Data plugin] cleanup - remove unused getRoutes / routes from indexPattern object (elastic#65683)
  Removed skip to enable test. (elastic#65575)
  [Lens] Type safe migrations (elastic#65576)
  [Canvas] Fix nav link behavior in Canvas  (elastic#65590)
  [Event log] Fix flaky test (elastic#65658)
  [Alerting] changes preconfigured actions config from array to object (elastic#65397)
  remove immediate functions from esqueue worker cycles (elastic#65375)
  [Metrics UI] Fix isAbove to only display when threshold set (elastic#65540)
  draft search profiler accessibility tests (elastic#62357)
  ...

# Conflicts:
#	x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.9.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants