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

registry-mgr cannot handle updated JSON files output from LDDTool #33

Closed
jordanpadams opened this issue Sep 13, 2021 · 3 comments
Closed
Assignees
Labels
B12.0 bug Something isn't working s.medium
Milestone

Comments

@jordanpadams
Copy link
Member

🐛 Describe the bug

Latest LDDTool now generates JSON files that are incompatible with existing registry-mgr functionality.

Per closeout of NASA-PDS/pds4-information-model#397, what was thought to be a bug is now a new feature of LDDTool, and registry-mgr needs to be updated accordingly to support this.

📜 To Reproduce

Steps to reproduce the behavior:

  1. Run registry-mgr load schema with test data from Different formatting of JSON output between 1F00 and 1G00 generation pds4-information-model#397

🕵️ Expected behavior

📚 Version of Software Used

🩺 Test Data / Additional context

NASA-PDS/pds4-information-model#397

🏞Screenshots

🖥 System Info

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

🦄 Related requirements

⚙️ Engineering Details

@jordanpadams
Copy link
Member Author

closed per #35

@gxtchen
Copy link

gxtchen commented Oct 24, 2021

@jordanpadams @tloubrieu-jpl don't know exactly how to test this, registry-manager doesn't have load-schema command.
gchen@dhcp-137-79-228-248 registry-manager-4.2.0 % ./bin/registry-manager --help
[ERROR] Unrecognized option: --help

Usage: registry-manager

Commands:

Data:
load-data Load data into registry index
delete-data Delete data from registry index
export-data Export data from registry index
export-file Export a file from blob storage
set-archive-status Set product archive status

Registry:
create-registry Create registry and data dictionary indices
delete-registry Delete registry and data dictionary indices and all its data

Data Dictionary:
load-dd Load data into data dictionary
delete-dd Delete data from data dictionary
export-dd Export data dictionary
update-schema Update registry schema

Other:
-V, --version Print Registry Manager version

Options:
-help Print help for a command
-v Log verbosity: DEBUG, INFO, WARN, ERROR. Default is INFO.

tried with update-schema but got this error:
gchen@dhcp-137-79-228-248 registry-manager-4.2.0 % ./bin/registry-manager update-schema -file ../PDS4_SPECLIB_1F00_1100.JSON
[INFO] Elasticsearch URL: http://localhost:9200
[INFO] Index: registry
[ERROR] Could not find datatype for field '"0001_NASA_PDS_1.pds.Internal_Reference"'. See 'https://nasa-pds.github.io/pds-registry-app/operate/common-ops.html#Load' for more information.

@tloubrieu-jpl
Copy link
Member

@gxtchen, the right subcommand is load-dd, see procedure:
Registry-mgr load-dd on file PDS4_SPECLIB_1G00_1100.JSON
You need to download the file (here toto.json) and then run:
$./bin/registry-manager load-dd -dd toto.json -ns speclib

You can check in the elasticsearch instance that the documents (the class definitions) are loaded: http://localhost:9200/registry-dd/_search

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

No branches or pull requests

4 participants