Skip to content

[ML] Adding cloud trial end date to ml info #144793

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

Conversation

jgowdyelastic
Copy link
Member

@jgowdyelastic jgowdyelastic commented Nov 8, 2022

Adds a isCloudTrial flag to ML's /api/ml/info endpoint.
If xpack.cloud.trial_end_date is set in the kibana config and it is greater than the current time, we can assume that we're currently in a could trial.
If xpack.cloud.trial_end_date is not set, isCloudTrial is not added to the endpoint response. This is the same behaviour as the cloudId property.

Adds a isCloudTrial() function to our server info util functions which can be used in conjunction with our isCloud() function.

To test, these cloud settings can be added to the kibana config:

xpack.cloud.id: 'cloud_message_test:ZXUtd2VzdC0yLmF3cy5jbG91ZC5lcy5pbyQ4NWQ2NjZmMzM1MGM0NjllOGMzMjQyZDc2YTdmNDU5YyQxNmI1ZDM2ZGE1Mzk0YjlkYjIyZWJlNDk1OWY1OGQzMg=='
xpack.cloud.trial_end_date: '2022-11-20T09:39:52.554Z'

@jgowdyelastic jgowdyelastic added non-issue Indicates to automation that a pull request should not appear in the release notes :ml release_note:skip Skip the PR/issue when compiling release notes ci:cloud-deploy Create or update a Cloud deployment v8.6.0 labels Nov 8, 2022
@jgowdyelastic jgowdyelastic self-assigned this Nov 8, 2022
@jgowdyelastic jgowdyelastic marked this pull request as ready for review November 9, 2022 09:57
@jgowdyelastic jgowdyelastic requested a review from a team as a code owner November 9, 2022 09:57
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@kibana-ci
Copy link
Collaborator

kibana-ci commented Nov 9, 2022

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
ml 3.3MB 3.3MB +363.0B
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 108 113 +5
securitySolution 440 446 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 67 73 +6
osquery 109 115 +6
securitySolution 517 523 +6
total +20

History

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

cc @jgowdyelastic

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM! Would be great to extend to the KibanaContextProvider with this info as well

@jgowdyelastic
Copy link
Member Author

LGTM! Would be great to extend to the KibanaContextProvider with this info as well

Yes, that's a good idea. Outside of the scope of this PR, but I can add it in a follow up.

@jgowdyelastic jgowdyelastic merged commit bfa1a7f into elastic:main Nov 9, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:cloud-deploy Create or update a Cloud deployment :ml non-issue Indicates to automation that a pull request should not appear in the release notes release_note:skip Skip the PR/issue when compiling release notes v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants