yasithdev opened a new pull request, #170: URL: https://github.com/apache/airavata-portals/pull/170
## Summary Migrate the **core experiment reads** from the Thrift client to the gRPC research facade — `ExperimentModel` is the deepest read model in the portal. Reuses the existing serializer via a recursive protobuf→Thrift-attribute adapter, so the REST contract is unchanged. - `ExperimentViewSet.get_instance` → `research.get_experiment`; `ProjectViewSet.experiments` → `get_experiments_in_project`; `ExperimentViewSet.jobs` → `get_job_details`. - Write paths (create/update/launch/clone) and `FullExperimentViewSet` / archive / statistics stay on Thrift for follow-up. - New `experiment` adapter recursively adapts the **processes → tasks → jobs tree** (each level with its status list), the user configuration data (+ computational resource scheduling), and the input/output/status/error lists. A new `job_model` adapter backs both the jobs action and the nested task jobs. - **Prefix-stripping enum bridge:** the status/type enums render as raw integers, and proto3 namespaces their members with a per-enum prefix (`EXPERIMENT_STATE_CREATED` vs Thrift `CREATED`). New `_thrift_enum_prefixed` helper strips the prefix and bridges by name to the Thrift integer, mapping the zero `*_UNKNOWN` sentinel to `None`. Covers `ExperimentState`, `ProcessState`, `TaskState`, `JobState`, `ExperimentType`, `TaskTypes`. - `ExperimentSerializer.userHasWriteAccess` migrates to the gRPC sharing helper. - The legacy workflow-engine fields (`experiment.workflow`, `process.processWorkflows`) are not adapted (rarely populated) and default to `None`/`[]` as Thrift did for non-workflow experiments. ## Test plan - `manage.py check` clean. - `experiments-in-project` returns 200 live (proving the full token → facade → `experiment()` adapter → serializer path); a missing experiment maps the backend error to HTTP. - Offline serializer render of a full experiment tree (processes → tasks → jobs with statuses) confirms every state/type enum bridges to the correct Thrift integer (e.g. process `EXECUTING` proto 7 → Thrift 6, job `ACTIVE` proto 3 → Thrift 2), the scheduling/userConfig nesting renders, and `userHasWriteAccess` resolves via sharing. - Note: the dev backend's experiment create needs an app-interface entity it lacks, so the populated tree 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]
