-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
[DOCS] Unset machine learning upgrade mode #39149
Conversation
Pinging @elastic/ml-core |
[source,js] | ||
-------------------------------------------------- | ||
POST /_ml/set_upgrade_mode?enabled=false |
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.
I think we'd be better off clearing this with // TEARDOWN
in this case. Another option would be to teach ESRestTestCase
to clear it between tests, but I don't think that is needed here because we don't commonly set this in tests.
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.
Thanks @nik9000 I've made that change
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.
I think we need POST /_ml/set_upgrade_mode?enabled=true
to still be a user visible snippet. Only POST /_ml/set_upgrade_mode?enabled=false
should be a secret TEARDOWN
snippet. (I guess this is also complicated because close-ml.asciidoc
gets included in other docs files, and I'm not sure how the TEARDOWN
s interact when there are inclusions.)
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.
@droberts195 You can preview the changes here:
The snippet is still visible; have I misunderstood your concern?
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.
Sorry, yes, the preview looks fine.
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
@@ -25,8 +25,9 @@ prevent new jobs from opening, use the <<ml-set-upgrade-mode,set upgrade mode AP | |||
POST _ml/set_upgrade_mode?enabled=true | |||
-------------------------------------------------- | |||
// CONSOLE | |||
// TEARDOWN |
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.
I think this transforms this snippet from a test into a thing that modifies tests on this page. But there aren't tests on this page. So I think this just makes this snippet not run.
I think something like
////////////
Take us out of upgrade mode after running any snippets on this page.
[source,js]
--------------------------------------------------
POST _ml/set_upgrade_mode?enabled=false
--------------------------------------------------
// CONSOLE
// TEARDOWN
////////////
Will run the snippet and always clean up.
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.
❤️
Related to #38876 and #38993
This PR makes the close-ml.asciidoc file set upgrade mode to false before it finishes.