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

Ignore matching data streams if include_data_streams is false #57900

Merged

Conversation

danhermann
Copy link
Contributor

@danhermann danhermann commented Jun 9, 2020

Currently, any requests that match a data stream on APIs that are not enabled for data streams return an error that a data stream was matched. This PR changes the name resolution to simply ignore data streams for APIs that are not enabled for data streams.

Relates to #53100

Relates to #57712

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -61,7 +61,6 @@
index: logs-foobarbaz

- do:
catch: bad_request
Copy link
Member

Choose a reason for hiding this comment

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

This fails when this yaml test is executed with security enabled.
logs-* is expanded to logs-foobar and then later this fails with a 404.

So in order to make this test execute constantly with and without security enabled, we should change
index: logs-* to `index: logs-foobar. This should change the meaning of this test.

Copy link
Contributor Author

@danhermann danhermann Jun 10, 2020

Choose a reason for hiding this comment

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

Thanks for pointing that out. It seems unfortunate that behavior can differ when security is enabled even when it is not restricting access to any of the items in the test. E.g., close logs-* succeeds without security but fails with security enabled even though the user has access to both the logs-foobar data stream and logs-foobarbaz index. I suppose that difference in behavior already exists with indices and aliases, though.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that subtle difference in behaviour also exists with indices and aliases.

@danhermann danhermann marked this pull request as ready for review June 10, 2020 12:49
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Data streams)

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Jun 10, 2020
@danhermann danhermann marked this pull request as draft June 16, 2020 15:58
@danhermann
Copy link
Contributor Author

danhermann commented Jun 16, 2020

This is likely to be abandoned in favor of #58154. Leaving it open only until that can be confirmed.

This PR depends on #58154

@danhermann
Copy link
Contributor Author

@elasticmachine update branch

@elasticmachine
Copy link
Collaborator

merge conflict between base and head

@danhermann danhermann force-pushed the do_not_fail_when_data_streams_match branch 3 times, most recently from 2ef0ab5 to dcf507e Compare July 2, 2020 17:03
@danhermann danhermann marked this pull request as ready for review July 3, 2020 04:56
@danhermann danhermann force-pushed the do_not_fail_when_data_streams_match branch from 9997d33 to c514974 Compare July 3, 2020 04:56
@danhermann
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

@danhermann danhermann merged commit c3aaf33 into elastic:master Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Data streams Data streams and their lifecycles >non-issue Team:Data Management Meta label for data/management team v7.9.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants