yasithdev opened a new pull request, #183:
URL: https://github.com/apache/airavata-portals/pull/183

   ## Summary
   
   `GroupViewSet` and `GroupSerializer` ran on the Thrift `group_manager` 
profile-service client, so `/api/groups/` (and every page that loads 
sharing/group data) blocked on the dead Thrift server's socket read-timeout 
(**~25s hang**). This repoints group management to the gRPC `sharing` facade's 
GroupManager (`gm_*`) operations.
   
   ## Changes
   
   - **`GroupViewSet`** → `request.airavata.sharing.gm_*`: `gm_get_groups` / 
`gm_get_group` / `gm_create_group` / `gm_add_users_to_group` / 
`gm_remove_users_from_group` / `gm_add_group_admins` / `gm_remove_group_admins` 
/ `gm_update_group` / `gm_delete_group`. `_send_users_added_to_group` loads the 
added user's profile via `request.airavata.iam.get_user_profile_by_id`.
   - **`GroupSerializer`**: `get_isAdmin` → `sharing.gm_has_admin_access`; 
`_gateway_groups` → `compute.get_gateway_groups` (now also surfaces 
`defaultGatewayUsersGroupId`, which the serializer reads).
   - **`grpc_adapters.group`** (proto `GroupModel` → serializer shape) and 
**`grpc_requests.group`** (reverse) added.
   - **`_gateway_groups_dict`** middleware helper extended with the third group 
id, for consistency with the session-cached dict the serializer reads.
   - The `user_added_to_group` signal now carries a protobuf `UserProfile`, so 
`email_user_added_to_group` reads `first_name`/`last_name`/`user_id`.
   
   ## Testing
   
   - `manage.py check` — green.
   - `grpc_adapters.group` round-trips (proto → adapter → reverse-proto) 
field-for-field.
   - Live: `/api/groups/` **25s hang → 200 in ~0.02s** (empty list).
   - Note: creating a group / initializing `GatewayGroups` isn't seedable in 
the ephemeral dev backend ("Error while committing the transaction"), so the 
serializer's group-flag fields are migrated 1:1 from their Thrift equivalents 
rather than re-validated against live multi-group data.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to