Use server-side support to tail job logs#4202
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 16dd505. Configure here.
hanouticelina
left a comment
There was a problem hiding this comment.
looks good to me! let's wait for https://github.com/huggingface-internal/moon-landing/pull/18120 to be deployed before merging.
I will ask cursor to open the same PR for Space logs as well
|
https://github.com/huggingface-internal/moon-landing/pull/18120 already deployed but maybe wait for https://github.com/huggingface-internal/workloads/pull/4314 (for archived logs) |
|
@coyotte508 I didn't see the commit in the last deployment on Slack and when I tested the PR, the server wasn't honoring |
|
https://huggingface.slack.com/archives/C023JAKTR2P/p1778506485624929 but anyway let's wait until I get E2E workings on that other PR (maybe there's a bug that'll be fixed) |
|
ok should all be good, and https://huggingface.co/api/jobs/coyotte508/6a033fe772518a06598ff618/logs?tail=4 (personal job) shows: data: {"data":"===== Job started at 2026-05-12 14:57:43 =====","timestamp":"2026-05-12T14:57:43Z"}
data: {"data":"{ event: 'phase', phase: 'committing' }","timestamp":"2026-05-12T14:58:23.645Z"}
data: {"data":"Branch 'refs/convert/build' created successfully in repo 'coyotte508/fastvlm-webgpu'.","timestamp":"2026-05-12T14:58:24.755Z"}
data: {"data":"Branch 'refs/tmp/build' deleted successfully from repo 'coyotte508/fastvlm-webgpu'.","timestamp":"2026-05-12T14:58:25.157Z"}
data: {"data":"Build and upload completed successfully.","timestamp":"2026-05-12T14:58:25.162Z"}note the |
hanouticelina
left a comment
There was a problem hiding this comment.
thanks! merging unless @Wauplin you want to take a quick look at the PR
|
please go ahead, looks good :) |
|
This PR has been shipped as part of the v1.16.0 release. |

See https://github.com/huggingface-internal/moon-landing/pull/18120
Used as a test case for moon-ide. Didn't test locally
Note
Medium Risk
Extends the Jobs logs streaming path and public
HfApi.fetch_job_logssignature to pass query params through SSE; mistakes could impact log retrieval/retry behavior for job log streaming.Overview
Adds a
tailparameter toHfApi.fetch_job_logsand wires it through the Jobs SSE streaming helpers so log truncation can be handled server-side, including starting afollowstream from the last N lines.Updates
hf jobs logsto allow--followand--tailtogether (removing the previous CLI-side restriction and deque-based tailing), refreshes CLI docs/examples, and adjusts tests to assert the new API call shape.Reviewed by Cursor Bugbot for commit 40af617. Bugbot is set up for automated code reviews on this repo. Configure here.