Skip to content

Conversation

@lukeelmers
Copy link
Member

@lukeelmers lukeelmers commented Aug 20, 2020

Closes #46906

Summary

Now that Canvas has removed their dependencies on the legacy Expressions APIs, we are able to remove the unused code from both the client & server, and officially consider the expressions server API "complete".

Changes

  • Removes all __LEGACY APIs from client & server
  • Cleans up public/services.ts by removing unneeded getter/setters
  • Updates mocks
  • Removes bfetch dependency as it is no longer needed
  • Fixes a type error that surfaced in a Canvas test stub due to the removal of bfetch
  • Removes kibana_utils helper createKibanaUtilsCore, which is now no longer being used in the repo

Testing

This PR is simply removing dead code, and therefore introduces no functional changes. Should there be any issues, they would most likely surface in Canvas and be quite obvious.

Dev Docs

The expressions plugin has officially removed its __LEGACY APIs beginning in 7.10, which were designed for internal use in Canvas. In the unlikely event you are relying on anything in the expressions.__LEGACY namespace, you will need to copy the relevant code into your plugin before updating.

Also removed in this change was the createKibanaUtilsCore helper from the kibana_utils plugin, which was only used in the legacy Expressions APIs.

@lukeelmers lukeelmers added release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) technical debt Improvement of the software architecture and operational architecture v8.0.0 Team:AppArch v7.10.0 labels Aug 20, 2020
@lukeelmers lukeelmers requested review from a team as code owners August 20, 2020 03:17
@lukeelmers lukeelmers self-assigned this Aug 20, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@lukeelmers lukeelmers force-pushed the fix/expressions-remove-legacy branch from 980bb21 to 24fe22f Compare August 20, 2020 03:33
Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed this is the only remaining usage of createKibanaUtilsCore in the repo, so I've removed that in this PR as well.

Considering that it isn't used elsewhere and is also based on createGetterSetter which we've been moving away from, I thought it was safe to remove... but please let me know if there's any reason you feel we need to keep it.

@lukeelmers lukeelmers requested a review from poffdeluxe August 20, 2020 03:35
@streamich streamich mentioned this pull request Aug 20, 2020
4 tasks
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
kibanaUtils 188 -2 190

page load bundle size

id value diff baseline
expressions 346.6KB -2.3KB 348.9KB
kibanaUtils 468.1KB -2.5KB 470.6KB
total -4.8KB

History

  • 💔 Build #69282 failed 980bb2111808a9c85a2fa9cb6edacf9bff3dfbfd

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

Copy link
Contributor

@streamich streamich left a comment

Choose a reason for hiding this comment

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

Code LGTM.

Copy link
Contributor

@poffdeluxe poffdeluxe left a comment

Choose a reason for hiding this comment

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

LGTM!

@lukeelmers lukeelmers merged commit 94beed1 into elastic:master Aug 20, 2020
@lukeelmers lukeelmers deleted the fix/expressions-remove-legacy branch August 20, 2020 16:08
lukeelmers added a commit to lukeelmers/kibana that referenced this pull request Aug 20, 2020
thomasneirynck pushed a commit to thomasneirynck/kibana that referenced this pull request Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. technical debt Improvement of the software architecture and operational architecture v7.10.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expressions server-side

5 participants