<#1224 feat: populate code_bundle_uri in Task and ...
# flyte-github
a
#1224 feat: populate code_bundle_uri in Task and App serialization Pull request opened by EngHabu Tracking issue Why are the changes needed? The UI uses
code_bundle_uri
to display the source code bundle for a task or app, and
source_code.link
to provide a GitHub link to the defining code. These fields existed in the IDL but were never populated during serialization. What changes were proposed in this pull request? 1.
task_serde.py
: Set
code_bundle_uri
in
TaskMetadata
to
serialize_context.code_bundle.tgz or .pkl
during task serialization. 2.
app_serde.py
: • Set
code_bundle_uri
on
App.Meta
during app serialization (tgz or pkl bundle URI). • Set
source_code
on
App.Meta
with a GitHub tree URL (
<remote>/tree/<sha>
) constructed from
flyte.git.GitStatus
. Gracefully returns
None
when not in a git repo (
is_valid=False
). How was this patch tested? The
code_bundle_uri
and
source_code
fields on
App.Meta
are added in companion PRs: • flyteorg/flyte#7549 — IDL adds
code_bundle_uri
and
source_code
to
App.Meta
• unionai/cloud#16585 — dataproxy reads
meta.code_bundle_uri
from App, falls back to container command args and pod primary container args for PodTemplate apps flyteorg/flyte-sdk