opensearch-project / opensearch-project/data-prepper
Provide detailed, path-specific validation errors in MaxMindDatabaseConfig.java
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 374
- Forks
- 354
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
Problem
MaxMindDatabaseConfig.java validates database_paths with
@AssertTrue(message = "database_paths should be S3 URI or HTTP endpoint or local directory")
https://github.com/opensearch-project/data-prepper/blob/f27b493cbace324252c3255555449370cb644595/data-prepper-plugins/geoip-processor/src/main/java/org/opensearch/dataprepper/plugins/geoip/extension/MaxMindDatabaseConfig.java#L43
No matter what is wrong—a nonexistent file, a directory instead of a file, an S3/HTTP URL where a local file is expected, etc.—users always see that single generic line.
Because the validator collapses every error into the same generic message, developers can’t see which specific database_paths entry failed or whether it’s missing, a directory, or an unsupported URI scheme.
Request
Replace the generic message with path-specific feedback, e.g.
Path does not exist: /foo/geoip.mmdb
Directory provided, but a file is required: /data/
S3 URI not allowed here: s3://bucket/geoip.mmdb
Even one clear, detailed message per failing path would make troubleshooting much faster.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with data-prepper-plugins/geoip-processor/src/main/java/org/opensearch/dataprepper/plugins/geoip/extension/MaxMindDatabaseConfig.java, especially the database_paths validator around line 43. Review how each path is currently checked and define messages for nonexistent paths, directories, local-file expectations, and unsupported URI schemes. Done means each failing path produces a clear, path-specific validation message instead of the generic text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100