Skip to content
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

Added input parameter validation with few small changes #370

Closed
wants to merge 1 commit into from

Conversation

heemin32
Copy link
Collaborator

Description

  1. Added datasource name validation in delete/update api
  2. Added datasource name validation in processor creation method
  3. Changed index name delimiter from . to - to be consistent with others

Issues Resolved

N/A

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #370 (d265c0e) into main (323dd1d) will increase coverage by 0.15%.
The diff coverage is 87.80%.

❗ Current head d265c0e differs from pull request most recent head 9c11ba1. Consider uploading reports for the commit 9c11ba1 to get more accurate results

@@             Coverage Diff              @@
##               main     #370      +/-   ##
============================================
+ Coverage     88.43%   88.58%   +0.15%     
- Complexity      746      752       +6     
============================================
  Files            91       92       +1     
  Lines          2697     2708      +11     
  Branches        215      218       +3     
============================================
+ Hits           2385     2399      +14     
+ Misses          232      230       -2     
+ Partials         80       79       -1     
Files Changed Coverage Δ
...rch/geospatial/ip2geo/jobscheduler/Datasource.java 96.18% <ø> (ø)
...atial/ip2geo/jobscheduler/DatasourceExtension.java 100.00% <ø> (ø)
...spatial/ip2geo/action/DeleteDatasourceRequest.java 91.66% <66.66%> (+0.75%) ⬆️
...geospatial/ip2geo/common/InputFormatValidator.java 80.95% <80.95%> (ø)
...geospatial/ip2geo/action/PutDatasourceRequest.java 98.24% <100.00%> (+4.41%) ⬆️
...spatial/ip2geo/action/UpdateDatasourceRequest.java 100.00% <100.00%> (ø)
...h/geospatial/ip2geo/processor/Ip2GeoProcessor.java 93.02% <100.00%> (+0.91%) ⬆️

... and 1 file with indirect coverage changes

1. Added datasource name validation in delete/update api
2. Added datasource name validation in processor creation method
3. Changed index name delimiter from `.` to `-` to be consistent with others

Signed-off-by: Heemin Kim <heemin@amazon.com>
for (Map.Entry<String, String> entry : nameToError.entrySet()) {

// Run
System.out.println(entry.getKey());
Copy link
Member

Choose a reason for hiding this comment

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

do we need this line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops. Added by mistake.

@heemin32 heemin32 closed this Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport PR to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants