Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -28368,7 +28368,6 @@
"xpack.ml.overview.nodesPanel.ariaLabel": "Überblick-Panel",
"xpack.ml.overview.nodesPanel.header": "Knoten",
"xpack.ml.overview.nodesPanel.totalNodesLabel": "Insgesamt",
"xpack.ml.overview.nodesPanel.viewNodeLink": "Knoten anzeigen",
"xpack.ml.overview.overviewLabel": "Überblick",
"xpack.ml.overview.statsBar.failedAnalyticsLabel": "Fehlgeschlagen",
"xpack.ml.overview.statsBar.runningAnalyticsLabel": "Wird ausgeführt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,10 @@ describe('translateClassicStreamPipelineActions', () => {
.mockImplementationOnce(async () => {
return {
'my-template-pipeline': {
created_date_millis: 123456789,
created_date: '2023-10-01T00:00:00.000Z',
modified_date_millis: 123456789,
modified_date: '2023-10-01T00:00:00.000Z',
processors: [
{
set: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import type { IngestPipeline } from '@elastic/elasticsearch/lib/api/types';
import type { IScopedClusterClient } from '@kbn/core/server';
import { isNotFoundError } from '@kbn/es-errors';
import { castArray, groupBy, uniq } from 'lodash';
import { castArray, groupBy, omit, uniq } from 'lodash';
import { ASSET_VERSION } from '../../../../../common/constants';
import type {
ActionsByType,
Expand Down Expand Up @@ -330,15 +330,29 @@ async function findPipelineToModify(
}

async function getPipeline(id: string, scopedClusterClient: IScopedClusterClient) {
return scopedClusterClient.asCurrentUser.ingest
.getPipeline({ id })
.then((response) => response[id])
.catch((error) => {
if (isNotFoundError(error)) {
return undefined;
}
throw error;
});
return (
scopedClusterClient.asCurrentUser.ingest
.getPipeline({ id })
// some keys on the pipeline can't be modified, so we need to clean them up
// to avoid errors when updating the pipeline
.then((response) => {
if (!response[id]) {
return undefined;
}
return omit(response[id], [
'created_date_millis',
'created_date',
'modified_date_millis',
'modified_date',
]);
})
.catch((error) => {
if (isNotFoundError(error)) {
return undefined;
}
throw error;
})
);
}

async function getIndexTemplate(name: string, scopedClusterClient: IScopedClusterClient) {
Expand Down