yasithdev opened a new pull request, #158: URL: https://github.com/apache/airavata-portals/pull/158
## Summary First view migration off Thrift onto the new gRPC facade (Track D, D2), establishing the reusable pattern for the rest of `apps/api`. The portal's REST contract with the Vue frontend is **unchanged** — existing serializers are reused as-is. - **ProjectViewSet reads** (`get_list`, `get_instance`, `list_all`) now call `request.airavata.research.get_user_projects`/`get_project` instead of the Thrift `request.airavata_client`. Writes (create/update) stay on Thrift for **D3**; the `experiments` action stays on Thrift (migrates with the experiments family). - **`grpc_adapters.project()`** — adapts the gRPC `Project` protobuf to the Thrift attribute names the existing `ProjectSerializer` reads (`project_id`→`projectID`, `creation_time`→`creationTime`, …), so serializer output is identical **by construction**. Verified: a real `Project` protobuf maps onto all 8 Thrift `Project` fields. - **`exceptions.custom_exception_handler`** — maps gRPC `StatusCode` → HTTP (NOT_FOUND→404, PERMISSION_DENIED→403, UNAUTHENTICATED→401, INVALID_ARGUMENT→400, ALREADY_EXISTS→409, UNAVAILABLE→`apiServerDown` 500), mirroring the Thrift handling so migrated views behave identically. Reused by every later migration. ## Requirements fix (corrects D1 #157) The generated stubs use protobuf's `runtime_version` (added in **5.26**), so D1's `protobuf>=4.25` was too low — corrected to `protobuf>=5.26,<7` (`googleapis-common-protos` caps `<7`). Removed the **unused** `google-api-python-client`, whose `google-api-core` transitive hard-pinned `protobuf<4` (incompatible with the new stubs; nothing in the portal imports it). The protobuf≥4 / MFT-stub consequence noted in #157 still stands (MFT regen → D4; dev `DjangoFileSystemProvider` path unaffected). ## Test plan - `pip check` — clean (no protobuf/google conflicts). - generated stubs import; `manage.py check` — no issues. - Structural verification: a real `Project` protobuf through `grpc_adapters.project()` exposes all 8 Thrift `Project` fields with correct values, and the unchanged `ProjectSerializer` therefore yields the same JSON. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
