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 Manager] Fix datasource validation for streams without vars #67950

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Jun 2, 2020

Summary

Resolve #67938

Fix a type error when we validate a datasource with input variables but no stream variables.
How I fixed this? I added the stream to the validation results even if there is no variables for that stream.

Screen Shot 2020-06-02 at 9 51 30 AM

How to test this?

You can try to add|edit the datasource AWS, if you do not put a Queue URL you should have an error otherwise it should work.

@nchaulet nchaulet added bug Fixes for quality problems that affect the customer experience v8.0.0 v7.8.0 v7.9.0 Team:Fleet Team label for Observability Data Collection Fleet team labels Jun 2, 2020
@nchaulet nchaulet requested a review from a team June 2, 2020 13:54
@nchaulet nchaulet self-assigned this Jun 2, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@nchaulet nchaulet added the release_note:skip Skip the PR/issue when compiling release notes label Jun 2, 2020
'with-disabled-streams-disabled': {
vars: { 'var-name': null },
},
'with-disabled-streams-disabled2': {},
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this an intentional addition, and if yes, can it have a more descriptive name than just the 2 added at the end?

Copy link
Contributor

@skh skh left a comment

Choose a reason for hiding this comment

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

This works as described, but the error only appears once "Save data source" has been clicked.

When the user first clicks on "Create data source" for the AWS integration, nothing indicates that they need to open the "Collect logs from AWS instances" section and fill in a value for the Queue URL.

So, this works, but I'm not sure if this is the best way to handle it?

@nchaulet nchaulet requested a review from skh June 3, 2020 16:33
@nchaulet
Copy link
Member Author

nchaulet commented Jun 3, 2020

Yes the error is only showed when we click on"Save data source" I think it's the expected behavior here. cc @jen-huang

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@jen-huang
Copy link
Contributor

@skh @nchaulet Yes, that is the expected form validation behavior here and has existed before this PR. The UX rationale is so that there is a response in the UI on a user action, maybe @hbharding can provide better worded elaboration :D

Copy link
Contributor

@skh skh left a comment

Choose a reason for hiding this comment

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

@jen-huang thanks! LGTM then 👍

@nchaulet nchaulet merged commit c6aacc6 into elastic:master Jun 3, 2020
@nchaulet nchaulet deleted the fix-datasource-validation-stream-without-vars branch June 3, 2020 18:25
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jun 4, 2020
…ms-column

* 'master' of github.com:elastic/kibana: (63 commits)
  remove scripts. prettire update has been done (elastic#68130)
  Closes elastic#68055 by detecting the local Kibana version and using that as (elastic#68198)
  [apm] docs: add deployment annotation example (elastic#67408)
  [ML] Extend population preview chart to show actual and typical value (elastic#67569)
  Refactor index management client integration tests for scalability (elastic#67917)
  Add generator function that creates multiple alerts (elastic#67713)
  chore(NA): remove config arg from os packages (elastic#67871)
  [Reporting] Move code out of Legacy (elastic#67904)
  [Metrics UI] Add overrides to Snapshot API to support alert previews (elastic#68125)
  [Security] [Cases] Manage timeline UI API (elastic#67719)
  [ENDPOINT][INGEST]Task/endpoint ingest update (elastic#67234)
  Fix code coverage for jest, upload merged reports (elastic#68149)
  Update documentation/examples of deprecated namespaceAgnostic field (elastic#68039)
  [DOCS] Updates Canvas docs with new menus (elastic#66061)
  chore(NA): avoids imports of server or public code into common (elastic#67231)
  [SIEM] Fix GetOneTimeline graphql type (elastic#68137)
  skip flaky suite (elastic#67838)
  [Uptime] Add loading message for monitor list no items (elastic#67378)
  [Ingest Manager] Update indexing strategy docs to use dataset.* (elastic#68068)
  [Ingest Manager] Fix datasource validation for streams without vars (elastic#67950)
  ...

# Conflicts:
#	x-pack/plugins/index_management/__jest__/client_integration/helpers/index.ts
#	x-pack/plugins/index_management/__jest__/client_integration/home.test.ts
#	x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.helpers.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.8.0 v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ingest Management: TypeError: Root value is not flatten-able, received undefined
5 participants