Skip to content

config: add flag to update publication date for new version#538

Merged
kpsherva merged 2 commits into
CERNDocumentServer:masterfrom
0einstein0:flag-version-date
Jun 25, 2026
Merged

config: add flag to update publication date for new version#538
kpsherva merged 2 commits into
CERNDocumentServer:masterfrom
0einstein0:flag-version-date

Conversation

@0einstein0

@0einstein0 0einstein0 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Closes issue #387

Adding a config flag update_new_version_publication_date, defaults to True.
If set False, the subsequent versions will have the same publication date for all versions.

Migration template doc update: https://gitlab.cern.ch/cds-team/cds-rdm-openshift/-/merge_requests/24

Comment thread cds_migrator_kit/runner/runner.py Outdated
stream_config = config.get(definition.name) or {}
self.data_dir = Path(stream_config[collection].get("data_dir"))
self.restricted = stream_config[collection].get("restricted", False)
self.update_publication_date = stream_config[collection].get(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would rename it to say something like update_new_version_publication_date or something more specific to avoid confusion.
plus if possible, a small test as well?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plus one to this. Could you also add a test please?

@sakshamarora1 sakshamarora1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe for test_new_version_publication_date we can directly check the 2889522 record's version and not loop through it all?

@kpsherva kpsherva merged commit fbaac02 into CERNDocumentServer:master Jun 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

config: Add a flag to determine what should be populated in the publication date of the next versions of a record on migration

3 participants