Skip to content

Commit e045668

Browse files
authored
Use ES build instead of xpack inside xpack info action (#122859) (#122869)
Xpack used to be a plugin to Elasticsearch, and existed in a separate repository. So it had a separate build hash and date, which is exposed through the xpack info API. Since xpack is no longer a plugin, and part of the Elasticsearch repository, having a separate build info is no longer necessary. This commit keeps the xpack info content intact, but switches the implemntation to look at the Elasticsearch build details, and removes the xpack build info class.
1 parent a771860 commit e045668

File tree

2 files changed

+2
-79
lines changed

2 files changed

+2
-79
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackBuild.java

Lines changed: 0 additions & 77 deletions
This file was deleted.

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/action/TransportXPackInfoAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
package org.elasticsearch.xpack.core.action;
88

9+
import org.elasticsearch.Build;
910
import org.elasticsearch.action.ActionListener;
1011
import org.elasticsearch.action.ActionType;
1112
import org.elasticsearch.action.support.ActionFilters;
@@ -23,7 +24,6 @@
2324
import org.elasticsearch.protocol.xpack.XPackInfoResponse.LicenseInfo;
2425
import org.elasticsearch.tasks.Task;
2526
import org.elasticsearch.transport.TransportService;
26-
import org.elasticsearch.xpack.core.XPackBuild;
2727

2828
import java.util.HashSet;
2929
import java.util.List;
@@ -58,7 +58,7 @@ protected void doExecute(Task task, XPackInfoRequest request, ActionListener<XPa
5858

5959
XPackInfoResponse.BuildInfo buildInfo = null;
6060
if (request.getCategories().contains(XPackInfoRequest.Category.BUILD)) {
61-
buildInfo = new XPackInfoResponse.BuildInfo(XPackBuild.CURRENT.shortHash(), XPackBuild.CURRENT.date());
61+
buildInfo = new XPackInfoResponse.BuildInfo(Build.current().hash(), Build.current().date());
6262
}
6363

6464
LicenseInfo licenseInfo = null;

0 commit comments

Comments
 (0)