-
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
Move Rollup out of legacy #62891
Move Rollup out of legacy #62891
Conversation
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
2d780ee
to
29e23ad
Compare
8bee653
to
b861ca8
Compare
Pinging @elastic/kibana-app (Team:KibanaApp) |
- Note incorrect metric type for tracking requests.
…hanced plugin now provides this functionality.
b861ca8
to
bcb526f
Compare
@lukasolson @flash1293 Could you please confirm that the rollup search strategy code I removed in db4c9797f2a0beb4201f9ad732ca55105636e61d hasn't broken anything on the Kibana App side? |
@flash1293 Can you take a look at my changes to the TSVB rollup tests in 5f9937d? These were originally failing because the metric text was 0, instead 3 as expected. What's odd is that as I watched the test run locally I noticed the time field was never being selected -- so I guess the question I have isn't as much what broke, but how were these originally passing? I'll take a look on master to compare behavior. Edit: I checked out master and, yup, something in this PR has changed the way TSVB behaves when consuming rollup data. I'm not familiar enough with TSVB to lend any insight here. |
@lukasolson @flash1293 Sorry for the noise. 😅 I tried reverting my commit that removes the rollup search strategy and that got the tests passing again. So now the only things I need your eyes on are the changes to the rollup search strategy code in the original NP migration commit, 9434083. |
…p search endpoint." This reverts commit 9e190e6.
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.
Tested visualize and TSVB and both still work fine, LGTM. No code review. @lukasolson probably knows better how the search endpoints line up behind the scenes.
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.
Nice work @cjcenizal! Thanks for the detailed PR description - very helpful. I went through all the test cases and everything worked as expected. I left two non-blocker comments. Great to see another plugin 100% migrated 🎉
request: KibanaRequest | ||
): APICaller => { | ||
return rollupEsClient.asScoped(request).callAsCurrentUser; | ||
// return (...args: any[]): APICaller => { |
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.
can this be deleted?
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.
Yes, good spot!
x-pack/plugins/rollup/tsconfig.json
Outdated
@@ -0,0 +1,3 @@ | |||
{ |
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.
is this file necessary?
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
@cjcenizal does this still need to be backported to 7.x? I wasn't able to find a backport PR and my own NP backport conflicts with this, so I'm guessing so. I created #64603 which is likely going to cause a conflict with your eventual 7.x backport (sorry!), but it should just be two lines in x-pack/index.js. |
Thanks for the nudge @rylnd! Looks like I did miss the backport. 🤕 |
This PR complements #21117, in which the client was moved out of legacy. This PR completes the migration by moving the server code out of legacy, too.
Other changes
Per discussion with @lukasolson and @flash1293, I attempted to remove the rollup search strategy code (649b172). This code was deprecated in favor of functionality provided by the
data_enhanced
plugin. However, this ended up breaking some TSVB functional tests so I reverted this change.Reviewing
Reviewing each commit individually might be easier than reviewing the end result. I tried to make each one as atomic as possible. Note that the changes to the rollup search strategy in the first commit can be ignored because this code was removed in a subsequent commit.
Testing
Setup
The pattern for creating a rollup job and rollup index pattern is:
k*
).timestamp
without an@
in the case of web logs).Settings
Set
xpack.rollup.enabled: false
and confirm the app isn't visible in the UI.Create job
Validation
Verify that a validation error tells you when the index pattern doesn't match any indices.
Verify that a validation error tells you when there's a collision between the index pattern and rollup index name.
Verify that a validation error tells you that you need to input a time bucket size.
Review
Verify that the "Request" tab shows you the request you can make to create the rollup job you've configured.
Verify that checking the "Start now" checkbox creates the rollup job in a "Started" state.
Actions
Job configuration
Create a rollup job without terms, histogram, or metrics fields and confirm these tabs aren't visible in the job's detail panel after it's been created.
Missing entity
Open a detail flyout of a rollup job and then edit the URL so that it loads one that doesn't exist. Verify it shows a "not found" message.
Errors
Some of these errors are reproducible through the UI (e.g. creating jobs with name collisions), but some require editing the API code to send incorrect payloads to ES. I don't think reviewers need to test them -- I'm just recording this information to show that I tested these cases and verified that changes to the way the API returns errors haven't broken the way the UI handles them.