Skip to content

A small tidiness refactor of the GeoIpTaskState's Metadata #110553

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

Merged
merged 4 commits into from
Jul 8, 2024

Conversation

joegallo
Copy link
Contributor

@joegallo joegallo commented Jul 5, 2024

There are more changes coming down the pipe, but this seemed like a reasonably small unit of work that was worth reviewing and getting out of my local WIP.

It drops the .contains(...) and .get(...) methods of GeoIpTaskState, favoring just asking questions of the underlying databases directly. Then, using a well-applied getOrDefault(...) the code gets a bit simpler. Finally it splits off the map-y dynamic code from the rest of the logic. Overall I find this version easier to follow.

@joegallo joegallo added :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >refactoring Team:Data Management Meta label for data/management team auto-backport Automatically create backport pull requests when merged v8.15.0 v8.16.0 labels Jul 5, 2024
@joegallo joegallo requested a review from parkertimmins July 5, 2024 22:10
@elasticsearchmachine
Copy link
Collaborator

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

@joegallo joegallo merged commit 00e744e into elastic:main Jul 8, 2024
15 checks passed
@joegallo joegallo deleted the ingest-geoip-metadata-refactor branch July 8, 2024 13:49
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >refactoring Team:Data Management Meta label for data/management team v8.15.0 v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants