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

[8.x] [ingest pipeline mgmt] Move to x-pack/platform/plugins/shared/ingest_pipelines (#204331) #204502

Merged
merged 2 commits into from
Dec 17, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ x-pack/platform/packages/shared/ai-infra/inference-common @elastic/appex-ai-infr
x-pack/platform/plugins/shared/inference @elastic/appex-ai-infra
x-pack/platform/packages/private/kbn-infra-forge @elastic/obs-ux-management-team
x-pack/plugins/observability_solution/infra @elastic/obs-ux-logs-team @elastic/obs-ux-infra_services-team
x-pack/plugins/ingest_pipelines @elastic/kibana-management
x-pack/platform/plugins/shared/ingest_pipelines @elastic/kibana-management
src/plugins/input_control_vis @elastic/kibana-presentation
src/plugins/inspector @elastic/kibana-presentation
x-pack/platform/plugins/shared/integration_assistant @elastic/security-scalability
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ external LLM APIs. Its goals are:
the infrastructure monitoring use-case within Kibana.


|{kib-repo}blob/{branch}/x-pack/plugins/ingest_pipelines/README.md[ingestPipelines]
|{kib-repo}blob/{branch}/x-pack/platform/plugins/shared/ingest_pipelines/README.md[ingestPipelines]
|The ingest_pipelines plugin provides Kibana support for Elasticsearch's ingest pipelines.


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@
"@kbn/inference_integration_flyout": "link:x-pack/platform/packages/private/ml/inference_integration_flyout",
"@kbn/infra-forge": "link:x-pack/platform/packages/private/kbn-infra-forge",
"@kbn/infra-plugin": "link:x-pack/plugins/observability_solution/infra",
"@kbn/ingest-pipelines-plugin": "link:x-pack/plugins/ingest_pipelines",
"@kbn/ingest-pipelines-plugin": "link:x-pack/platform/plugins/shared/ingest_pipelines",
"@kbn/input-control-vis-plugin": "link:src/plugins/input_control_vis",
"@kbn/inspector-plugin": "link:src/plugins/inspector",
"@kbn/integration-assistant-plugin": "link:x-pack/platform/plugins/shared/integration_assistant",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1068,8 +1068,8 @@
"@kbn/infra-forge/*": ["x-pack/platform/packages/private/kbn-infra-forge/*"],
"@kbn/infra-plugin": ["x-pack/plugins/observability_solution/infra"],
"@kbn/infra-plugin/*": ["x-pack/plugins/observability_solution/infra/*"],
"@kbn/ingest-pipelines-plugin": ["x-pack/plugins/ingest_pipelines"],
"@kbn/ingest-pipelines-plugin/*": ["x-pack/plugins/ingest_pipelines/*"],
"@kbn/ingest-pipelines-plugin": ["x-pack/platform/plugins/shared/ingest_pipelines"],
"@kbn/ingest-pipelines-plugin/*": ["x-pack/platform/plugins/shared/ingest_pipelines/*"],
"@kbn/input-control-vis-plugin": ["src/plugins/input_control_vis"],
"@kbn/input-control-vis-plugin/*": ["src/plugins/input_control_vis/*"],
"@kbn/inspector-plugin": ["src/plugins/inspector"],
Expand Down
2 changes: 1 addition & 1 deletion x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"xpack.logsExplorer": "plugins/observability_solution/logs_explorer",
"xpack.logsShared": "plugins/observability_solution/logs_shared",
"xpack.fleet": "plugins/fleet",
"xpack.ingestPipelines": "plugins/ingest_pipelines",
"xpack.ingestPipelines": "platform/plugins/shared/ingest_pipelines",
"xpack.integrationAssistant": "platform/plugins/shared/integration_assistant",
"xpack.inference": "platform/plugins/shared/inference",
"xpack.inventory": "plugins/observability_solution/inventory",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// This interface doesn't cover a full ingest pipeline spec,
// just what's necessary to make it work in the transform creation wizard.
// The full interface can be found in x-pack/plugins/ingest_pipelines/common/types.ts
// The full interface can be found in x-pack/platform/plugins/shared/ingest_pipelines/common/types.ts
export interface EsIngestPipeline {
name: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@

module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/x-pack/plugins/ingest_pipelines'],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/x-pack/plugins/ingest_pipelines',
rootDir: '../../../../..',
roots: ['<rootDir>/x-pack/platform/plugins/shared/ingest_pipelines'],
coverageDirectory:
'<rootDir>/target/kibana-coverage/jest/x-pack/platform/plugins/shared/ingest_pipelines',
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'<rootDir>/x-pack/plugins/ingest_pipelines/{common,public,server}/**/*.{ts,tsx}',
'<rootDir>/x-pack/platform/plugins/shared/ingest_pipelines/{common,public,server}/**/*.{ts,tsx}',
],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { stringifyValueDescription } from './stringify_value_description';

describe('StringifyValueDescription', () => {
it('works for a json object', () => {
expect(stringifyValueDescription({ test: 'test' })).toEqual('{"test":"test"}');
});
it('works for an array', () => {
expect(stringifyValueDescription(['a', 'b'])).toEqual('["a","b"]');
});
it('works for a string', () => {
expect(stringifyValueDescription('test')).toEqual('test');
});
it('works for a number', () => {
expect(stringifyValueDescription(123)).toEqual('123');
});
it('empty string for undefined', () => {
expect(stringifyValueDescription(undefined)).toEqual('');
});
it('empty string for null', () => {
expect(stringifyValueDescription(null)).toEqual('');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

export const stringifyValueDescription = (value: unknown): string => {
if (!value) {
return '';
}
if (typeof value === 'object') {
try {
// if the value is a json object, it will be stringified as json
return JSON.stringify(value);
} catch (e) {
// ignore any errors
}
}
// otherwise just return a stringified value
return String(value);
};
Loading
Loading