yasithdev opened a new pull request, #168:
URL: https://github.com/apache/airavata-portals/pull/168
## Summary
Migrate `ComputeResourceViewSet` (and the previously-deferred
`ApplicationDeploymentViewSet.queues` action) from the Thrift client to the
gRPC **compute** facade. This is the deepest read model in Track D. Reuses the
existing serializer via a recursive protobuf→Thrift-attribute adapter, so the
portal's REST contract is unchanged.
- `get_instance`, `all_names`, `all_names_list`, and `queues` now call
`request.airavata.compute.get_compute_resource` /
`get_all_compute_resource_names`.
- The deployment `queues` action (deferred from #166 because it reads a
`ComputeResource`) is completed here: it re-reads the deployment via
`research.get_application_deployment` and the compute resource via the compute
facade.
- Write actions stay on Thrift pending D3.
- New `compute_resource` adapter recursively adapts `batchQueues`
(`BatchQueue`), `jobSubmissionInterfaces` (`JobSubmissionInterface`), the
reused `dataMovementInterfaces`, and the `fileSystems` map.
### Notable bridges
- **`fileSystems`** is a proto `map<int32, string>` whose int key holds a
proto `FileSystems` value (HOME=1) while Thrift `FileSystems` is HOME=0. The
adapter converts each key to the Thrift integer by name and keeps them plain
ints so the serializer's `DictField` renders the same `'0'..'4'` keys the
Thrift i32-keyed map produced.
- **`JobSubmissionProtocol`** needs the explicit `_thrift_enum_mapped`
bridge: proto `JSP_CLOUD` maps to Thrift `CLOUD` (name divergence); the rest
align by name but differ by one in value.
## Test plan
- `manage.py check` clean.
- `all_names` returns 200 live.
- A **seeded compute resource round-trips through the portal with real
data** — batch queue fields, `hostAliases`/`ipAddresses`, and crucially
`fileSystems: {"0":"/home","3":"/scratch"}` (proto HOME=1 / SCRATCH=4 bridged
to Thrift map keys 0/3) all correct.
- Offline render additionally exercises the `JobSubmissionProtocol` map
including `JSP_CLOUD` → `CLOUD`, plus nested batch queues and interfaces.
--
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]