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

[Ingest Node Pipelines] Refactor pipeline simulator code #72328

Merged

Conversation

alisonelizabeth
Copy link
Contributor

@alisonelizabeth alisonelizabeth commented Jul 17, 2020

This PR is prep work for the enhancements planned for the “Test pipeline” workflow.

Changes include:

  • Move test pipeline flyout code inside the pipeline_processors_editor directory
  • Only sending processors and on_failure processors to the simulate API; I don't see any benefit to sending the other pipeline fields (version, description).
  • Export a single context from the processors editor

Future polish

  • Consider formatting simulate error message as in [Ingest Pipelines] Error messages #70167
  • There is now the issue of closing the flyout once the editor flyout is open. I think we might be able to resolve this by using the new global flyout component.

How to test

No functionality should have changed here. You can follow the instructions on #64223 to verify there are no regressions.

@alisonelizabeth alisonelizabeth added v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes v7.10.0 Feature:Ingest Node Pipelines Ingest node pipelines management labels Jul 17, 2020
@alisonelizabeth alisonelizabeth marked this pull request as ready for review July 31, 2020 01:12
@alisonelizabeth alisonelizabeth requested a review from a team as a code owner July 31, 2020 01:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@alisonelizabeth
Copy link
Contributor Author

@elasticmachine merge upstream

@alisonelizabeth
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
ingestPipelines 369 +1 368

async chunks size

id value diff baseline
ingestPipelines 579.2KB -5.7KB 584.9KB

page load bundle size

id value diff baseline
ingestPipelines 32.4KB -144.0B 32.5KB

History

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

Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

Overall refactor looks good. Great work @alisonelizabeth !

Left one comment regarding the new context props that would be great to get your thoughts on, but considering it non-blocking for this work.

Tested locally and did not spot any regressions 🍻

Comment on lines +127 to +128
api={services.api}
toasts={services.notifications.toasts}
Copy link
Contributor

Choose a reason for hiding this comment

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

I see we are using the Kibana context provider here. I think it would be cool to add that as a dependency for the processors editor component. So in tests it would become:

<KibanaContextProvider>
    <ProcessorsEditorContextProvider>
        {/* Editors in here */}
    </ProcessorsEditorContextProvider>
</KibanaContextProvider>

That way we can get rid of the api and toasts prop. What do you think? Happy to do this in a separate pass if you agree.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great point. I agree. I'd like to get this PR in since it's needed for any subsequent PRs related to the pipeline simulation, but will definitely address in the next pass.

@@ -125,20 +121,18 @@ export const PipelineFormFields: React.FunctionComponent<Props> = ({

{/* Pipeline Processors Editor */}

<PipelineProcessorsContextProvider
<ProcessorsEditorContextProvider
onFlyoutOpen={onEditorFlyoutOpen}
Copy link
Contributor

Choose a reason for hiding this comment

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

Using the global flyout will also enable us to remove this prop which would be great!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! I was thinking the same.

@alisonelizabeth alisonelizabeth merged commit bf22fe5 into elastic:master Aug 5, 2020
@alisonelizabeth alisonelizabeth deleted the feature/pipeline_debugger branch August 5, 2020 13:22
gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 5, 2020
* master:
  update docs (elastic#74364)
  [Ingest Node Pipelines] Refactor pipeline simulator code (elastic#72328)
  Add README files for Kibana app plugins (elastic#74277)
  [APM] Average for transaction error rate includes null values (elastic#74345)
  [Ingest Manager] Adjust dataset aggs to use datastream fields instead (elastic#74342)
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 72328 or prevent reminders by adding the backport:skip label.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 7, 2020
alisonelizabeth added a commit to alisonelizabeth/kibana that referenced this pull request Aug 7, 2020
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Ingest Node Pipelines Ingest node pipelines management release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants