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

[Logstash] Disables mapping update #86045

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/groovy

env.KBN_ES_SNAPSHOT_USE_UNVERIFIED = 'true'

library 'kibana-pipeline-library'
kibanaLibrary.load()

Expand Down
43 changes: 24 additions & 19 deletions x-pack/plugins/logstash/server/routes/upgrade/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { IRouter } from 'src/core/server';
import { wrapRouteWithLicenseCheck } from '../../../../licensing/server';

import { INDEX_NAMES } from '../../../common/constants';
// import { INDEX_NAMES } from '../../../common/constants';
import { checkLicense } from '../../lib/check_license';

export function registerUpgradeRoute(router: IRouter) {
Expand All @@ -18,26 +18,31 @@ export function registerUpgradeRoute(router: IRouter) {
wrapRouteWithLicenseCheck(
checkLicense,
router.handleLegacyErrors(async (context, request, response) => {
const client = context.logstash!.esClient;
// https://github.com/elastic/kibana/issues/86038
// This is not supported in 8.0 due to it being a system index.
// Commenting it out for now to unblock the snapshots for the Ingest
// team to address

const doesIndexExist = await client.callAsCurrentUser('indices.exists', {
index: INDEX_NAMES.PIPELINES,
});
// const client = context.logstash!.esClient;

// If index doesn't exist yet, there is no mapping to upgrade
if (doesIndexExist) {
await client.callAsCurrentUser('indices.putMapping', {
index: INDEX_NAMES.PIPELINES,
body: {
properties: {
pipeline_settings: {
dynamic: false,
type: 'object',
},
},
},
});
}
// const doesIndexExist = await client.callAsCurrentUser('indices.exists', {
// index: INDEX_NAMES.PIPELINES,
// });

// // If index doesn't exist yet, there is no mapping to upgrade
// if (doesIndexExist) {
// await client.callAsCurrentUser('indices.putMapping', {
// index: INDEX_NAMES.PIPELINES,
// body: {
// properties: {
// pipeline_settings: {
// dynamic: false,
// type: 'object',
// },
// },
// },
// });
// }

return response.ok({ body: { is_upgraded: true } });
})
Expand Down