From 4e403006d2b8023036d73da1f7ae277a39c81f9e Mon Sep 17 00:00:00 2001 From: Jac Fitzgerald Date: Fri, 18 Sep 2026 13:53:28 -0700 Subject: [PATCH] samples(list_jobs): also print JobItem.status_notes alongside notes PR #1852 (parse into JobItem.status_notes) added a structured list[dict] surface for modern job types, but this sample still only printed the legacy list[str] `notes` attribute. Modern jobs (extract refresh v2 shapes and later) surface their diagnostics via `status_notes`; the sample now prints both so running `list_jobs.py --wait ` against a real server exercises the #1852 parser end to end. Zero library changes. --- samples/list_jobs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/samples/list_jobs.py b/samples/list_jobs.py index b72d6a7b5..1c9bd9e8d 100644 --- a/samples/list_jobs.py +++ b/samples/list_jobs.py @@ -131,10 +131,14 @@ def _wait_for_job(server, job_id, timeout): raise SystemExit(2) except JobFailedException as exc: # The exception carries the failed JobItem so callers can inspect it. - print(f"Job {job_id} failed: notes={exc.job.notes}") + # `notes` is the legacy list[str] surface; `status_notes` is the structured + # list[dict] shape emitted for modern job types (see JobItem docstring). + print(f"Job {job_id} failed: notes={exc.job.notes} status_notes={exc.job.status_notes}") raise SystemExit(1) from exc - print(f"Job {job_id} finished. finish_code={job.finish_code} notes={job.notes}") + print( + f"Job {job_id} finished. finish_code={job.finish_code}" f" notes={job.notes} status_notes={job.status_notes}" + ) if __name__ == "__main__":