Skip to content

Fix reconstituting version string from components#117213

Merged
smalyshev merged 9 commits intoelastic:mainfrom
smalyshev:fix-user-agent-parser
Dec 4, 2024
Merged

Fix reconstituting version string from components#117213
smalyshev merged 9 commits intoelastic:mainfrom
smalyshev:fix-user-agent-parser

Conversation

@smalyshev
Copy link
Copy Markdown
Contributor

This fixes how UserAgentProcessor.java reconsititutes versions. Some patterns may generate empty strings for version components, which will lead to incorrect versions having dangling dots, etc. This patch fixes the issue.

Fixes #116950

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @smalyshev, I've created a changelog YAML for you.

@smalyshev smalyshev force-pushed the fix-user-agent-parser branch from bcaa35f to e6461b6 Compare November 21, 2024 00:57
@smalyshev smalyshev force-pushed the fix-user-agent-parser branch from e6461b6 to 7e1953c Compare November 21, 2024 00:58
@smalyshev smalyshev marked this pull request as ready for review November 21, 2024 01:20
@elasticsearchmachine elasticsearchmachine added the Team:Data Management (obsolete) DO NOT USE. This team no longer exists. label Nov 21, 2024
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @smalyshev, I've created a changelog YAML for you.

@smalyshev
Copy link
Copy Markdown
Contributor Author

@elasticmachine update branch

@arteam arteam removed their request for review November 29, 2024 07:40
@mattc58 mattc58 requested a review from joegallo December 3, 2024 20:03
@joegallo joegallo removed the request for review from PeteGillinElastic December 3, 2024 20:51
Copy link
Copy Markdown
Contributor

@joegallo joegallo left a comment

Choose a reason for hiding this comment

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

LGTM! I added some commits as a form of review. There was a build failure for the docs, which I don't understand -- I'm hoping it'll just pass with the next round of CI and we won't have to look into it.

@smalyshev smalyshev added v8.17.0 and removed v8.17.1 labels Dec 3, 2024
@smalyshev smalyshev merged commit 28eda97 into elastic:main Dec 4, 2024
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)

# Conflicts:
#	modules/ingest-user-agent/src/main/java/org/elasticsearch/ingest/useragent/UserAgentProcessor.java
#	modules/ingest-user-agent/src/test/java/org/elasticsearch/ingest/useragent/UserAgentProcessorTests.java
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)

# Conflicts:
#	modules/ingest-user-agent/src/main/java/org/elasticsearch/ingest/useragent/UserAgentProcessor.java
#	modules/ingest-user-agent/src/test/java/org/elasticsearch/ingest/useragent/UserAgentProcessorTests.java
@smalyshev
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x
8.17
8.16

Questions ?

Please refer to the Backport tool documentation

smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)

# Conflicts:
#	modules/ingest-user-agent/src/main/java/org/elasticsearch/ingest/useragent/UserAgentProcessor.java
#	modules/ingest-user-agent/src/test/java/org/elasticsearch/ingest/useragent/UserAgentProcessorTests.java
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)
elasticsearchmachine pushed a commit that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)
elasticsearchmachine pushed a commit that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)
smalyshev added a commit that referenced this pull request Dec 4, 2024
* Fix reconstituting version string from components

Co-authored-by: Joe Gallo <joegallo@gmail.com>
(cherry picked from commit 28eda97)
@smalyshev smalyshev deleted the fix-user-agent-parser branch December 4, 2024 22:29
Oddly added a commit to Oddly/integrations that referenced this pull request Mar 26, 2026
The user_agent ingest processor in ES versions before 8.16.2 produces
version strings with a trailing dot for certain user agents like
Firefox/128.0, which causes pipeline test failures. This was fixed in
elastic/elasticsearch#117213 and shipped in 8.16.2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Distributed/Ingest Node Execution or management of Ingest Pipelines Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v8.16.2 v8.17.0 v8.18.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

user_agent processor produces versions formatted as 128.0.

4 participants