-
Notifications
You must be signed in to change notification settings - Fork 3
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
Error "Missing ids" does not provide enough information for debugging #96
Comments
@jordanpadams, I am wondering if they are using an older version of the harvest. Because in the latest source code of harvest,
I think in the latest code, this Exception("Missing ids") cannot be thrown, when the IDs are empty or null. |
@ramesh-maddegoda copy thanks. Waiting onto he version info to come back from Irma. Stand by. Thanks for looking into this! |
@tloubrieu-jpl, may be this is another related problem. In the following code it returns public Set<String> getNonExistingIds(Collection<String> ids) throws Exception
{
if(ids == null || ids.isEmpty()) return null;
Response resp = searchIds(ids);
NonExistingIdsResponse idsResp = new NonExistingIdsResponse(ids);
parser.parseResponse(resp, idsResp);
return idsResp.getIds();
} However, above method is called by idExists(String id) and it is expecting to have a non-null public boolean idExists(String id) throws Exception
{
List<String> ids = new ArrayList<>(1);
ids.add(id);
Collection<String> retIds = getNonExistingIds(ids);
return retIds.isEmpty();
} I think the What do you think? |
@ramesh-maddegoda making that change sounds good to me. |
@ramesh-maddegoda and maybe we can update that error message to say something like "Error reading bundle/collection references. Verify the bundle is valid prior to loading the data." or something like that? |
… idExists(String id) UPDATE error message in createSearchIdsRequest() method when ids == null || ids.isEmpty() Refer to the issue #96
Created pull request #99 with the changes proposed above. |
… idExists(String id) ADD InvalidPDS4ProductException (to throw when there is an error reading bundle/collection references) Refer to the issue #96
…eSearchIdsRequest() (#99) * FIX Possible null pointer exception, when calling retIds.isEmpty() in idExists(String id) UPDATE error message in createSearchIdsRequest() method when ids == null || ids.isEmpty() Refer to the issue #96 * FIX Possible null pointer exception, when calling retIds.isEmpty() in idExists(String id) ADD InvalidPDS4ProductException (to throw when there is an error reading bundle/collection references) Refer to the issue #96
Closed per #99 |
@gxtchen this need to be tested from the latest snapshot version https://github.com/NASA-PDS/harvest/releases/tag/v3.7.0-SNAPSHOT |
@jimmie Can you show me how to reproduce this issue? thx. |
@ramesh-maddegoda - do you have a test case for this or access to the originally failing ATM dataset? |
@jimmie and @gxtchen, There was another issue related to this #97 (comment) We found that user was using an older version harvest. @jordanpadams, verified this with the user and closed the issue as follows.
This issue should be also closed with #97 (comment) |
@jimmie and @gxtchen , the data set they had this issue was https://atmos.nmsu.edu/PDS/data/jnogrv_1001/DOCUMENT/ |
thanks @ramesh-maddegoda. agreed. |
added |
🐛 Describe the bug
Identified by ATM:
🕵️ Expected behavior
Error message includes much more useful information
📚 Version of Software Used
v3.6.0
🩺 Test Data / Additional context
TBD download from ATM
🦄 Related requirements
⚙️ Engineering Details
Looks like issue is here: https://github.com/NASA-PDS/harvest/blob/main/src/main/java/gov/nasa/pds/harvest/dao/EsRequestBuilder.java#L58
For whatever reason, the software is unable to read the LIDs from the collection inventory.
Tightly coupled with #97
The text was updated successfully, but these errors were encountered: