Fix uri_parts processor behaviour for missing extensions#105689
Merged
nielsbauman merged 4 commits intoelastic:mainfrom Feb 22, 2024
Merged
Fix uri_parts processor behaviour for missing extensions#105689nielsbauman merged 4 commits intoelastic:mainfrom
uri_parts processor behaviour for missing extensions#105689nielsbauman merged 4 commits intoelastic:mainfrom
Conversation
Collaborator
|
Hi @nielsbauman, I've created a changelog YAML for you. |
Collaborator
|
Pinging @elastic/es-data-management (Team:Data Management) |
nielsbauman
commented
Feb 21, 2024
...gest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/320_uri_parts_processor.yml
Show resolved
Hide resolved
joegallo
reviewed
Feb 21, 2024
...gest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/320_uri_parts_processor.yml
Outdated
Show resolved
Hide resolved
Contributor
On I'm not actually sure I care about the old behavior, but I don't think we should change it unintentionally. Can you add a test for the old behavior and switch it back? I'd include a comment in the test about how it just happens to be the case that we do this, and it's not necessarily something we intend to keep forever but that if we change it we want to be conscious of it being a change in the observable behavior of the system. |
joegallo
approved these changes
Feb 21, 2024
4 tasks
andrewkroh
added a commit
to elastic/integrations
that referenced
this pull request
Apr 17, 2024
Ignore the existence of an invalid `url.extension` field. Stack versions < 8.14 had a
bug that populated the field with bad data. After a package uses a minimum stack version
of 8.14.0 then this addition to `dynamic_fields` can be removed.
This fixes errors like this which occur under v8.14.0
test case failed: Expected results are different from actual ones: --- want
+++ got
@@ -1797,7 +1797,6 @@
"preserve_duplicate_custom_fields"
],
"url": {
- "extension": "com/page",
"original": "www.example.com/page",
"path": "www.example.com/page"
}
Relates: elastic/elasticsearch#105689
4 tasks
kcreddy
added a commit
to elastic/integrations
that referenced
this pull request
Aug 6, 2024
Extension to #9623 Ignore the existence of an invalid url.extension field. Stack versions < 8.14 had a bug that populated the field with bad data. After a package uses a minimum stack version of 8.14.0 then this addition to dynamic_fields can be removed. This fixes errors like this which occur under v8.14.0+ +++ got @@ -1797,7 +1797,6 @@ "preserve_duplicate_custom_fields" ], "url": { - "extension": "com/page", "original": "www.example.com/page", "path": "www.example.com/page" } Relates: elastic/elasticsearch#105689
4 tasks
5 tasks
harnish-crest-data
pushed a commit
to chavdaharnish/integrations
that referenced
this pull request
Feb 4, 2025
Extension to elastic#9623 Ignore the existence of an invalid url.extension field. Stack versions < 8.14 had a bug that populated the field with bad data. After a package uses a minimum stack version of 8.14.0 then this addition to dynamic_fields can be removed. This fixes errors like this which occur under v8.14.0+ +++ got @@ -1797,7 +1797,6 @@ "preserve_duplicate_custom_fields" ], "url": { - "extension": "com/page", "original": "www.example.com/page", "path": "www.example.com/page" } Relates: elastic/elasticsearch#105689
harnish-crest-data
pushed a commit
to chavdaharnish/integrations
that referenced
this pull request
Feb 5, 2025
Extension to elastic#9623 Ignore the existence of an invalid url.extension field. Stack versions < 8.14 had a bug that populated the field with bad data. After a package uses a minimum stack version of 8.14.0 then this addition to dynamic_fields can be removed. This fixes errors like this which occur under v8.14.0+ +++ got @@ -1797,7 +1797,6 @@ "preserve_duplicate_custom_fields" ], "url": { - "extension": "com/page", "original": "www.example.com/page", "path": "www.example.com/page" } Relates: elastic/elasticsearch#105689
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.
The
uri_partsprocessor was behaving incorrectly for URI's that included a dot in the path but did not have an extension. For example:https://www.example.com/path.withdot/filenamewithoutextensionwould get processed as"extension": "withdot/filenamewithoutextension".Instead of determining the extension based on the full path, we should use the last segment of the path (i.e. the part after the last
/).This PR also includes (missing) YAML REST tests for the
uri_partsprocessor.Fixes #105612