yasithdev opened a new pull request, #205:
URL: https://github.com/apache/airavata-portals/pull/205
Part of the Track D proto-native serializer rewrite (retire the interim
Thrift-type adapter layer, REST contract byte-for-byte preserved). This is the
**last thrift_utils-generated serializer** — after it, every DRF serializer is
proto-native.
## What
Rewrite the GroupResourceProfile family — `GroupResourceProfileSerializer`,
`GroupComputeResourcePreferenceSerializer` (the SLURM/AWS union), and the
Reservation / SSH-provisioner-config / compute-resource-policy /
batch-queue-resource-policy nested serializers — to read the gRPC protobuf
directly, replacing the ~600 lines of Thrift-union manipulation with
proto-native read + write.
- Read flattens the proto `specific_preferences` oneof byte-for-byte as
before (`allocationProjectNumber` lifted to the top, prefs wrapped as
`{'slurm': {...}, 'aws': null}`, top-level `reservations` empty).
- Write rebuilds the proto directly (SLURM/AWS union w/ reservations + SSH
configs + the policies); the viewset's update computes removed prefs/policies
from original vs saved proto and passes protobuf to the facade.
- Removed `grpc_requests.group_resource_profile` + its reverse helpers + the
`_proto_enum`/`_proto_enum_rev` machinery; reduced `grpc_adapters` to only the
user-storage FileMetadataResponse→dict helpers; dropped the now-unused Thrift
imports + serializers.py's `thrift_utils` import.
## Also fixes a regression
PR #202 accidentally removed the `group_resource_profile` read adapter the
GRP viewset still referenced, breaking the GRP read endpoint with a
`NameError`. The proto-native read path restores it.
## Validation
- Byte-for-byte (full SLURM GRP w/ reservations + SSH configs + both policy
types + the union flatten) vs the original adapter+serializer `.data`.
- Write round-trips the full SLURM union.
- `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]