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

ref_lid_collection error when ingesting data sets #57

Closed
Tracked by #30
jordanpadams opened this issue Oct 6, 2022 · 9 comments
Closed
Tracked by #30

ref_lid_collection error when ingesting data sets #57

jordanpadams opened this issue Oct 6, 2022 · 9 comments
Assignees
Labels
B13.1 bug Something isn't working s.medium

Comments

@jordanpadams
Copy link
Member

jordanpadams commented Oct 6, 2022

πŸ› Describe the bug

image

πŸ“œ To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

πŸ•΅οΈ Expected behavior

Change archive status for the collection

πŸ“š Version of Software Used

🩺 Test Data / Additional context

🏞Screenshots

πŸ–₯ System Info

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

πŸ¦„ Related requirements

βš™οΈ Engineering Details

Initial guess for this error is because the first product ingested only included 1 collection reference, so harvest/registry manager created the schema as a string value instead of an array.

Duplicate of NASA-PDS/registry#118 but keeping open to ensure traceability.

@alexdunnjpl
Copy link

alexdunnjpl commented Nov 10, 2022

Likely a red herring, but looking at the function which builds the JSON for the update request it doesn't actually build valid JSON (unless the ES client supports multiple newline-separated JSON payloads attached to a single Request - I haven't been able to determine that yet.

{ "update" : {"_id" : "urn:nasa:pds:epoxi_mri::1.0" } }
{ "doc" : {"ops:Tracking_Meta/ops:archive_status" : "archived"} }

EDIT: TIL about ndJSON

@alexdunnjpl
Copy link

@jordanpadams

This may be fixed already.

General guess, or is there a specific release or related issue you're thinking of?

@jordanpadams jordanpadams added duplicate This issue or pull request already exists and removed duplicate This issue or pull request already exists labels Nov 15, 2022
@alexdunnjpl
Copy link

Bug appears to be triggering due to the relevant bundle containing only one collection.

The response returned by the API request during es.dao.ProductDao.getCollectionIds() is as follows:

{
  "_index": "registry",
  "_type": "_doc",
  "_id": "urn:nasa:pds:epoxi_mri::1.0",
  "_version": 2,
  "_seq_no": 27012,
  "_primary_term": 3,
  "found": true,
  "_source": {
    "ref_lid_collection": "urn:nasa:pds:epoxi_mri:hartley2_photometry"
  }
}

with ref_lid_collection being parsed by es.dao.DaoUtils.parseSet(), which expects to encounter an array-like JSON string (as opposed to the unenclosed string).

@jordanpadams this appears to be the fault of the API. Will follow up when I identify the relevant next steps.

@alexdunnjpl
Copy link

Confirmed that the same request for a bundle with multiple collections does not have this issue and correctly returns an array of strings.

{
  "_index": "registry",
  "_type": "_doc",
  "_id": "urn:nasa:pds:dart_teleobs::1.0",
  "_version": 1,
  "_seq_no": 24385,
  "_primary_term": 3,
  "found": true,
  "_source": {
    "ref_lidvid_collection": [
      "urn:nasa:pds:dart_teleobs:data_ldtcal::1.0",
      "urn:nasa:pds:dart_teleobs:data_ldtddp::1.0",
      "urn:nasa:pds:dart_teleobs:data_ldtraw::1.0",
      "urn:nasa:pds:dart_teleobs:document_ldt::1.0"
    ],
    "ref_lid_collection": [
      "urn:nasa:pds:dart_teleobs:data_ldtcal",
      "urn:nasa:pds:dart_teleobs:data_ldtddp",
      "urn:nasa:pds:dart_teleobs:data_ldtraw",
      "urn:nasa:pds:dart_teleobs:document_ldt"
    ]
  }
}

@alexdunnjpl
Copy link

@jordanpadams @al-niessner @jimmie @nutjob4life is it registry-loader that is responsible for constructing the docs to be loaded into the registry? (inb4 yeah bro, it's in the name)

@jordanpadams
Copy link
Member Author

@alexdunnjpl Harvest is the tool for doing this. we discussed merging registry-mgr and harvest into that registry-loader repo, but it has not happened.

@alexdunnjpl
Copy link

Thanks Jordan - should be able to continue with this now.

@jordanpadams
Copy link
Member Author

Oops! Nevermind. deleted previous comment because I was definitely wrong. Hopefully the harvest fix will make it work.

@alexdunnjpl
Copy link

alexdunnjpl commented Nov 23, 2022

Closing as this is a registry-common issue.

A corresponding issue has been opened in registry-common

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B13.1 bug Something isn't working s.medium
Projects
None yet
Development

No branches or pull requests

3 participants