You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by "yasithdev (via GitHub)" <gi...@apache.org> on 2026/06/08 23:50:32 UTC
[PR] feat(portal): repoint group resource profile reads to gRPC (Track D, D2) [airavata-portals]
yasithdev opened a new pull request, #169:
URL: https://github.com/apache/airavata-portals/pull/169
## Summary
Migrate `GroupResourceProfileViewSet` reads from the Thrift client to the gRPC **compute** facade — the most deeply nested read model in Track D, and the last read family. Reuses the existing serializer via a recursive protobuf→Thrift-attribute adapter, so the portal's REST contract is unchanged.
- `get_list` and `get_instance` now call `request.airavata.compute.get_group_resource_list` / `get_group_resource_profile`.
- Write actions stay on Thrift pending D3.
- New `group_resource_profile` adapter recursively adapts:
- `computePreferences` (`GroupComputeResourcePreference`), each carrying a **proto-oneof** `EnvironmentSpecificPreferences` union → `{slurm, aws}` (one set, chosen via `WhichOneof`), with the SLURM branch's `reservations` and `groupSSHAccountProvisionerConfigs`;
- `computeResourcePolicies` (`ComputeResourcePolicy`) and `batchQueueResourcePolicies` (`BatchQueueResourcePolicy`).
- **Three enums** render as raw integers and are bridged by name to the Thrift integer: `preferredJobSubmissionProtocol` and `preferredDataMovementProtocol` reuse the existing name-divergent maps (`JSP_CLOUD`→`CLOUD`, `LOCAL` prefixes); `resourceType` uses a new `ResourceType` map (SLURM/AWS align by name, off by one in value).
- Empty credential-store tokens map to `None` so the serializer's `userHasWriteAccess` token READ check (`token is None or ...`) skips unset tokens; that check and the WRITE check migrate to the gRPC sharing helper.
## Test plan
- `manage.py check` clean.
- Empty list returns 200 live (full wiring: token → claims → facade → adapter → serializer → JSON).
- Offline serializer render with a full SLURM-union profile (reservations, SSH provisioner configs, both policy types, all three enum bridges, the `allocationProjectNumber` flattening, and the multi-token sharing check) renders byte-for-byte correct.
- Note: the dev backend's create path needs user context the service-account token doesn't satisfy, so the nested live read was validated via the offline render against real protobuf.
--
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: dev-unsubscribe@airavata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(portal): repoint group resource profile reads to gRPC (Track D, D2) [airavata-portals]
Posted by "yasithdev (via GitHub)" <gi...@apache.org>.
yasithdev merged PR #169:
URL: https://github.com/apache/airavata-portals/pull/169
--
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: dev-unsubscribe@airavata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org