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

CI Reporter for saved objects field count #70580

Merged
merged 13 commits into from
Jul 7, 2020

Conversation

rudolf
Copy link
Contributor

@rudolf rudolf commented Jul 2, 2020

Summary

Introduces CI metrics for Saved Object field count broken down by Saved Object type. This will help teams review the impact their PR has on the field count and allow us to track this metric over time.

Known limitations:

  • New plugins are often developed behind a "feature flag" by setting the plugin's enabled config to default to false. Fields contributed by these plugins won't show up in these metrics. We will need a way to start Kibana with all discovered plugins enabled which would either require moving this to a jest_integration test using test_utils and internal API's or exposing a command line flag.
  • These numbers should be considered as a reference point only. Saved Objects should reduce the migrationVersion field count #70815 Can introduce an additional ~114 fields and if users have upgraded from older versions of Kibana they can have additional fields on their .kibana that's not present when testing a clean index Saved Object Migrations should clean up unused mappings #67086.

Checklist

For maintainers

@rudolf rudolf added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:Saved Objects v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.9.0 labels Jul 2, 2020
@rudolf rudolf force-pushed the so-field-count-ci-reporter branch from 3d78ad8 to e09c77b Compare July 2, 2020 12:08
@rudolf rudolf marked this pull request as ready for review July 3, 2020 14:09
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@rudolf rudolf requested a review from spalger July 3, 2020 16:39
@spalger
Copy link
Contributor

spalger commented Jul 3, 2020

@elasticmachine merge upstream

@spalger
Copy link
Contributor

spalger commented Jul 4, 2020

Would be really cool if we could attribute unique fields to a specific plugin and shared fields separately...

@rudolf
Copy link
Contributor Author

rudolf commented Jul 6, 2020

Would be really cool if we could attribute unique fields to a specific plugin and shared fields separately...

Yeah, as a first step we could track unique fields per type which would allow us to infer the plugin that added these.


await Promise.all(
fieldCountPerType
.sort((a, b) => a[0].localeCompare(b[0]))
Copy link
Contributor

Choose a reason for hiding this comment

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

We also sort things server-side

@rudolf
Copy link
Contributor Author

rudolf commented Jul 7, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

Saved Objects .kibana field count

id value diff baseline
action 5 +5 -
action_task_params 3 +3 -
alert 22 +22 -
apm-indices 8 +8 -
apm-telemetry 238 +238 -
application_usage_transactional 2 +2 -
canvas-element 8 +8 -
canvas-workpad 5 +5 -
canvas-workpad-template 8 +8 -
cases 32 +32 -
cases-comments 17 +17 -
cases-configure 14 +14 -
cases-user-actions 10 +10 -
config 2 +2 -
dashboard 17 +17 -
endpoint:user-artifact 10 +10 -
endpoint:user-artifact-manifest 3 +3 -
epm-packages 8 +8 -
exception-list 35 +35 -
exception-list-agnostic 35 +35 -
file-upload-telemetry 2 +2 -
fleet-agent-actions 6 +6 -
fleet-agent-events 11 +11 -
fleet-agents 23 +23 -
fleet-enrollment-api-keys 10 +10 -
graph-workspace 9 +9 -
index-pattern 10 +10 -
infrastructure-ui-source 21 +21 -
ingest_manager_settings 5 +5 -
ingest-agent-configs 11 +11 -
ingest-outputs 10 +10 -
ingest-package-configs 35 +35 -
inventory-view 40 +40 -
kql-telemetry 3 +3 -
lens 7 +7 -
lens-ui-telemetry 5 +5 -
map 7 +7 -
metrics-explorer-view 22 +22 -
ml-telemetry 3 +3 -
namespace 1 +1 -
namespaces 1 +1 -
query 6 +6 -
references 4 +4 -
sample-data-telemetry 3 +3 -
search 9 +9 -
siem-detection-engine-rule-actions 8 +8 -
siem-detection-engine-rule-status 12 +12 -
siem-ui-timeline 86 +86 -
siem-ui-timeline-note 8 +8 -
siem-ui-timeline-pinned-event 7 +7 -
space 9 +9 -
telemetry 9 +9 -
timelion-sheet 13 +13 -
tsvb-validation-telemetry 2 +2 -
type 1 +1 -
ui-metric 2 +2 -
updated_at 1 +1 -
upgrade-assistant-reindex-operation 15 +15 -
upgrade-assistant-telemetry 13 +13 -
uptime-dynamic-settings 4 +4 -
url 6 +6 -
visualization 9 +9 -
total - +951 -

History

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

@rudolf rudolf merged commit 2f905e7 into elastic:master Jul 7, 2020
@rudolf rudolf deleted the so-field-count-ci-reporter branch July 7, 2020 14:53
rudolf added a commit to rudolf/kibana that referenced this pull request Jul 7, 2020
* CI Reporter for saved objects field count

* Metrics needs to be an array

* Fix type failures

* Link to field count issue

* Revert "Link to field count issue"

This reverts commit 8c0126b.

* Break down field count per type

* Don't log total metric as metrics report already calculates this

* Add saved objects field count ci metrics test to codeowners

* Address review comments

* Add field count CI metrics for disabled plugins

Co-authored-by: Elastic Machine <[email protected]>
# Conflicts:
#	.github/CODEOWNERS
rudolf added a commit that referenced this pull request Jul 7, 2020
* CI Reporter for saved objects field count (#70580)

* CI Reporter for saved objects field count

* Metrics needs to be an array

* Fix type failures

* Link to field count issue

* Revert "Link to field count issue"

This reverts commit 8c0126b.

* Break down field count per type

* Don't log total metric as metrics report already calculates this

* Add saved objects field count ci metrics test to codeowners

* Address review comments

* Add field count CI metrics for disabled plugins

Co-authored-by: Elastic Machine <[email protected]>
# Conflicts:
#	.github/CODEOWNERS

* Don't backport CODEOWNERS file to 7.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Saved Objects release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants