add(scripts): Add script to rebuild rdm_records_state.json - #592
add(scripts): Add script to rebuild rdm_records_state.json#592sakshamarora1 wants to merge 1 commit into
Conversation
zzacharo
left a comment
There was a problem hiding this comment.
Can you run a test for a collection that is correct on production, to verify that the fixed json is identical to the one produced from the migration?
| log(f"DONE: legacy_recid={legacy_recid}") | ||
|
|
||
|
|
||
| def load_communities_ids(collection, config_files=STREAM_CONFIG_FILES): |
There was a problem hiding this comment.
I would just pass the community ids here, and how we produce them, it can depend on the use case. wdyt?
| ) | ||
| ] | ||
| pids = PersistentIdentifier.query.filter( | ||
| PersistentIdentifier.pid_type == "lrecid", |
There was a problem hiding this comment.
we mint the lrecid for the parent of each migrated record or the latest on the migration time?
There was a problem hiding this comment.
For the parent pid
| """Mirror ``RecordLoad._load_record_state.convert_file_format``.""" | ||
| return [ | ||
| { | ||
| "legacy_file_id": entry["metadata"]["legacy_file_id"], |
There was a problem hiding this comment.
I guess you checked the current format of the state json right?
There was a problem hiding this comment.
Yes, I will test this against an already correct state json file as well and confirm it should be identical
fixes: #565