feat(comments): Add runner for comments migration separately#380
Open
sakshamarora1 wants to merge 2 commits intoCERNDocumentServer:masterfrom
Open
feat(comments): Add runner for comments migration separately#380sakshamarora1 wants to merge 2 commits intoCERNDocumentServer:masterfrom
sakshamarora1 wants to merge 2 commits intoCERNDocumentServer:masterfrom
Conversation
kpsherva
reviewed
Feb 9, 2026
| self.all_record_versions = { | ||
| str(hit["versions"]["index"]): hit for hit in search_result | ||
| } | ||
| oldest_version = min( |
Contributor
There was a problem hiding this comment.
wouldn't it be faster via record._record.versions[-1]? I mean instead of scan_versions etc.
kpsherva
reviewed
Feb 9, 2026
| elif comment_status == "dm": | ||
| comment_payload["payload"].update( | ||
| { | ||
| "content": "comment was deleted by the moderator.", |
Contributor
There was a problem hiding this comment.
in RDM we do not have the "moderator" - it would be good to align it with what we display when we delete a comment in RDM (I don't remember the exact text). ping @zzacharo for more opinions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes: #286
Steps
Output file:
comments_metadata.jsonAnother output file generated for the missing users:
users_metadata.jsonFor missing users:
users_metadata.jsonfile will be read and then this script (with some tweaks) can be run to find out the missing users in the new system.https://gitlab.cern.ch/cds-team/production_scripts/-/blob/master/cds-rdm/migration/dump_users.py?ref_type=heads
Create those users using: (NOT CONFIRMED)
Place
comments_metadata.jsonin/eos/media/cds/cds-rdm/<env>/migration/<collection>/comments/SET config vars:
Finally migrate those comments: