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

[ENG-6856] Fix migration command to include last preprint #10911

Conversation

Ostap-Zherebetskyi
Copy link

Purpose

Fix and re-run version migration on staging2

Changes

See diff

QA Notes

N/A

Documentation

N/A

Side Effects

N/A

Ticket

https://openscience.atlassian.net/browse/ENG-6856

@Ostap-Zherebetskyi Ostap-Zherebetskyi marked this pull request as ready for review January 13, 2025 11:54
Copy link
Collaborator

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

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

Adding to my comment, if we only need the len(), then an integer, e.g. total_migrated, is good enough. We just increment it with len(vq_list). This should be fast enough which we can output this number in both dry-run and the actual run.

f'Migration has completed successfully! {total_migrated} preprint(s) has/have been migrated.'

osf/management/commands/migrate_non_versioned_preprints.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

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

Verified the locally and will merge after Actions are happy.

@cslzchen cslzchen merged commit 8f71b73 into CenterForOpenScience:feature/preprints-doi-versioning Jan 14, 2025
6 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.

2 participants