Hi devs,
I’d like to break the backward compatibility for the Active Installs module. The main reason is that I’m working on upgrading the ElasticSearch (ES) support from version 1.1 to 7.17.x (latest stable), and a lot of things have changed in ES over this time. Some examples:
- The framework we were using to access ES (JestClient) has stopped supporting versions of ES a long time ago
- It also didn’t support Java 11
- ES has stopped providing a
_timestamp
field - ES has stopped recommending using a type (only the index is recommended now, i.e.
installs3
instead ofinstalls3/installs
- The latest ES java client API is now a typed API and this means exposing a Ping java object as the result of queries instead of an untyped JsonObject.
- And some more…
I’m also taking the opportunity to provide improvements to the schema to make it more extensible (each data provider now provides its data as a sub item).
Before:
{
"dbName": "HSQL Database Engine",
"extensions": [
{
"id": "org.xwiki.platform:xwiki-platform-dashboard-ui",
"version": "6.1-SNAPSHOT"
},
...
],
"instanceId": "xxxxx-0846-4eec-85f0-yyyyyyy",
"firstPingDate": 1399304100207,
"dbVersion": "2.3.2",
"javaVendor": "Oracle Corporation",
"distributionVersion": "6.1-SNAPSHOT",
"osName": "Linux",
"sinceDays": 5,
"osArch": "amd64",
"distributionId": "org.xwiki.enterprise:xwiki-enterprise-web",
"javaVersion": "1.7.0_51",
"osVersion": "3.10.23-vs2.3.6.8-beng"
}
Now:
{
"date": {
"current": "2022-02-24T12:37:29.844197419Z",
"first": "2022-02-24T12:37:29.844197419Z",
"since": 0
},
"memory": {
"total": 536870912,
"max": 1610612736,
"used": 202686312,
"free": 334184600
},
"os": {
"name": "Mac OS X",
"arch": "aarch64",
"version": "12.2"
},
"distribution": {
"extension": {
"features": ["featureId/featureVersion"],
"id": "distributionId",
"version": "distributionVersion"
},
"instanceId": "a0e7adc7-84b7-42f1-a756-1f32ef3fe9da"
},
"extensions": [{
"features": ["featureId1/featureVersion1"],
"id": "extensionId1",
"version": "extensionVersion1"
}, {
"features": ["featureId2/featureVersion2"],
"id": "extensionId2",
"version": "extensionVersion2"
}],
"database": {
"name": "databaseProductName",
"version": "databaseProductVersion"
},
"java": {
"vendor": "JetBrains s.r.o.",
"version": "11.0.13",
"specificationVersion": "11"
},
"servletContainer": {
"name": "servletcontainername",
"version": "servletcontainerversion"
}
}
If ActiveInstalls was a contrib extension this would be a major new version, but since it’s inside XS, I can’t do this.
Since I don’t believe there are lots of users of the API and since the schema has changed anyway (this means users need to update their code anyway to make it work), I’m proposing to break backward compatibility.
WDYT?
Thanks