<#1352 feat: add Action.get_report to pull reports...
# flyte-github
a
#1352 feat: add Action.get_report to pull reports from actions inside a run Pull request opened by cosmicBboy Summary
Run.get_report()
(added recently) only fetches the HTML report for a run's root action. This PR adds
Action.get_report()
, letting you pull the report artifact for any action nested inside a run (e.g. a child task invoked by the root task), using that action's own id and latest attempt. •
Action.get_report(attempt=None, expires_in=1h)
— requests a signed download link from the data proxy for the action's
ARTIFACT_TYPE_REPORT
, downloads it, and returns the HTML string. Defaults to the latest attempt. Raises a clear error naming the action and run when no report exists. •
Run.get_report()
now delegates to its root action's
get_report()
, removing the duplicated data-proxy/download logic (and the now-unused imports in
_run.py
). Usage run = flyte.run(make_report, name="world") run.wait() # Root action report (unchanged) root_html = run.get_report() # Report from a specific action inside the run for action in flyte.remote.Action.listall(for_run_name=run.name): if action.task_name == child_report.name: child_html = action.get_report() Tests • Updated the 4 existing
Run.get_report
tests (patch targets moved to the
_action
module since the logic moved there). • Added 2 tests for `Action.get_report`: a nested action fetches its own report by its own id/latest attempt, and the error message references the action and run. • Full remote suite: 474 passed. Example Updated
examples/remote_management/get_report.py
to a root task that invokes a child task (both
report=True
), then fetches both the root report and the child action's report. Verified live against the demo cluster: the run succeeded, and the two downloaded HTML files each contained only their respective action's content (root → "Hello, world!", child → "Child report for world"). 🤖 Generated with Claude Code flyteorg/flyte-sdk