Skip to content
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 license constants from /server to /common #32723

Merged
merged 4 commits into from
Mar 8, 2019

Conversation

jen-huang
Copy link
Contributor

This PR moves license constants from server directory to common and exports a new typing, LicenseType. I used the new typing for the new snapshot and restore plugin boilerplate, but it felt disjointed from the rest of the license constants, and it felt wrong to import from server for non-server usages. Moving everything to common will let us use license exports everywhere.

@jen-huang jen-huang added Feature:License v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.2.0 labels Mar 7, 2019
@jen-huang jen-huang requested a review from cjcenizal March 7, 2019 23:09
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Code LGTM! Didn't test locally.

@@ -4,15 +4,25 @@
* you may not use this file except in compliance with the Elastic License.
*/

export const LICENSE_TYPE_OSS = 'oss';
Copy link
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity, how is it possible for there to be an OSS license type if the OSS distribution ships without X-Pack?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it is possible 🙂 I added this for the sake of completeness, and because I saw oss included in a similar export from beats management

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 I think it might be worth checking in with them and making sure that wasn't a mistake, so we can avoid propagating it if it was.

Copy link
Contributor Author

@jen-huang jen-huang Mar 7, 2019

Choose a reason for hiding this comment

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

I just checked with @mattapperson and oss was included intentionally at the time to support a "read only" mode if the user downgrades. however, plans for that support haven't really moved, so it's not necessary to declare oss here for the time being. we can always add it when it's actually needed. thanks for calling this out, @cjcenizal, I've pushed an update that removes the oss declaration

export const LICENSE_TYPE_BASIC = 'basic';
export const LICENSE_TYPE_STANDARD = 'standard';
export const LICENSE_TYPE_GOLD = 'gold';
export const LICENSE_TYPE_PLATINUM = 'platinum';
export const LICENSE_TYPE_TRIAL = 'trial';

export type LicenseType =
Copy link
Contributor

Choose a reason for hiding this comment

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

This is cool! I just learned something new.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@jen-huang jen-huang merged commit 7afd091 into elastic:master Mar 8, 2019
@jen-huang jen-huang deleted the fix/license-const-common branch March 8, 2019 04:55
jen-huang added a commit to jen-huang/kibana that referenced this pull request Mar 8, 2019
* Move license constants to /common

* Fix export

* Use constant for required license type

* Remove OSS from license types
jen-huang added a commit that referenced this pull request Mar 8, 2019
* Move license constants to /common

* Fix export

* Use constant for required license type

* Remove OSS from license types
@cjcenizal cjcenizal added the non-issue Indicates to automation that a pull request should not appear in the release notes label May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:License non-issue Indicates to automation that a pull request should not appear in the release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants