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-4255] update to public true on ham just the objects that were public before were spammed #10970

Merged

Conversation

mkovalua
Copy link

@mkovalua mkovalua commented Feb 11, 2025

Purpose

When a user is is designated as Spam, and then confirmed as Ham, sometimes their preprints remain set to private.
It is needed to update to public true on ham just the objects that were public before were spammed.

Changes

It is needed to was_public parameter from the latest spammed log that was after public/private changings

preprint

Screen.Recording.2025-02-11.at.16.22.56.1.mp4

registration

Screen.Recording.2025-02-11.at.20.23.09.mp4

node (branched embargoed registration from project)

Screen.Recording.2025-02-13.at.00.05.32.1.mov

QA Notes

Please make verification statements inspired by your code and what your code touches.

  • Verify
  • Verify

What are the areas of risk?

Any concerns/considerations/questions that development raised?

Documentation

Side Effects

Ticket

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

@brianjgeiger brianjgeiger changed the title ENG-4255 update to public true on ham just the objects that were public before were spammed [ENG-4255] update to public true on ham just the objects that were public before were spammed Feb 13, 2025
Copy link
Collaborator

@brianjgeiger brianjgeiger left a comment

Choose a reason for hiding this comment

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

Could you add some tests please, both to catch the new functionality and, if they don't exist, to make sure you don't accidentally make something public that shouldn't be.

Copy link
Collaborator

@brianjgeiger brianjgeiger left a comment

Choose a reason for hiding this comment

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

There are some additional test cases that you should add. All of them are for registrations, and they are all for registrations that are based on a project.

  1. Project starts as public, registration is embargoed, should not be made public.
  2. Project starts as private, registration is embargoed, should not be made public.
  3. Project starts as private, project is made public, registration is embargoed, should not be made public.
  4. Project starts as public, project is made private, registration is embargoed, should not be made public.

5-8 should be 1-4 except that the registration is public and always should be made public.

@brianjgeiger brianjgeiger dismissed their stale review February 18, 2025 19:17

Invalid review

@Johnetordoff
Copy link
Contributor

@mkovalua can you also write test cases that test that the task scripts/approve_registrations.py runs correctly for registrations that are in spam or hammed state. That celery task has had issues dealing with registration state errors.

@brianjgeiger
Copy link
Collaborator

@mkovalua Please merge the latest CenterForOpenScience:feature/b-and-i-25-01 branch into your PR so that we can get tests to run.

@brianjgeiger
Copy link
Collaborator

@Johnetordoff Is this now testing what you wanted it to test?

@Johnetordoff
Copy link
Contributor

Johnetordoff commented Feb 24, 2025

@brianjgeiger yay it's called approve_registrations_runner in the tests, it might have been better to run as a celery task (like it is on Prod) in these tests, but this still covers any problems with the business logic. But LGTM.

@brianjgeiger brianjgeiger merged commit 5313a38 into CenterForOpenScience:feature/b-and-i-25-01 Feb 24, 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.

3 participants