-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Maps] Fix regression preventing maps telemetry from populating & remove task manager logic #52834
[Maps] Fix regression preventing maps telemetry from populating & remove task manager logic #52834
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
…-from-maps-telemetry
…ormal' (not using task mgr state)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! it seems that the api integration test is failing. Since the data is pulled from a saved object maybe you'd need to make sure that the saved object is being populated first in the test (populate the saved object via api)
…-from-maps-telemetry # Conflicts: # x-pack/legacy/plugins/maps/server/plugin.js
@Bamieh Thanks! Seems like it was referencing "maps" instead of "maps-telemetry" as it should've (oops). We'll see shortly! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion with @aaronjcaldwell, will investigate if the fix for the regression can be extracted in a separate PR.
This PR includes np-changes that can't be backported to a 7.5 patch release and will cause merge conflicts on the 7.5 branch. These merge conflicts would require fixing the regression without the np-changes anyway for 7.5. So instead of having to do this ad-hoc fix as the result of a failed backport, it might be cleaner to split this PR in two separate PRs ((1) fix regression->backport to 7.5/7.x and (2) np-changes ->backport to 7.x).
After discussion, this PR is blocked by #53803 |
There were a number of other improvements I snuck in initially, but after some offline discussion I've backed those out and will handle in a separate PR. The changes in this PR are specifically aimed at removing the Task Manager logic, which imho is the correct solution here. The original issues stemmed from async task initialization, an alternative fix was proposed here. While a version of that fix might work, it still leaves the app vulnerable to task manager issues without conferring any of task manager's original benefit for maps (i.e.- the ability to leverage task manager state which we no longer need). Basically, this PR fixes the regression by removing the thing that broke (task initialization) and greatly simplifying Maps telemetry to be inline with the majority of other Kibana apps without compromising any of its capabilities. |
💚 Build SucceededTo update your PR or re-run it, just comment with: |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this looks really great, in the sense that it removes a lot of code.
But I am having trouble to evaluate this, so it might help if somebody with more telemetry knowledge can review this as well.
Also, for the backport to 7.5, let's not merge this into 7.5 before that backport-PR has been reviewed explicitly against the 7.5 branch, given that it introduces a new architecture for collecting the telemetry.
x-pack/legacy/plugins/maps/server/maps_telemetry/maps_telemetry.js
Outdated
Show resolved
Hide resolved
x-pack/legacy/plugins/maps/server/maps_telemetry/maps_usage_collector.test.js
Show resolved
Hide resolved
…-from-maps-telemetry
…ronjcaldwell/kibana into remove-task-logic-from-maps-telemetry
@Bamieh Would you mind giving this one another pass? Since we've both removed task manager and made some telemetry changes, would be great to get your eyes on it again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code changes LGTM!
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…ove task manager logic (elastic#52834) * Remove task logic. Remove server refs and revise for np. Migrate a few files to ts * Remove unused reference * Update mappings * Test usage collector register * Update api integration tests to include maps now that telemetry is 'normal' (not using task mgr state) * Update integration test to use stack stats * Update integration test to look for 'maps-telemetry' instead of 'maps' * Update jest test to reflect calls to register * Follow the same pattern as other int tests and test reliable nested attribute * Back out np-related changes for separate PR * timeCaptured hasn't changed but for some reason stopped working. Getting iso string fixes issue * Back out file shuffling for separate PR * Remove mappings updates (handled in separate PR) * Review feedback. Move telemetry type constant to constants file * Consolidate imports * Linting fix Co-authored-by: Elastic Machine <[email protected]>
…ove task manager logic (elastic#52834) * Remove task logic. Remove server refs and revise for np. Migrate a few files to ts * Remove unused reference * Update mappings * Test usage collector register * Update api integration tests to include maps now that telemetry is 'normal' (not using task mgr state) * Update integration test to use stack stats * Update integration test to look for 'maps-telemetry' instead of 'maps' * Update jest test to reflect calls to register * Follow the same pattern as other int tests and test reliable nested attribute * Back out np-related changes for separate PR * timeCaptured hasn't changed but for some reason stopped working. Getting iso string fixes issue * Back out file shuffling for separate PR * Remove mappings updates (handled in separate PR) * Review feedback. Move telemetry type constant to constants file * Consolidate imports * Linting fix Co-authored-by: Elastic Machine <[email protected]>
…ove task manager logic (#52834) (#54051) * Remove task logic. Remove server refs and revise for np. Migrate a few files to ts * Remove unused reference * Update mappings * Test usage collector register * Update api integration tests to include maps now that telemetry is 'normal' (not using task mgr state) * Update integration test to use stack stats * Update integration test to look for 'maps-telemetry' instead of 'maps' * Update jest test to reflect calls to register * Follow the same pattern as other int tests and test reliable nested attribute * Back out np-related changes for separate PR * timeCaptured hasn't changed but for some reason stopped working. Getting iso string fixes issue * Back out file shuffling for separate PR * Remove mappings updates (handled in separate PR) * Review feedback. Move telemetry type constant to constants file * Consolidate imports * Linting fix Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
… & remove task manager logic (#52834) (#54055) * [Maps] Fix regression preventing maps telemetry from populating & remove task manager logic (#52834) * Remove task logic. Remove server refs and revise for np. Migrate a few files to ts * Remove unused reference * Update mappings * Test usage collector register * Update api integration tests to include maps now that telemetry is 'normal' (not using task mgr state) * Update integration test to use stack stats * Update integration test to look for 'maps-telemetry' instead of 'maps' * Update jest test to reflect calls to register * Follow the same pattern as other int tests and test reliable nested attribute * Back out np-related changes for separate PR * timeCaptured hasn't changed but for some reason stopped working. Getting iso string fixes issue * Back out file shuffling for separate PR * Remove mappings updates (handled in separate PR) * Review feedback. Move telemetry type constant to constants file * Consolidate imports * Linting fix Co-authored-by: Elastic Machine <[email protected]> * Revise test for 7.5 (pre-NP changes) compat * Linting Co-authored-by: Elastic Machine <[email protected]>
Resolves #53809. Following up on offline discussion started as a result of #52439. Changes made in this PR:
Testing this PR:
http://localhost:5601/<dev url prefix>/api/stats?extended=true
). It usually takes a minute or 2 after starting Kibana for this to be available. The result should look something like this:This PR was also tested to ensure telemetry wasn't querying Elasticsearch more than expected with the removal of task manager since it used to be every 10 seconds. To confirm:
maps_telemetry.js > getMapsTelemetry()