-
Notifications
You must be signed in to change notification settings - Fork 4.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
Change the license to use the new endpoint and format #15091
Conversation
1. Use the `_license` endpoint instead of using the `/_xpack` 2. Remove the `features` handling. 3. Add more golden files for the different returned format.
"github.com/elastic/beats/libbeat/logp" | ||
"github.com/elastic/beats/libbeat/outputs/elasticsearch" | ||
) | ||
|
||
const xPackURL = "/_xpack" | ||
const xPackURL = "/_license" |
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.
hm... would it make sense to be BC compatible and set the URL based on the ES version reported by the ES Client?
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.
Both endpoint answer on 7.x series for Elastic Licensed ES so I don't think it's necessary to have it backward compatible. Also we only added this checin in 7.x.
This PR removes quite some code. What is the motivation and actual impact of removing the license manager and watcher? |
Only functionbeat was actually using the Watcher/License manager and when we added Logstash back to the supported output we normalized the check to use the same between all the x-pack code which is just using a client calback. It requires one call but simplifies the logic on all the Elastic licensed beats. This move effectively made the Watcher and the Manager class unused/dead code. So I think it's better if we just remove it. If needed we can always ressurect it. |
* Change the license to use the new endpoint and format 1. Use the `_license` endpoint instead of using the `/_xpack` 2. Remove the `features` handling. 3. Add more golden files for the different returned format. 4. remove unused files and code (cherry picked from commit 556e8ff)
* Change the license to use the new endpoint and format 1. Use the `_license` endpoint instead of using the `/_xpack` 2. Remove the `features` handling. 3. Add more golden files for the different returned format. 4. remove unused files and code (cherry picked from commit 556e8ff)
testing license-related check is not a simple task when its not "trial" or "basic", in the linked private issues there are test servers that @bytebilly has created with credentials to be able to tested with a real server. The other way is to use the generated license in the private repository with dev artifact to run a local server. cc @fearful-symmetry |
_license
endpoint instead of using the/_xpack
features
handling.Fixes: #15090