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

   Part of the Track D proto-native serializer rewrite endgame. With every 
serializer now proto-native, this removes the remaining Thrift model-type 
references from `apps/api/serializers.py`, `apps/api/views.py`, 
`context_processors.py`, and `apps/workspace/views.py`. The REST contract still 
emits the historical **Thrift enum integer** values, but those are now supplied 
by a hardcoded table instead of the legacy Thrift types.
   
   ## What
   - **serializers.py**: new `_THRIFT_ENUM_INTS` table (member name → Thrift 
int for all 22 enums + FileSystems); `proto_enum_int_field` / 
`proto_enum_keyed_map_field` + every enum field helper read it instead of 
importing the Thrift enum. `ResourcePermissionType` becomes a local `IntEnum` 
(used only as comparable sentinels; the sharing facade is addressed by member 
name). **The file no longer imports `airavata.model.*` at all.**
   - **views.py**: `ExperimentSearchFields` filter-key validation reads the 
proto enum's member names; `ResourcePermissionType` references the local 
serializers enum.
   - **context_processors.py**: the notification-priority proto→Thrift-int 
bridge uses the hardcoded `{LOW:0,NORMAL:1,HIGH:2}` table.
   - **workspace/views.py**: the create-experiment input-type checks keep the 
historical Thrift `DataType` integers inline (preserving the pre-existing 
always-false string-vs-int comparison byte-for-byte).
   
   ## Validation
   - Re-validated byte-for-byte across representative families spanning every 
enum category (GRP resource-type + protocols, experiment state/type, 
per-protocol enum-keyed maps + monitor mode, data-product replica enums, 
compute-resource fileSystems map) — output identical with the hardcoded tables.
   - `manage.py check` green; api test failures unchanged vs `origin/main`.
   
   Only the `AuthzToken` auth carrier + test fixtures still reference Thrift 
types (separate follow-ups before dropping the `airavata-python-sdk==2.2.7` + 
`thrift` deps).


-- 
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