<#739 fix: Populate creator field when deploying a...
# flyte-github
a
#739 fix: Populate creator field when deploying apps Pull request opened by jmonty42 Summary The server requires
spec.creator.principal
(an
EnrichedIdentity
with a
User
or
Application
) when creating apps. The SDK was not setting this field, causing app deployments to fail with:
Copy code
INVALID_ARGUMENT: validation error:
- app.spec.creator.principal: exactly one field is required in oneof [required]
Changes •
src/flyte/app/_deploy.py
: After building the app IDL and before sending the create request, fetch the current authenticated user via
identity_service.UserInfo()
and populate
spec.creator
with an
EnrichedIdentity
containing the user's subject. Wrapped in try/except so deploy continues gracefully if the identity call fails. •
tests/flyte/app/test_app_deploy.py
: New tests verifying creator is set from user info, and that deploy continues with a warning if the identity call fails. Test Plan • 2 new unit tests pass • All 23 existing app tests pass flyteorg/flyte-sdk