Skip to content

Update geoip fixture files and utility methods#111913

Merged
joegallo merged 8 commits intoelastic:mainfrom
joegallo:update-geoip-fixtures
Aug 15, 2024
Merged

Update geoip fixture files and utility methods#111913
joegallo merged 8 commits intoelastic:mainfrom
joegallo:update-geoip-fixtures

Conversation

@joegallo
Copy link
Copy Markdown
Contributor

This PR is a few things jammed together:

  1. It updates the geoip fixture mmdb files in modules/ingest-geoip/src/test/resources to reflect the latest copies as of today from https://github.com/maxmind/MaxMind-DB/tree/main/test-data.
  2. It cleans up a bunch of calling code that needs to copy such files from the classpath into some directory or file.
  3. Various tiny little tidiness fixes usually to silence warnings from IntelliJ or the like.

There are other changes I would still like to make around our test geoip fixture files, but this seems like a good place to stop and get some code merged before I move on.

I just ran this:

```
cd modules/ingest-geoip/src/test/resources;
for i in *.mmdb; do rm $i; wget -q https://github.com/maxmind/MaxMind-DB/raw/main/test-data/$i; done
```

and then committed the result.

:tada:
and rename the variable for characters-per-line reasons
it's griping about the grammar.
so there's no need to redundantly createDirectories here
@joegallo joegallo added >non-issue :Distributed/Ingest Node Execution or management of Ingest Pipelines Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v8.16.0 labels Aug 14, 2024
@joegallo joegallo requested a review from masseyke August 14, 2024 21:45
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

}
}

public static void copyDefaultDatabases(final Path directory, ConfigDatabases configDatabases) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A javadoc would be good on this one -- it's not obvious what it does at a quick glance.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I solemnly swear that I will totally add that javadoc in my next PR around the fixtures, rather than eating a round of CI for that right now.

Copy link
Copy Markdown
Member

@masseyke masseyke left a comment

Choose a reason for hiding this comment

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

LGTM

@joegallo joegallo merged commit 2261883 into elastic:main Aug 15, 2024
@joegallo joegallo deleted the update-geoip-fixtures branch August 15, 2024 16:52
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Aug 16, 2024
* upstream/main: (91 commits)
  Mute org.elasticsearch.xpack.test.rest.XPackRestIT org.elasticsearch.xpack.test.rest.XPackRestIT elastic#111944
  Add audit_unenrolled_* attributes to fleet-agents template (elastic#111909)
  Fix windows memory locking (elastic#111866)
  Update OAuth2 OIDC SDK (elastic#108799)
  Adds a warning about manually mounting snapshots managed by ILM (elastic#111883)
  Update geoip fixture files and utility methods (elastic#111913)
  Updated Function Score Query Test with Explain Fixes for 8.15.1 (elastic#111929)
  Mute org.elasticsearch.xpack.sql.qa.security.JdbcCsvSpecIT org.elasticsearch.xpack.sql.qa.security.JdbcCsvSpecIT elastic#111923
  [ESQL] date nanos binary comparisons (elastic#111908)
  [DOCS] Documents output_field behavior after multiple inference runs (elastic#111875)
  Add additional BlobCacheMetrics, expose BlobCacheMetrics via SharedBlobCacheService (elastic#111730)
  Mute org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT elastic#111923
  Mute org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT test {agg-ordering.testHistogramDateTimeWithCountAndOrder_2} elastic#111919
  Mute org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT test {date.testDateParseHaving} elastic#111921
  Mute org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT test {agg-ordering.testHistogramDateTimeWithCountAndOrder_1} elastic#111918
  Mute org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT test {datetime.testDateTimeParseHaving} elastic#111922
  Mute org.elasticsearch.xpack.sql.qa.single_node.JdbcCsvSpecIT org.elasticsearch.xpack.sql.qa.single_node.JdbcCsvSpecIT elastic#111923
  Mute org.elasticsearch.xpack.sql.qa.single_node.JdbcCsvSpecIT test {agg-ordering.testHistogramDateTimeWithCountAndOrder_1} elastic#111918
  Mute org.elasticsearch.xpack.sql.qa.single_node.JdbcCsvSpecIT test {datetime.testDateTimeParseHaving} elastic#111922
  Mute org.elasticsearch.xpack.sql.qa.single_node.JdbcCsvSpecIT test {date.testDateParseHaving} elastic#111921
  ...

# Conflicts:
#	server/src/main/java/org/elasticsearch/TransportVersions.java
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this pull request Sep 4, 2024
davidkyle pushed a commit to davidkyle/elasticsearch that referenced this pull request Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Ingest Node Execution or management of Ingest Pipelines >non-issue Team:Data Management (obsolete) DO NOT USE. This team no longer exists. v8.16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants