Skip to content

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Dec 10, 2018

Redeprecates the /_xpack/rollup endpoints in favor of /_rollup.

When we cleanup the rollup in a cluster containing 6.x nodes we need to
use /_xpack/rollup instead of /_rollup because the 6.x nodes don't
know about /_rollup. In those cases we must ignore the deprecation
warnings that the 7.0 node will return for the end point.

Closes #36044

When we cleanup the rollup in a cluster containing 6.x nodes we need to
use `/_xpack/rollup` instead of `/_rollup` because the 6.x nodes don't
know about `/_rollup`. In those cases we must ignore the deprecation
warnings that the 7.0 node will return for the end point.

Closes elastic#36044
@nik9000 nik9000 added v7.0.0 :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data labels Dec 10, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

@nik9000
Copy link
Member Author

nik9000 commented Dec 10, 2018

@jasontedor I see that you made non-_xpack rollup endpoints in another PR. Would you like for me to deprecate the _xpack endpoints as part of this one?

@jasontedor
Copy link
Member

Yes please, sorry for the conflicts.

@nik9000
Copy link
Member Author

nik9000 commented Dec 10, 2018

Yes please, sorry for the conflicts.

Will do! Conflicts happen.

@nik9000
Copy link
Member Author

nik9000 commented Dec 10, 2018

So now that I've merged this I'm not sure that I need the warnings work.... Let me check if I can drop that.

@nik9000
Copy link
Member Author

nik9000 commented Dec 10, 2018

So now that I've merged this I'm not sure that I need the warnings work.... Let me check if I can drop that.

Yes indeed. I can just revert all of that. We don't need it now.

@jasontedor
Copy link
Member

@elasticmachine test this please

@Override
public String getName() {
return "rollup_delete_job_action";
return "delete_rollup_job";
Copy link
Member Author

Choose a reason for hiding this comment

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

I've noticed a few of these changes that came along with my unrevert. Are these changes compatible with a mixed version cluster?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a good question... I'm not sure. I don't really know how REST request names are used (or if they are just for display/task purposes?)

Copy link
Member

Choose a reason for hiding this comment

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

They are used in the usage API, and ultimately intended to be surfaced in telemetry. In the long run, I want to open a change to derive the name from the class name and remove all these overrides, so in these changes I have been aligning these with that intended change, and removing "xpack" from the names in places where they exist. I am not worried about BWC during a rolling upgrade.

final Request getRollupJobRequest = new Request("GET", "_xpack/rollup/job/" + rollupJob);
final Request getRollupJobRequest;
if (isRunningAgainstOldCluster()) {
getRollupJobRequest = new Request("GET", "/_xpack/rollup/job/" + rollupJob);
Copy link
Member Author

Choose a reason for hiding this comment

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

These are required because we can do a full cluster restart against versions that don't have the new endpoint.

@nik9000 nik9000 changed the title WIP: Re-deprecate xpack rollup endpoints Dec 11, 2018
@nik9000
Copy link
Member Author

nik9000 commented Dec 11, 2018

This is ready for review so I've removed WIP.

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

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

Looks good. Sorry about the deprecation work/unwork; it didn't occur to me until looking at the problems that the security and ML work that we had another way to approach this that could be cleaner and avoid the difficulties we were initially trying to work around here.

@nik9000
Copy link
Member Author

nik9000 commented Dec 11, 2018

Looks good. Sorry about the deprecation work/unwork; it didn't occur to me until looking at the problems that the security and ML work that we had another way to approach this that could be cleaner and avoid the difficulties we were initially trying to work around here.

We're going to need to do some work on deprecation when we go to remove the old APIs in master. But we should have the tools that we need for that already available then so it'll be easier.

Copy link
Contributor

@polyfractal polyfractal left a comment

Choose a reason for hiding this comment

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

LGTM, although I'm not sure about your question re: names. Left a question/comment about the rolling restart tests.


* {ref}/rollup-get-rollup-caps.html[GET /_xpack/rollup/data/<index_pattern+++>/_rollup_caps+++]: Get Rollup Capabilities
* {ref}/rollup-get-rollup-caps.html[GET /_rollup/data/<index_pattern+++>/_rollup_caps+++]: Get Rollup Capabilities
* {ref}/rollup-get-rollup-index-caps.html[GET /<index_name+++>/_rollup/data/+++]: Get Rollup Index Capabilities
Copy link
Contributor

Choose a reason for hiding this comment

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

Heh, accidental typo becomes the correct endpoint XD

@Override
public String getName() {
return "rollup_delete_job_action";
return "delete_rollup_job";
Copy link
Contributor

Choose a reason for hiding this comment

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

That's a good question... I'm not sure. I don't really know how REST request names are used (or if they are just for display/task purposes?)


// create the rollup job
final Request createRollupJobRequest = new Request("PUT", "/_xpack/rollup/job/rollup-id-test");
final Request createRollupJobRequest = new Request("PUT", "/_rollup/job/rollup-id-test");
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not entirely sure how rolling upgrade tests pick their versions, but couldn't we go from < 6.6 to >= 6.6, <7.0? In which case we'll need an assumeTrue() on this test, or some kind of version check on these URIs?

Copy link
Member Author

Choose a reason for hiding this comment

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

The rolling upgrade tests only go through the wire compatible versions so this should be safe.

@nik9000 nik9000 merged commit 03daad9 into elastic:master Dec 12, 2018
@jasontedor
Copy link
Member

Thank you @nik9000!

@nik9000
Copy link
Member Author

nik9000 commented Dec 12, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker >deprecation :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data v7.0.0-beta1
5 participants