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

HOTFIX update member activity migration to handle deleted users #968

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

JeffreyThiessen
Copy link
Member

@JeffreyThiessen JeffreyThiessen commented Mar 3, 2025

What does this PR do and why?

Describe in detail what your merge request does and why.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other pull requests.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. checkout irida next from a git hash before the migration, build db
git checkout 6facd06a29c38cdb80012367dcf7dbc07a250a5d

./scripts/clean_dev.sh
  1. run irida next
  2. create a new user "myuser"
  3. sign out
  4. sign in with admin
  5. create a new group/project
  6. add "myuser" to group/project
  7. sign out of admin
  8. sign in with "myuser"
  9. delete "myuser" from edit profile page
  10. sign in with admin
  11. check that user "myuser" is no longer a member of group/project
  12. checkout this PR branch and migrate
git checkout hotfix_member_activity_migration

rails db:migrate
  1. Migration should succeed
  2. run irida next and view the activity page for the group/project we used previously. Activity should sat "Deleted User" for activities associated with now deleted "myuser"

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

This comment has been minimized.

@JeffreyThiessen JeffreyThiessen marked this pull request as ready for review March 3, 2025 17:46
@JeffreyThiessen JeffreyThiessen self-assigned this Mar 3, 2025
Copy link

github-actions bot commented Mar 3, 2025

Code Metrics Report

Coverage Test Execution Time
93.2% 11m17s

Reported by octocov

Copy link
Collaborator

@ChrisHuynh333 ChrisHuynh333 left a comment

Choose a reason for hiding this comment

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

Works as described, thanks for fixing this.

@JeffreyThiessen JeffreyThiessen merged commit 013df70 into main Mar 3, 2025
4 checks passed
@JeffreyThiessen JeffreyThiessen deleted the hotfix_member_activity_migration branch March 3, 2025 20:25
Copy link
Contributor

@joshsadam joshsadam left a comment

Choose a reason for hiding this comment

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

This looks really good to me as well.  Agree, that it works as advertised.

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