Merged
Conversation
Backports PR #10470 **Commit 1:** Correct display of warning header Elasticsearch produces warning headers for the use of deprecated features. These warning headers can contain commas which breaks the splitting of multiple values on commas. Upstream Elasticsearch has changed the warning headers to be specification compliant so that these headers can be safely split (the warning text and warning date must be quoted, so splits should only occur on commas that are not contained in quotes). Additionally, the upstream change includes additional details that are not needed for display in Console (a warning code, the Elasticsearch version that produced the warning, and the warning date). This commit corrects the splitting logic in Console to only split on commas not contained in quotes, and to extract the warning text from each warning header. * Original sha: 02896ea * Authored by Jason Tedor <jason@tedor.me> on 2017-02-20T20:44:14Z **Commit 2:** Safer regex handling If the warning header from Elasticsearch comes back in the wrong format, this could lead to the regex not matching which would lead to a blow-up. While Elasticsearch should not do this, let us be defensive here. * Original sha: 7f98c48 * Authored by Jason Tedor <jason@tedor.me> on 2017-02-22T20:23:35Z **Commit 3:** Stricter handling of warning headers * Original sha: f14055c * Authored by Jason Tedor <jason@tedor.me> on 2017-02-24T19:08:28Z **Commit 4:** Add tests for deprecation messages * Original sha: 8a9f432 * Authored by Jason Tedor <jason@tedor.me> on 2017-02-27T15:42:56Z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correct display of warning header
Backports PR #10470
Commit 1:
Correct display of warning header
Elasticsearch produces warning headers for the use of deprecated
features. These warning headers can contain commas which breaks the
splitting of multiple values on commas. Upstream Elasticsearch has
changed the warning headers to be specification compliant so that these
headers can be safely split (the warning text and warning date must be
quoted, so splits should only occur on commas that are not contained in
quotes). Additionally, the upstream change includes additional details
that are not needed for display in Console (a warning code, the
Elasticsearch version that produced the warning, and the warning
date). This commit corrects the splitting logic in Console to only split
on commas not contained in quotes, and to extract the warning text from
each warning header.
Commit 2:
Safer regex handling
If the warning header from Elasticsearch comes back in the wrong format,
this could lead to the regex not matching which would lead to a
blow-up. While Elasticsearch should not do this, let us be defensive
here.
Commit 3:
Stricter handling of warning headers
Commit 4:
Add tests for deprecation messages