Change default level for deprecation logging#80167
Change default level for deprecation logging#80167jakelandis merged 16 commits intoelastic:masterfrom
Conversation
|
@pgomulka - can you take another look ? I also drop the non-settings down to warn level, such that |
pgomulka
left a comment
There was a problem hiding this comment.
LGTM, I scrolled through the changes and all looks great
| StructRemovalField parse = StructRemovalField.PARSER.parse(parser, null); | ||
|
|
||
| assertWarnings("The field old_name has been removed and is being ignored"); | ||
| assertCriticalWarnings("The field old_name has been removed and is being ignored"); |
There was a problem hiding this comment.
REST API compatibility still warns at critical level.
There was a problem hiding this comment.
I guess it is ok? compatibility warns about a feature that was already removed
| public void handleRequest(RestRequest request, RestChannel channel, NodeClient client) throws Exception { | ||
| if (compatibleVersionWarning == false) { | ||
| deprecationLogger.critical(DeprecationCategory.API, deprecationKey, deprecationMessage); | ||
| deprecationLogger.warn(DeprecationCategory.API, deprecationKey, deprecationMessage); |
There was a problem hiding this comment.
We will still need a way to emit critical level deprecations when decalaring a REST handler. I will log a follow up issue.
| /** | ||
| * Check that a deprecation message with CRITICAL level can be recorded to an index | ||
| */ | ||
| public void testDeprecationCriticalWarnMessagesCanBeIndexed() throws Exception { |
There was a problem hiding this comment.
Now that the default is WARN, we needed to cover the case of a non-compat critical warning.
|
@elasticmachine update branch |
|
I believe all of your test failures are fixed by #80304 if we go that direction. |
|
@elasticmachine update branch |
|
@dakrone - can you take a look, this PR should be stable now. The initial (and primary change) was done with Intellij refactoring, however some the tests needed to updated to account for the new default warning level. |
This commit updates all deprecation message (except for REST compatible API messages) in 8.0+ to be emit at warning level. Currently none of these have been removed in future versions (yet) so they should be logged at warning, not critical. This commit also changes the default assertWarning to assert at warning level and introduces a new assertCriticalWarning to assert critical warnings.
This commit updates all deprecation message (except for REST compatible API messages) in 8.0+ to be emit at warning level. Currently none of these have been removed in future versions (yet) so they should be logged at warning, not critical. This commit also changes the default assertWarning to assert at warning level and introduces a new assertCriticalWarning to assert critical warnings.
This allows specifying an optional level to be used for the deprecation handler registering a route. Relates to elastic#80167
This allows specifying an optional level to be used for the deprecation handler registering a route. The default remains if the level is unspecified. Relates to #80167
…tic#80629) This allows specifying an optional level to be used for the deprecation handler registering a route. The default remains if the level is unspecified. Relates to elastic#80167
…tic#80629) This allows specifying an optional level to be used for the deprecation handler registering a route. The default remains if the level is unspecified. Relates to elastic#80167 # Conflicts: # server/src/main/java/org/elasticsearch/common/logging/DeprecationLogger.java # server/src/main/java/org/elasticsearch/rest/DeprecationRestHandler.java # server/src/main/java/org/elasticsearch/rest/RestController.java # server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutIndexTemplateAction.java # server/src/test/java/org/elasticsearch/rest/DeprecationRestHandlerTests.java # server/src/test/java/org/elasticsearch/rest/RestControllerTests.java
…) (#80779) This allows specifying an optional level to be used for the deprecation handler registering a route. The default remains if the level is unspecified. Relates to #80167 # Conflicts: # server/src/main/java/org/elasticsearch/common/logging/DeprecationLogger.java # server/src/main/java/org/elasticsearch/rest/DeprecationRestHandler.java # server/src/main/java/org/elasticsearch/rest/RestController.java # server/src/main/java/org/elasticsearch/rest/action/admin/indices/RestPutIndexTemplateAction.java # server/src/test/java/org/elasticsearch/rest/DeprecationRestHandlerTests.java # server/src/test/java/org/elasticsearch/rest/RestControllerTests.java
This commit updates all deprecation message (except for REST
compatible API messages) in 8.0+ to be emit at warning level.
Currently none of these have been removed in future versions (yet) so they
should be logged at warning, not critical.
This commit also changes the default
assertWarningto assert at warning leveland introduces a new
assertCriticalWarningto assert critical warnings.