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

   ## Summary
   Migrate `ApplicationDeploymentViewSet` reads from the Thrift client to the 
gRPC research facade, continuing the Track D nested read-family repoint. Reuses 
the existing serializer via a recursive protobuf→Thrift-attribute adapter, so 
the portal's REST contract is unchanged.
   
   - `get_list` (both the accessible path and the app-module + 
group-resource-profile path) and `get_instance` now call 
`request.airavata.research.get_accessible_application_deployments` / 
`get_application_deployments_for_app_module_and_group_resource_profile` / 
`get_application_deployment`.
   - Write actions and the `queues` action stay on Thrift: `queues` reads a 
`ComputeResource`, so it moves with the compute-resources family.
   - New `application_deployment` adapter **recursively** adapts the nested 
command lists (`moduleLoadCmds`/`preJobCommands`/`postJobCommands` → 
`CommandObject`) and env-path lists 
(`libPrependPaths`/`libAppendPaths`/`setEnvironment` → `SetEnvPaths`).
   - **Enum-by-name bridge (critical here):** the serializer renders 
`parallelism` as a raw **integer** (the auto-generated field is an 
`IntegerField`, not a `ThriftEnumField`), and proto/Thrift 
`ApplicationParallelismType` integers differ per name (proto `SERIAL=1` vs 
Thrift `SERIAL=0`). The adapter bridges by NAME via `_thrift_enum` to emit the 
Thrift integer the frontend expects — passing the raw proto int would shift 
every value by one (MPI→OPENMP, etc.).
   - The queue-default cluster 
(`defaultQueueName`/`defaultNodeCount`/`defaultCPUCount`/`defaultWalltime`) 
maps the proto-zero 'unset' sentinels back to `None` so the serializer renders 
`null` as Thrift did.
   - `userHasWriteAccess` migrates to the gRPC sharing helper.
   
   ## Test plan
   - `manage.py check` clean.
   - Accessible deployments list returns 200 against the live backend.
   - Offline serializer render with real **nested** protobuf confirms 
command/env lists adapt with all fields, `parallelism` maps to the correct 
Thrift int for every value (SERIAL/MPI/OPENMP/CRAY_MPI), queue-defaults render 
`null`, and `userHasWriteAccess` resolves via sharing.
   - Note: the dev backend has no compute resources to seed a full deployment, 
so nested live data 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: [email protected]

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

Reply via email to