opensearch-project / opensearch-project/data-prepper

Provide detailed, path-specific validation errors in MaxMindDatabaseConfig.java

Open
#5,865 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.