NASA-PDS / registry-mgr

Standalone Registry Manager application responsible for managing the PDS Registry (https://github.com/NASA-PDS/registry) schemas and indexes.
https://nasa-pds.github.io/registry
Other
0 stars 2 forks source link

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

Closed jordanpadams closed 2 years ago

jordanpadams commented 2 years ago

๐Ÿ› Describe the bug

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

Per closeout of https://github.com/NASA-PDS/pds4-information-model/issues/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 https://github.com/NASA-PDS/pds4-information-model/issues/397

๐Ÿ•ต๏ธ Expected behavior

๐Ÿ“š Version of Software Used

๐Ÿฉบ Test Data / Additional context

https://github.com/NASA-PDS/pds4-information-model/issues/397

๐ŸžScreenshots

๐Ÿ–ฅ System Info


๐Ÿฆ„ Related requirements

โš™๏ธ Engineering Details

jordanpadams commented 2 years ago

closed per https://github.com/NASA-PDS/pds-registry-mgr-elastic/pull/35

gxtchen commented 2 years ago

@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 commented 2 years ago

@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