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

[Index Patterns] Move rollup config to index pattern management #102145

Merged

Conversation

mattkime
Copy link
Contributor

@mattkime mattkime commented Jun 14, 2021

Summary

TLDR; Removing rollup plugin's dependence on the indexPatternManagment plugin will allow the (in progress) indexPatternEditor plugin to determine if the rollup plugin is active, otherwise there's a circular dependency. This is also tech debt reduction.

Refactor index pattern creation code so its all within the index pattern management plugin. Previously rollup related code was in the rollup plugin since it was an x-pack feature. We're no longer creating one off APIs to maintain the distinction between x-pack features and OSS code.

@mattkime mattkime changed the title move rollup config to index pattern management [Index Patterns] Move rollup config to index pattern management Jun 15, 2021
@mattkime mattkime marked this pull request as ready for review June 15, 2021 02:24
@mattkime mattkime requested a review from a team as a code owner June 15, 2021 02:24
@mattkime mattkime added release_note:skip Skip the PR/issue when compiling release notes v8.0.0 v7.14.0 Team:AppServices labels Jun 15, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@mattkime mattkime added Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Rollups labels Jun 15, 2021
@@ -8,3 +8,5 @@

export { IndexPatternCreationConfig, IndexPatternCreationOption } from './config';
export { IndexPatternCreationManager } from './manager';
// @ts-ignore
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rollups had two js files that I'd prefer not to convert to typescript at this point. There are plans for rollup improvements that would make these files unnecessary.

* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This value is duplicated from the rollup plugin. I thought it would be better than creating a dependency but open to discuss.

Copy link
Contributor

@cjcenizal cjcenizal 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! I think that removing this indirection and the dependency of rollups upon index pattern management makes the code easier to understand. I haven't tested locally so I'm assuming you verified that rollup index patterns can still be created, edited, and listed.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
indexPatternManagement 162 167 +5
rollup 169 165 -4
total +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
indexPatternManagement 45 0 -45

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
rollup 230.2KB 230.2KB +9.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
indexPatternManagement 3 0 -3

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
indexPatternManagement 12.9KB 19.5KB +6.6KB
rollup 40.8KB 33.8KB -7.0KB
total -423.0B
Unknown metric groups

API count

id before after diff
indexPatternManagement 45 0 -45

References to deprecated APIs

id before after diff
indexPatternManagement 68 0 -68

History

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

@mattkime mattkime added the auto-backport Deprecated - use backport:version if exact versions are needed label Jun 15, 2021
@mattkime mattkime merged commit f1b6fe0 into elastic:master Jun 15, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 15, 2021
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 17, 2021
@mattkime mattkime removed the auto-backport Deprecated - use backport:version if exact versions are needed label Jun 17, 2021
@mattkime mattkime added the backport:skip This commit does not require backporting label Jun 17, 2021
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Rollups release_note:skip Skip the PR/issue when compiling release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants