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

Added CITs for Circle processor. #101871

Closed
wants to merge 84 commits into from

Conversation

cuff-links
Copy link
Contributor

@cuff-links cuff-links commented Jun 10, 2021

Closes #100106

Summary

This PR is to add test coverage for the Ingest Pipelines Circle Processor.

Test cases being covered

  1. Prevents submission 0/2 required fields given.
  2. Saves processor with default options
  3. Saves processor with setting optional options.

@cuff-links cuff-links requested a review from a team as a code owner June 10, 2021 10:23
@cuff-links cuff-links added release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v7.14.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Jun 10, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-management (Team:Stack Management)

@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream

@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream


expect(processors[0].circle).toEqual({
field: 'field_1',
error_distance: 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed that error_distance has a default value of 1 in the UI, but it's not mentioned in the docs. I think if error_distance doesn't have a default, then its input field should rather stay empty and force the user to set a value. We might need a bug issue for that, but I'd like to confirm with @alisonelizabeth first.

Copy link
Contributor

@alisonelizabeth alisonelizabeth Jun 14, 2021

Choose a reason for hiding this comment

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

Great catch @yuliacech! I didn't notice your review until after mine (I left a similar comment) 😄.

@danhermann can you help us understand how the error_distance option should behave for the circle processor? The docs don't mention any default value, but we provide a default value of 1 in the UI. Does this make sense, or should we always force the user to provide their own value?

Choose a reason for hiding this comment

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

I don't know enough about how the underlying circle shape works to know whether a default value (perhaps scaled by the radius of the circle) for error_distance would make sense there or not. Perhaps someone from @elastic/es-analytics-geo make a suggestion?

Copy link
Contributor

Choose a reason for hiding this comment

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

A default value would only make sense if it is scaled to the radius of a circle. Unfortunately, we are setting up processor at this point and have no information about what type of circles the user is going to ingest. So, I think it would be the best to leave it blank.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @imotov for clarifying! I opened #102147 to address on our side.

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Nice work @cuff-links! LGTM. I left one nit as well as a comment on how the error_distance option should behave.

Maja Grubic and others added 8 commits June 15, 2021 18:01
* [Discover] Render empty embeddable

* First version of grid embeddable

* More search embeddable

* Almost stable version

* Fixing typescript errors

* Fixing filtering and sorting

* Add data-shared-item to DiscoverGridEmbeddable

* Trigger rerender when title changes

* Fixing incorrectly touched files

* Remove search_embeddable

* Remove lodash

* Fixing imports

* Minor fixes

* Removing unnecessary files

* Minor fix

* Remove unused import

* Applying PR comments

* Applying PR comments

* Removing search embeddable

* Fix missing import

* Addressing PR comments

* Do not memoize saved search component

* Applying Matthias's suggestion

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fixes filter is applied even if is disabled on a dashboard

* Fix 18n problem

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…rtifacts (elastic#101379)

* Removes zlib compression when creating artifacts. Also fixes related unit tests and removes old code

* Replaces artifact in new manifest using the ones from fleet client with zlip compression

* Fixes create_policy_artifact_manifest pushArtifacts missing new manifest. Also fixes unit tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…elastic#101963)

Co-authored-by: Shahzad <shahzad31comp@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [ML] Switching to new datafeed preview

* fixing wizard test button

* adding schema validator

* fixing tests

* adding check for empty detectors list

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* feat: 🎸 create management app locator

* refactor: 💡 simplify management locator

* feat: 🎸 export management app locator from plugin contract

* feat: 🎸 improve share plugin exports

* test: 💍 fix test mock

* test: 💍 adjust test mocks

* Update src/plugins/management/public/plugin.ts

Co-authored-by: Tim Roes <mail@timroes.de>

* Update src/plugins/management/public/types.ts

Co-authored-by: Tim Roes <mail@timroes.de>

* Update src/plugins/management/public/types.ts

Co-authored-by: Tim Roes <mail@timroes.de>

* Update src/plugins/management/server/plugin.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tim Roes <mail@timroes.de>
@cuff-links cuff-links requested a review from a team as a code owner June 15, 2021 22:01
@cuff-links cuff-links requested review from a team June 15, 2021 22:01
@cuff-links cuff-links requested review from a team as code owners June 15, 2021 22:01
@cuff-links cuff-links requested a review from a team June 15, 2021 22:01
@cuff-links cuff-links requested review from a team as code owners June 15, 2021 22:01
@cuff-links cuff-links requested a review from a team June 15, 2021 22:01
@botelastic botelastic bot added Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability labels Jun 15, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@cuff-links
Copy link
Contributor Author

Something went wrong here and will be reissuing this PR.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1600 1534 -66
canvas 1089 1090 +1
discover 377 368 -9
enterpriseSearch 1423 1438 +15
esUiShared 152 153 +1
fleet 475 476 +1
indexManagement 517 518 +1
indexPatternManagement 162 167 +5
infra 967 902 -65
lens 687 689 +2
management 34 35 +1
ml 1698 1699 +1
newsfeed 14 15 +1
observability 313 241 -72
osquery 151 212 +61
rollup 169 165 -4
securitySolution 2242 2181 -61
uptime 614 553 -61
visTypeTagcloud 30 24 -6
total -254

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
core 1052 1053 +1
data 3266 3270 +4
esUiShared 86 88 +2
expressions 1467 1469 +2
fleet 1006 1010 +4
indexPatternManagement 45 0 -45
lens 161 162 +1
management 38 39 +1
observability 195 198 +3
screenshotMode 16 17 +1
share 61 68 +7
total -19

Async chunks

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

id before after diff
apm 4.3MB 4.2MB -23.2KB
canvas 1.3MB 1.3MB +1.2KB
crossClusterReplication 293.5KB 294.2KB +714.0B
dashboard 221.4KB 222.1KB +714.0B
dataEnhanced 159.6KB 158.9KB -707.0B
discover 426.8KB 416.9KB -9.8KB
enterpriseSearch 2.1MB 2.1MB +5.4KB
fileUpload 784.8KB 787.6KB +2.8KB
fleet 710.7KB 704.9KB -5.8KB
graph 1.1MB 1.1MB +714.0B
indexLifecycleManagement 249.2KB 248.6KB -560.0B
indexManagement 1.3MB 1.3MB +3.6KB
indexPatternManagement 552.8KB 550.9KB -1.9KB
infra 1.8MB 1.7MB -25.7KB
ingestPipelines 687.5KB 687.2KB -330.0B
lens 1.4MB 1.5MB +26.2KB
licenseManagement 123.3KB 124.0KB +714.0B
maps 2.6MB 2.6MB +1.5KB
ml 5.9MB 5.9MB +1.3KB
observability 483.6KB 451.3KB -32.3KB
osquery 810.5KB 840.7KB +30.2KB
remoteClusters 163.8KB 162.9KB -841.0B
reporting 33.7KB 33.1KB -605.0B
rollup 229.5KB 230.2KB +723.0B
security 782.3KB 782.3KB +67.0B
securitySolution 6.9MB 6.9MB -10.3KB
snapshotRestore 459.5KB 458.9KB -595.0B
stackAlerts 662.9KB 663.1KB +187.0B
uptime 1.1MB 1.1MB -15.2KB
visTypeTagcloud 268.6KB 17.8KB -250.8KB
total -302.8KB

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
management 4 5 +1
share 4 6 +2
total -0

Page load bundle

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

id before after diff
core 410.5KB 410.7KB +199.0B
data 840.1KB 840.3KB +238.0B
discover 74.5KB 74.7KB +227.0B
esUiShared 189.8KB 191.8KB +2.0KB
expressions 202.7KB 202.8KB +80.0B
fleet 434.8KB 435.8KB +1.0KB
indexPatternManagement 12.9KB 19.5KB +6.6KB
infra 140.6KB 141.3KB +720.0B
ingestPipelines 23.7KB 23.5KB -152.0B
kbnUiSharedDeps-elastic 2.6MB 2.6MB +3.3KB
kbnUiSharedDeps-js 6.4MB 6.4MB +87.0B
lens 38.1KB 40.0KB +1.9KB
management 15.6KB 16.2KB +678.0B
ml 66.1KB 65.8KB -262.0B
newsfeed 18.1KB 18.4KB +365.0B
observability 52.3KB 52.7KB +426.0B
osquery 13.4KB 13.6KB +124.0B
rollup 40.8KB 33.8KB -7.0KB
screenshotMode 3.2KB 3.5KB +366.0B
share 71.3KB 71.8KB +599.0B
snapshotRestore 40.6KB 40.9KB +370.0B
visTypeTagcloud 15.6KB 14.4KB -1.2KB
total +10.5KB
Unknown metric groups

API count

id before after diff
core 2275 2276 +1
data 3827 3831 +4
esUiShared 88 90 +2
expressions 1894 1896 +2
fleet 1096 1101 +5
indexPatternManagement 45 0 -45
lens 172 174 +2
management 38 39 +1
observability 195 198 +3
screenshotMode 21 22 +1
share 67 85 +18
total -6

async chunk count

id before after diff
discover 7 8 +1
lens 2 3 +1
observability 5 7 +2
osquery 3 4 +1
visTypeTagcloud 1 2 +1
total +6

References to deprecated APIs

id before after diff
indexPatternManagement 68 0 -68
observability 16 12 -4
stackAlerts 101 104 +3
total -69

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Feature:Ingest Node Pipelines Ingest node pipelines management release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Client Integration Test for The Circle Processor