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

[ML] Transforms: Support to set destination ingest pipeline. #123911

Merged
merged 10 commits into from
Feb 1, 2022

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Jan 27, 2022

Summary

Part of #102594.

  • Adds an extra dropdown control into section 2 of the transform creation wizard for setting the destination ingest pipeline.
  • Allows removing ingest pipeline from a cloned transform.
  • Allows editing/removing ingest pipeline in the edit flyout.

transform-pipeline-0001

Checklist

@walterra walterra marked this pull request as ready for review February 1, 2022 10:29
@walterra walterra requested a review from a team as a code owner February 1, 2022 10:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

}
)}
placeholder={i18n.translate(
'xpack.transform.stepDetailsForm.destinationIngestPipelinComboBoxPlaceholder',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spotted the deliberate typo! Pipelin!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, fixed in d2250c1.

@@ -219,6 +219,10 @@ export const getCreateTransformRequestBody = (
: {}),
dest: {
index: transformDetailsState.destinationIndex,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you consider adding the pipeline to the details summary?

image

label={i18n.translate(
'xpack.transform.stepDetailsForm.destinationIngestPipelineLabel',
{
defaultMessage: 'Destination ingest pipeline',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, if I add a pipeline, hit Next, and then Previous, the pipeline is being forgotten. It also isn't being saved in the config.

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, some minor suggestions

@@ -46,6 +46,7 @@ import type { GetTransformsStatsResponseSchema } from '../../../common/api_schem
import { TransformId } from '../../../common/types/transform';
import { API_BASE_PATH } from '../../../common/constants';
import { EsIndex } from '../../../common/types/es_index';
import { EsIngestPipeline } from '../../../common/types/es_ingest_pipeline';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
import { EsIngestPipeline } from '../../../common/types/es_ingest_pipeline';
import type { EsIngestPipeline } from '../../../common/types/es_ingest_pipeline';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4a93e66.

@@ -54,6 +59,26 @@ export const EditTransformFlyoutForm: FC<EditTransformFlyoutFormProps> = ({
[indexPatternId, indexPatternsClient]
);

// fetch pipeline names once for form validation
useEffect(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Suggested change
useEffect(() => {
useEffect(function fetchPipelinesOnMount() {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4a93e66.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
transform 365.8KB 368.8KB +3.0KB
Unknown metric groups

ESLint disabled line counts

id before after diff
transform 25 26 +1

Total ESLint disabled count

id before after diff
transform 28 29 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @walterra

@qn895
Copy link
Member

qn895 commented Feb 1, 2022

Tested latest changes (with adding pipeline, navigating next and then previous, and cloning the transform) and LGTM.

@qn895 qn895 merged commit 815537a into elastic:main Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Transforms ML transforms :ml release_note:feature Makes this part of the condensed release notes v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants