yasithdev opened a new pull request, #200:
URL: https://github.com/apache/airavata-portals/pull/200
Part of the Track D proto-native serializer rewrite (retire the interim
Thrift-type adapter layer, family by family, REST contract byte-for-byte
preserved).
## What
Replace the inline `thrift_utils.create_serializer(<ThriftType>)` rendering
in the 7 admin-only per-protocol detail views with hand-written proto-native
DRF serializers reading the gRPC protobuf directly: LOCAL/SSH/Cloud/Unicore job
submission + LOCAL/SCP/GridFTP data movement, plus the nested
`ResourceJobManager`.
- New `ProtoEnumKeyedMapField` (+ factory) renders a proto
`map<int32,string>` whose int key holds a proto enum value as the `{str(Thrift
enum member): value}` dict the old enum-keyed Thrift map produced (e.g.
`{'JobManagerCommand.SUBMISSION': 'sbatch'}`).
- SecurityProtocol/ResourceJobManagerType/ProviderName render as Thrift ints
via prefix-aligned `proto_enum_int_field`; MonitorMode via its divergent
`name_map` (proto `MONITOR_FORK`/`MONITOR_LOCAL` → Thrift `FORK`/`LOCAL`).
- Repoint the 7 views to pass protobuf straight to the new serializers —
drops the `grpc_adapters` per-protocol funcs (+ `_resource_job_manager`,
`_enum_keyed_map`, `_MONITOR_MODE`) and the now-unused Thrift imports; views.py
no longer imports `thrift_utils`.
## Validation
- Byte-for-byte (all 7 models incl. the two enum-keyed maps, MonitorMode
divergence, nested ResourceJobManager, ProviderName null) vs the old
adapter+thrift_utils `.data`.
- `manage.py check` green; api test failures unchanged vs `origin/main`.
--
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]