Skip to content

Commit 8f3568f

Browse files
Merge branch 'master' into encode-decode-helper
2 parents a64d53a + 5416379 commit 8f3568f

72 files changed

Lines changed: 241 additions & 648 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.createindexaliasnotfounderror.md

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

docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.decorateindexaliasnotfounderror.md

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

docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.isgeneralerror.md

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

docs/development/core/server/kibana-plugin-core-server.savedobjectserrorhelpers.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export declare class SavedObjectsErrorHelpers
1818
| [createBadRequestError(reason)](./kibana-plugin-core-server.savedobjectserrorhelpers.createbadrequesterror.md) | <code>static</code> | |
1919
| [createConflictError(type, id, reason)](./kibana-plugin-core-server.savedobjectserrorhelpers.createconflicterror.md) | <code>static</code> | |
2020
| [createGenericNotFoundError(type, id)](./kibana-plugin-core-server.savedobjectserrorhelpers.creategenericnotfounderror.md) | <code>static</code> | |
21-
| [createIndexAliasNotFoundError(alias)](./kibana-plugin-core-server.savedobjectserrorhelpers.createindexaliasnotfounderror.md) | <code>static</code> | |
2221
| [createInvalidVersionError(versionInput)](./kibana-plugin-core-server.savedobjectserrorhelpers.createinvalidversionerror.md) | <code>static</code> | |
2322
| [createTooManyRequestsError(type, id)](./kibana-plugin-core-server.savedobjectserrorhelpers.createtoomanyrequestserror.md) | <code>static</code> | |
2423
| [createUnsupportedTypeError(type)](./kibana-plugin-core-server.savedobjectserrorhelpers.createunsupportedtypeerror.md) | <code>static</code> | |
@@ -28,7 +27,6 @@ export declare class SavedObjectsErrorHelpers
2827
| [decorateEsUnavailableError(error, reason)](./kibana-plugin-core-server.savedobjectserrorhelpers.decorateesunavailableerror.md) | <code>static</code> | |
2928
| [decorateForbiddenError(error, reason)](./kibana-plugin-core-server.savedobjectserrorhelpers.decorateforbiddenerror.md) | <code>static</code> | |
3029
| [decorateGeneralError(error, reason)](./kibana-plugin-core-server.savedobjectserrorhelpers.decorategeneralerror.md) | <code>static</code> | |
31-
| [decorateIndexAliasNotFoundError(error, alias)](./kibana-plugin-core-server.savedobjectserrorhelpers.decorateindexaliasnotfounderror.md) | <code>static</code> | |
3230
| [decorateNotAuthorizedError(error, reason)](./kibana-plugin-core-server.savedobjectserrorhelpers.decoratenotauthorizederror.md) | <code>static</code> | |
3331
| [decorateRequestEntityTooLargeError(error, reason)](./kibana-plugin-core-server.savedobjectserrorhelpers.decoraterequestentitytoolargeerror.md) | <code>static</code> | |
3432
| [decorateTooManyRequestsError(error, reason)](./kibana-plugin-core-server.savedobjectserrorhelpers.decoratetoomanyrequestserror.md) | <code>static</code> | |
@@ -37,7 +35,6 @@ export declare class SavedObjectsErrorHelpers
3735
| [isEsCannotExecuteScriptError(error)](./kibana-plugin-core-server.savedobjectserrorhelpers.isescannotexecutescripterror.md) | <code>static</code> | |
3836
| [isEsUnavailableError(error)](./kibana-plugin-core-server.savedobjectserrorhelpers.isesunavailableerror.md) | <code>static</code> | |
3937
| [isForbiddenError(error)](./kibana-plugin-core-server.savedobjectserrorhelpers.isforbiddenerror.md) | <code>static</code> | |
40-
| [isGeneralError(error)](./kibana-plugin-core-server.savedobjectserrorhelpers.isgeneralerror.md) | <code>static</code> | |
4138
| [isInvalidVersionError(error)](./kibana-plugin-core-server.savedobjectserrorhelpers.isinvalidversionerror.md) | <code>static</code> | |
4239
| [isNotAuthorizedError(error)](./kibana-plugin-core-server.savedobjectserrorhelpers.isnotauthorizederror.md) | <code>static</code> | |
4340
| [isNotFoundError(error)](./kibana-plugin-core-server.savedobjectserrorhelpers.isnotfounderror.md) | <code>static</code> | |

packages/kbn-es-archiver/src/actions/empty_kibana_index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ export async function emptyKibanaIndexAction({
2525

2626
await cleanKibanaIndices({ client, stats, log, kibanaPluginIds });
2727
await migrateKibanaIndex({ client, kbnClient });
28-
stats.createdIndex('.kibana');
29-
return stats.toJSON();
28+
return stats;
3029
}

packages/kbn-es-archiver/src/es_archiver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class EsArchiver {
155155
* @return Promise
156156
*/
157157
async emptyKibanaIndex() {
158-
return await emptyKibanaIndexAction({
158+
await emptyKibanaIndexAction({
159159
client: this.client,
160160
log: this.log,
161161
kbnClient: this.kbnClient,

packages/kbn-es-archiver/src/lib/indices/kibana_index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ export async function migrateKibanaIndex({
7676
*/
7777
async function fetchKibanaIndices(client: Client) {
7878
const kibanaIndices = await client.cat.indices({ index: '.kibana*', format: 'json' });
79-
const isKibanaIndex = (index: string) =>
80-
/^\.kibana(:?_\d*)?$/.test(index) ||
81-
/^\.kibana(_task_manager)?_(pre)?\d+\.\d+\.\d+/.test(index);
79+
const isKibanaIndex = (index: string) => /^\.kibana(:?_\d*)?$/.test(index);
8280
return kibanaIndices.map((x: { index: string }) => x.index).filter(isKibanaIndex);
8381
}
8482

@@ -105,7 +103,7 @@ export async function cleanKibanaIndices({
105103

106104
while (true) {
107105
const resp = await client.deleteByQuery({
108-
index: `.kibana,.kibana_task_manager`,
106+
index: `.kibana`,
109107
body: {
110108
query: {
111109
bool: {
@@ -117,7 +115,7 @@ export async function cleanKibanaIndices({
117115
},
118116
},
119117
},
120-
ignore: [404, 409],
118+
ignore: [409],
121119
});
122120

123121
if (resp.total !== resp.deleted) {

0 commit comments

Comments
 (0)