You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a user is added to (or joins) a project on the Vector cluster, our policy is to automatically grant them access to a specific project on the Savio cluster (namely, the one specified in the SAVIO_PROJECT_FOR_VECTOR_USERS setting).
This is handled in the add_vector_user_to_designated_savio_project function.
In this function, we check whether a ProjectUser already exists to determine whether to update an existing object or create a new one. The return value of this check is a boolean. In the affirmative case, we then try to call .first() on this boolean (expecting it to be a queryset), which fails.
Thus, if the user is already associated with the Savio project (with any status, like "Removed"), they are not automatically added and set to "Active", even though they should be.
We ran into a case in the last few days wherein a user manually requested to join the Savio project prior to being added to a Vector project, causing the auto-add to fail, since a ProjectUser already existed.
To Reproduce
Steps to reproduce the behavior:
Choose a Savio project to be SAVIO_PROJECT_FOR_VECTOR_USERS, and set that setting to the project's name.
Join the Savio project.
Join a Vector project. Upon approval, the logic for adding you to the Savio project should run, and fail because of the bug.
A log message from BRCNewProjectUserRunner should note that the failure occurred. (Oddly, on production, the details of the exception were not logged. Confirm whether this is the case for you.)
Expected behavior
The user should be made "Active" on the Savio project, whether they were already associated with it or not.
Additional context
There is currently a test for this auto-add functionality for the case when no ProjectUser existed. Add a separate test for the case when one already existed (e.g., in a "Removed" state).
Search for test_add_vector_user_to_designated_savio_project_success.
Outside of the repository, write some query code to list any active Vector users who are not active on co_rosalind. This will help to determine additional users affected by this bug, so we can potentially add them.
The text was updated successfully, but these errors were encountered:
Describe the bug
When a user is added to (or joins) a project on the Vector cluster, our policy is to automatically grant them access to a specific project on the Savio cluster (namely, the one specified in the
SAVIO_PROJECT_FOR_VECTOR_USERS
setting).This is handled in the
add_vector_user_to_designated_savio_project
function.In this function, we check whether a
ProjectUser
already exists to determine whether to update an existing object or create a new one. The return value of this check is a boolean. In the affirmative case, we then try to call.first()
on this boolean (expecting it to be a queryset), which fails.Thus, if the user is already associated with the Savio project (with any status, like "Removed"), they are not automatically added and set to "Active", even though they should be.
We ran into a case in the last few days wherein a user manually requested to join the Savio project prior to being added to a Vector project, causing the auto-add to fail, since a
ProjectUser
already existed.To Reproduce
Steps to reproduce the behavior:
SAVIO_PROJECT_FOR_VECTOR_USERS
, and set that setting to the project's name.BRCNewProjectUserRunner
should note that the failure occurred. (Oddly, on production, the details of the exception were not logged. Confirm whether this is the case for you.)Expected behavior
The user should be made "Active" on the Savio project, whether they were already associated with it or not.
Additional context
ProjectUser
existed. Add a separate test for the case when one already existed (e.g., in a "Removed" state).test_add_vector_user_to_designated_savio_project_success
.co_rosalind
. This will help to determine additional users affected by this bug, so we can potentially add them.The text was updated successfully, but these errors were encountered: