-
Notifications
You must be signed in to change notification settings - Fork 2
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
Pending group requests without corresponding membership changes logged #1123
Comments
The first case have been fixed by #1098 , it shouldn't happen again. I noticed the |
@GeoffreyHuck, unfortunately, I don't think it's possible to add such constraints. |
Ok, then we should at least have a short documentation about this Transition system, how it works and how to use it. And something that would prevent adding/modifying rows without using this Transition system. Because it's so easy to put the database in an inconsistent state. Maybe writing it down in the PR review process? Do you have any idea? |
For the documentation, I would start from reading this list of constants: https://pkg.go.dev/github.com/France-ioi/AlgoreaBackend/[email protected]/app/database#GroupGroupTransitionAction (probably you did that already) Adding a note about preventing modifications of group_pending_request/group_membership_changes in the PR review process would be really helpful. But, at the same time, we still add new rows into group_membership_changes and remove rows from group_pending_requests outside of the transition system: https://github.com/France-ioi/AlgoreaBackend/blob/master/app/api/groups/update_group.go#L342 |
In our dev DB (don't now about the prod) there is a pending invitation without corresponding group_membership_changes logged:
Also, there is a pending 'join_request' without a corresponding group membership change:
This needs to be investigated as it affects the invitationsView and groupRequestsView services.
The text was updated successfully, but these errors were encountered: