-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Remove types from internal monitoring templates and bump to api 7 #39888
Remove types from internal monitoring templates and bump to api 7 #39888
Conversation
The template still carries the "_doc" type since that is needed for the internal representation. This change impacts the following templates: monitoring-alerts.json monitoring-beats.json monitoring-es.json monitoring-kibana.json monitoring-logstash.json As part of the required changes, the system_api_version has been bumped from "6" to "7" and support for version "2" has been dropped. A new empty pipeline is now introduced for the version "7", and the formerly empty "6" pipeline will now remove the type and re-direct the request to the "7" index. Additionally, to due to a difference in the internal representation (which requires the inclusion of "_doc" type) and external representation (which requires the exclusion of any type) a helper method is introduced to help convert internal to external representation, and used by the monitoring HTTP template exporter. Relates elastic#38637
Pinging @elastic/es-core-features |
@elasticmachine run elasticsearch-ci/bwc |
@elasticmachine run elasticsearch-ci/bwc |
@@ -98,8 +104,18 @@ protected void doPublish(final RestClient client, final ActionListener<Boolean> | |||
* | |||
* @return Never {@code null}. | |||
*/ | |||
@SuppressWarnings("unchecked") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the call that requires suppressing this warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, that was from an earlier attempt and is no longer needed. It is now removed.
@@ -75,7 +76,9 @@ public String getName() { | |||
|
|||
@Override | |||
public RestChannelConsumer doPrepareRequest(RestRequest request, XPackClient client) throws IOException { | |||
final String defaultType = request.param("type"); | |||
if (Strings.isEmpty(request.param("type")) == false) { | |||
logger.error("Custom types for monitoring is not supported"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we logging instead of failing with an exception? Are we sure that 6.7 never uses the bulk monitoring API with a type in the path? If not I think we should keep support for the defaultType
for now and remove it in 8.0. If we are sure that the type is never set via the path, then maybe we should remove the path from the REST handler entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am like 99% sure that Kibana/Beats/LS don't send this parameter. I went ahead and moved to an throwing an exception if it is sent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we instead remove the paths that accept a type in the constructor of RestMonitoringBulkAction
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, yes (sorry a bit slow here). I removed this on 1573aae.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@jpountz thanks ! @pickypg @ycombinator - I am going to merge this based on Adrien's review, apologies for not providing adequate time for review (trying to meet specific timelines) If you do you review and find issue(s), please ping me directly. |
…astic#39888) This commit removes the "doc" type from monitoring internal indexes. The template still carries the "_doc" type since that is needed for the internal representation. This change impacts the following templates: monitoring-alerts.json monitoring-beats.json monitoring-es.json monitoring-kibana.json monitoring-logstash.json As part of the required changes, the system_api_version has been bumped from "6" to "7" and support for version "2" has been dropped. A new empty pipeline is now introduced for the version "7", and the formerly empty "6" pipeline will now remove the type and re-direct the request to the "7" index. Additionally, to due to a difference in the internal representation (which requires the inclusion of "_doc" type) and external representation (which requires the exclusion of any type) a helper method is introduced to help convert internal to external representation, and used by the monitoring HTTP template exporter. Relates elastic#38637
…astic#39888) This commit removes the "doc" type from monitoring internal indexes. The template still carries the "_doc" type since that is needed for the internal representation. This change impacts the following templates: monitoring-alerts.json monitoring-beats.json monitoring-es.json monitoring-kibana.json monitoring-logstash.json As part of the required changes, the system_api_version has been bumped from "6" to "7" and support for version "2" has been dropped. A new empty pipeline is now introduced for the version "7", and the formerly empty "6" pipeline will now remove the type and re-direct the request to the "7" index. Additionally, to due to a difference in the internal representation (which requires the inclusion of "_doc" type) and external representation (which requires the exclusion of any type) a helper method is introduced to help convert internal to external representation, and used by the monitoring HTTP template exporter. Relates elastic#38637
…9888) (#39927) This commit removes the "doc" type from monitoring internal indexes. The template still carries the "_doc" type since that is needed for the internal representation. This change impacts the following templates: monitoring-alerts.json monitoring-beats.json monitoring-es.json monitoring-kibana.json monitoring-logstash.json As part of the required changes, the system_api_version has been bumped from "6" to "7" and support for version "2" has been dropped. A new empty pipeline is now introduced for the version "7", and the formerly empty "6" pipeline will now remove the type and re-direct the request to the "7" index. Additionally, to due to a difference in the internal representation (which requires the inclusion of "_doc" type) and external representation (which requires the exclusion of any type) a helper method is introduced to help convert internal to external representation, and used by the monitoring HTTP template exporter. Relates #38637
elastic/elasticsearch#39888 removed the "doc" type from internal indices, causing breakage in the x-pack integration tests. This commit changes the type to "_doc" for consistency.
…9888) (#39926) This commit removes the "doc" type from monitoring internal indexes. The template still carries the "_doc" type since that is needed for the internal representation. This change impacts the following templates: monitoring-alerts.json monitoring-beats.json monitoring-es.json monitoring-kibana.json monitoring-logstash.json As part of the required changes, the system_api_version has been bumped from "6" to "7" and support for version "2" has been dropped. A new empty pipeline is now introduced for the version "7", and the formerly empty "6" pipeline will now remove the type and re-direct the request to the "7" index. Additionally, to due to a difference in the internal representation (which requires the inclusion of "_doc" type) and external representation (which requires the exclusion of any type) a helper method is introduced to help convert internal to external representation, and used by the monitoring HTTP template exporter. Relates #38637
This commit fixes x-pack integration tests that were broken by elastic/elasticsearch#39888 removing the "doc" type, and using `_doc` in templates.
This commit fixes x-pack integration tests that were broken by elastic/elasticsearch#39888 removing the "doc" type, and using `_doc` in templates. Fixes #10533
This commit fixes x-pack integration tests that were broken by elastic/elasticsearch#39888 removing the "doc" type, and using `_doc` in templates. Fixes #10533
This commit fixes x-pack integration tests that were broken by elastic/elasticsearch#39888 removing the "doc" type, and using `_doc` in templates. Fixes #10533
org.elasticsearch.xpack.monitoring.action.MonitoringBulkRequestTests#testAddRequestContent can still randomly use a defaultType for monitoring. The defaultType support has been removed as of PR elastic#39888. Prior to its's removal it would default the type if one is not specified. The _type on the monitoring bulk end point is currently required, though it is not used as the final index type (which defaultType would have). Closes elastic#39980
org.elasticsearch.xpack.monitoring.action.MonitoringBulkRequestTests#testAddRequestContent can still randomly use a defaultType for monitoring. The defaultType support has been removed as of PR #39888. Prior to its's removal it would default the type if one is not specified. The _type on the monitoring bulk end point is currently required, though it is not used as the final index type (which defaultType would have). Closes #39980
org.elasticsearch.xpack.monitoring.action.MonitoringBulkRequestTests#testAddRequestContent can still randomly use a defaultType for monitoring. The defaultType support has been removed as of PR #39888. Prior to its's removal it would default the type if one is not specified. The _type on the monitoring bulk end point is currently required, though it is not used as the final index type (which defaultType would have). Closes #39980
org.elasticsearch.xpack.monitoring.action.MonitoringBulkRequestTests#testAddRequestContent can still randomly use a defaultType for monitoring. The defaultType support has been removed as of PR #39888. Prior to its's removal it would default the type if one is not specified. The _type on the monitoring bulk end point is currently required, though it is not used as the final index type (which defaultType would have). Closes #39980
This commit removes the "doc" type from monitoring internal indexes.
The template still carries the "_doc" type since that is needed for
the internal representation.
This change impacts the following templates:
monitoring-alerts.json
monitoring-beats.json
monitoring-es.json
monitoring-kibana.json
monitoring-logstash.json
As part of the required changes, the system_api_version has been
bumped from "6" to "7" and support for version "2" has been dropped.
A new empty pipeline is now introduced for the version "7", and
the formerly empty "6" pipeline will now remove the type and re-direct
the request to the "7" index.
Additionally, to due to a difference in the internal representation
(which requires the inclusion of "_doc" type) and external representation
(which requires the exclusion of any type) a helper method is introduced
to help convert internal to external representation, and used by the
monitoring HTTP template exporter.
Relates #38637
This replaces #39336 , the "primary change" is still relevant for this PR, but the additional changes on that PR are not relevant to this PR since we decided to go a different way that is more inline with prior upgrades.