Skip to content

Guard upload_pr_documentation workflow to upstream repo only - #2

Merged
g0rdonL merged 160 commits into
mainfrom
guard-upload-pr-documentation-479674078769653152
Oct 8, 2026
Merged

g0rdonL merged 160 commits into
mainfrom
guard-upload-pr-documentation-479674078769653152

Conversation

@g0rdonL

@g0rdonL g0rdonL commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Add job-level guard to build job in upload_pr_documentation.yaml so it only runs when github.repository == 'huggingface/huggingface_hub'.


PR created automatically by Jules for task 479674078769653152 started by @g0rdonL

huggingface-hub-bot Bot and others added 30 commits August 27, 2026 14:22
Co-authored-by: huggingface-hub-bot[bot] <huggingface-hub-bot[bot]@users.noreply.github.com>
…`--label`/`--name`) (huggingface#4773)

* Align `hf jobs scheduled ls` filters with `hf jobs ls`

Requested by @Wauplin (Lucain Pouget) via Moon Bot.
Co-authored-by: Wauplin <Wauplin@users.noreply.github.com>
Slack thread: https://huggingface.slack.com/archives/C02V5EA0A95/p1787841077235539?thread_ts=1787841077.235539&cid=C02V5EA0A95

* Remove tests from PR

Requested by @Wauplin (Lucain Pouget) via Moon Bot.
Co-authored-by: Wauplin <Wauplin@users.noreply.github.com>
Slack thread: https://huggingface.slack.com/archives/C02V5EA0A95/p1787841077235539?thread_ts=1787841077.235539&cid=C02V5EA0A95

* Regenerate CLI reference docs

Requested by @Wauplin (Lucain Pouget) via Moon Bot.
Co-authored-by: Wauplin <Wauplin@users.noreply.github.com>
Slack thread: https://huggingface.slack.com/archives/C02V5EA0A95/p1787841077235539?thread_ts=1787841077.235539&cid=C02V5EA0A95

* Fix mypy: rename label loop variable to avoid shadowing

Requested by @Wauplin (Lucain Pouget) via Moon Bot.
Co-authored-by: Wauplin <Wauplin@users.noreply.github.com>
Slack thread: https://huggingface.slack.com/archives/C02V5EA0A95/p1787841077235539?thread_ts=1787841077.235539&cid=C02V5EA0A95

---------

Co-authored-by: moonbot[bot] <moonbot[bot]@users.noreply.github.com>
Co-authored-by: Wauplin <Wauplin@users.noreply.github.com>
…uggingface#4739)

* [Download] Follow redirects between Hub hosts when resolving files

* [Download] Keep auth header when download location stays on a Hub host

* [Download] Drop redirect cap, keep the original unbounded loop

* [Download] Bound redirect following at httpx's default of 20

* [Download] Name the redirect bound

* less verbose please

---------

Co-authored-by: Lucain <lucain@huggingface.co>
huggingface#4767)

* [Download] A `ResolvedRevision` only pins the repo it was resolved for

A commit hash means nothing outside of the repo it comes from, but a
`ResolvedRevision` used to be trusted by any repo: `resolve_revision`
returned it untouched, and the download helpers used its commit hash
whatever repo they were fetching from. A library resolving a revision for
one repo and reusing it for another (a base model and its adapter, a
pipeline component in its own repo, ...) would then request a commit that
does not exist there.

Instances now remember the repo (id + type) they were resolved against,
and only pin that one. Anywhere else, the revision initially requested is
used instead, and resolved again if needed.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

* [Download] Scope the fix to resolve_revision: drop _commit_hash_for

Download helpers trust the passed `ResolvedRevision` again (`revision.resolved`
as before). The only behavior change is in `HfApi.resolve_revision`: a revision
resolved for another repo is resolved again for the requested one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…gingface#4776)

The torch~=1.11 matrix entry's test_name was renamed from
"Python 3.9, torch_1.11" to "Python 3.10, torch_1.11", but the
install-step case arm further down was not updated to match. The
esac has no `*)` default arm, so the case silently falls through,
torch is never installed on this lane, and its tests skip with
"Test requires torch" while the job still reports green.
…completion on hf-inference (huggingface#4784)

* Do not require the conversational tag for chat-completion on hf-inference

The Hub no longer requires the "conversational" tag to serve
text-generation / image-text-to-text models through the chat-completion
API for inference providers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Clarify comment: raw text-generation is hf-inference specific

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Remove comment

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Update task-check test expectations

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…huggingface#4765)

* [Release] Drop duplicate HF CLI skill sync job

Every release opened two PRs on huggingface/skills: one from this job and
one from sync-hf-cli-skill.yml, which the release tag push also triggers.
Only the standalone workflow bumps the plugin version and regenerates the
skills repo artifacts, so its PR is the one that passes validate.

* [Release] Keep the skill sync in the release workflow instead

Reverses the previous commit's direction: rather than deleting the job and
relying on the tag-triggered workflow, port the working implementation (uv,
plugin version bump, publish.sh, SKILL.md-scoped diff) into the release job
and delete sync-hf-cli-skill.yml. One sync, inside the workflow that already
reports to the release Slack thread and the final status check.

The PR body now points at the release tag rather than github.sha, which on a
workflow_dispatch run is main's HEAD, not the commit that was synced.
…#4798)

Bumps the actions group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [huggingface/doc-builder/.github/workflows/build_main_documentation.yml](https://github.com/huggingface/doc-builder) | `af49b8dc3859c3d80c7220c8c0ba146431132e49` | `c2d27f6f231df3d1b07f3a7ea54fe3d0f8bc3e27` |
| [huggingface/doc-builder/.github/workflows/build_pr_documentation.yml](https://github.com/huggingface/doc-builder) | `af49b8dc3859c3d80c7220c8c0ba146431132e49` | `c2d27f6f231df3d1b07f3a7ea54fe3d0f8bc3e27` |
| [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `10.0.0` | `10.0.1` |
| [trufflesecurity/trufflehog](https://github.com/trufflesecurity/trufflehog) | `3.96.0` | `3.97.1` |
| [huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml](https://github.com/huggingface/doc-builder) | `af49b8dc3859c3d80c7220c8c0ba146431132e49` | `c2d27f6f231df3d1b07f3a7ea54fe3d0f8bc3e27` |



Updates `huggingface/doc-builder/.github/workflows/build_main_documentation.yml` from af49b8dc3859c3d80c7220c8c0ba146431132e49 to c2d27f6f231df3d1b07f3a7ea54fe3d0f8bc3e27
- [Release notes](https://github.com/huggingface/doc-builder/releases)
- [Changelog](https://github.com/huggingface/doc-builder/blob/main/RELEASE.md)
- [Commits](huggingface/doc-builder@af49b8d...c2d27f6)

Updates `huggingface/doc-builder/.github/workflows/build_pr_documentation.yml` from af49b8dc3859c3d80c7220c8c0ba146431132e49 to c2d27f6f231df3d1b07f3a7ea54fe3d0f8bc3e27
- [Release notes](https://github.com/huggingface/doc-builder/releases)
- [Changelog](https://github.com/huggingface/doc-builder/blob/main/RELEASE.md)
- [Commits](huggingface/doc-builder@af49b8d...c2d27f6)

Updates `astral-sh/setup-uv` from 10.0.0 to 10.0.1
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@ae62891...20cfd1b)

Updates `trufflesecurity/trufflehog` from 3.96.0 to 3.97.1
- [Release notes](https://github.com/trufflesecurity/trufflehog/releases)
- [Commits](trufflesecurity/trufflehog@6f3c981...20652fb)

Updates `huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml` from af49b8dc3859c3d80c7220c8c0ba146431132e49 to c2d27f6f231df3d1b07f3a7ea54fe3d0f8bc3e27
- [Release notes](https://github.com/huggingface/doc-builder/releases)
- [Changelog](https://github.com/huggingface/doc-builder/blob/main/RELEASE.md)
- [Commits](huggingface/doc-builder@af49b8d...c2d27f6)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 10.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: huggingface/doc-builder/.github/workflows/build_main_documentation.yml
  dependency-version: c2d27f6f231df3d1b07f3a7ea54fe3d0f8bc3e27
  dependency-type: direct:production
  dependency-group: actions
- dependency-name: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml
  dependency-version: c2d27f6f231df3d1b07f3a7ea54fe3d0f8bc3e27
  dependency-type: direct:production
  dependency-group: actions
- dependency-name: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml
  dependency-version: c2d27f6f231df3d1b07f3a7ea54fe3d0f8bc3e27
  dependency-type: direct:production
  dependency-group: actions
- dependency-name: trufflesecurity/trufflehog
  dependency-version: 3.97.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ce#4809)

* [Docs] Clarify Jobs argument forwarding and align examples

* [Docs] Distinguish option ordering from argument forwarding

* [Docs] Focus Jobs guidance on the explicit argument separator

* [Docs] Explain where script help arguments are forwarded
`CommitInfo.__new__` took `commit_url` as a required keyword-only argument, so
the reconstruction path used by `copy`/`pickle` (`cls.__new__(cls,
*self.__getnewargs__())`, i.e. positional string value only) raised a
TypeError. `commit_url` is now a regular parameter and a `__reduce__` is added
so all fields survive the round-trip, mirroring what `ResolvedRevision`
already does.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ingface#4817)

* [Download] Prevent cached file copies during local-dir dry runs

* Apply suggestion from @Wauplin

* Apply suggestion from @Wauplin

---------

Co-authored-by: Lucain <lucainp@gmail.com>
)

* Keep single-quoted values verbatim in load_dotenv

* Apply style fixes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…e prefix (huggingface#4804)

* [CLI] Fix 'hf buckets rm --recursive' deleting lexical siblings of the prefix

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* [CLI] Apply the same path-boundary filter to 'hf buckets ls'

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* [Sandbox] Support custom labels in Sandbox.create

* [CLI] Add labels to sandbox create
…ggingface#4823)

* [CLI] Don't let `hf update` self-upgrade a pip install on Windows

Windows refuses to replace the `hf.exe` launcher of a running process,
so `pip install -U huggingface_hub` spawned by `hf update` fails with
WinError 32 after having uninstalled the current version, leaving a dead
launcher and no `huggingface_hub` module. Print the command for the user
to run instead, like pip does for its own self-upgrade.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* [CLI] Use out.error + Exit(1) instead of CLIError

Avoids the "set HF_DEBUG=1 for full traceback" hint: this is an
instruction to the user, not an internal failure.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e#4828)

* [HfFileSystem] Reject unsafe paths before local downloads

* Apply suggestion from @Wauplin

* Apply suggestion from @Wauplin
…uggingface#4826)

* [Download] Share retry handling for stream entry and body failures

* [Download] Remove added retry unit tests
* [Download] Tolerate missing HEAD Content-Length

* [Download] Allow missing HEAD size when Xet is unavailable

---------

Co-authored-by: Celina Hanouti <hanouticelina@gmail.com>
…ggingface#4829)

`snapshot_download` rewrote `refs/<revision>` with a plain `open(path, "w")` on every
call, even when the commit hash was unchanged. `open(..., "w")` truncates the file
before rewriting it, so a concurrent reader can observe an empty revision and conclude
that a fully cached file is missing.

Use the existing `_cache_commit_hash_for_specific_revision` helper instead: it skips the
write when the ref is already up to date and otherwise writes to a temporary file and
`os.replace`s it into place. `hf_hub_download` and `HfApi.resolve_revision` already go
through it.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ggingface#4846)

* [CLI] Raise explicit error for shell-script extensions on Windows

* [CLI] Surface install errors from extension auto-install

* [CLI] Drop Windows-specific extension install tests
* [Jobs] Add network groups to hf jobs run

* Trim network groups guide sections

---------

Co-authored-by: Lucain <lucain@huggingface.co>
…ace#4842)

* Fix dotenv parser truncating unquoted values containing '#'

* fix empty values swallowing inline comments and quoted values absoprtion bug

* bare keys with comments dropped bug fixed

* bare key alternative fix
Co-authored-by: huggingface-hub-bot[bot] <huggingface-hub-bot[bot]@users.noreply.github.com>
Wauplin and others added 9 commits October 1, 2026 14:30
…huggingface#5055)

* [CLI] Rename 'hf spaces zero-gpu-quota' to 'hf spaces zero-gpu quota'

Keep 'hf spaces zero-gpu-quota' as a hidden alias since it was released in v2.1.0.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* [CLI] Drop hidden zero-gpu-quota alias and CLI test

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…5042)

* [CI] Run only transfer tests in the 'no hf_xet' jobs

Unmarked tests (repos, discussions, settings, collections, CLI output...) don't
depend on Xet but ran in both the "with hf_xet" and "no hf_xet" jobs, doubling
their load on the staging Hub. They now run only with hf_xet installed. The
"no hf_xet" jobs run the new `both_xet_modes` tests: the ones that move
LFS/Xet-backed files or call `upload_folder`, where the code path differs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* [CI] Split tests into api / transfer / inference suites

Each test belongs to exactly one suite, selected with `pytest -m <suite>`.
Unmarked tests get the `api` marker automatically and `xet` / `no_xet`
imply `transfer`. Conflicting markers fail the test explicitly.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…uggingface#5057)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…write, reruns 8 -> 3 (huggingface#5058)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…face#5063)

* (fix) Fixed both the bugs

* (fix)Made minor changes in the tests to account for the changes
…_download (huggingface#5067)

* [Download] Warn when allow/ignore patterns match no files in snapshot_download

* Apply suggestion from @Wauplin

* Apply suggestion from @Wauplin

---------

Co-authored-by: Lucain <lucainp@gmail.com>
…face#5069)

* [Repocard] Respect configured endpoint when validating cards

* [Repocard] Keep endpoint fix minimal
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

angt and others added 17 commits October 5, 2026 09:09
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
)

Co-authored-by: célina <hanouticelina@gmail.com>
* Bump doc-builder pin to 9fc8a41 (scoped PR-preview upload)

* Bump doc-builder pin to 9fc8a41 (scoped PR-preview upload)
…ace#5093)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ngface#5092)

* [Jobs] Fix no-follow logs hanging while the job keeps printing

* add --follow hint to hf jobs logs

* use strptime for Date header

* use parsedate_to_datetime for Date header

* Update src/huggingface_hub/cli/jobs.py

* fix quality
…ce#4942)

* [Download] Consider port when following /resolve redirects

`_is_same_or_hub_host` compared hostnames only, so a /resolve redirect
to the same hostname on a different port (e.g. an xet bridge or CDN
behind the same hostname) was treated as an intra-Hub redirect and
followed. The file metadata was then read from the storage host's
response instead of the Hub's 302 (commit_hash=None => downloads fail
with LocalEntryNotFoundError), and the Authorization header was
forwarded to the storage host, contradicting the "auth must not leave
the Hub" rule.

Compare origins (scheme + host + port, with scheme-default ports) and
only trust known Hub hosts on their scheme's standard port, so e.g.
`HF_ENDPOINT=http://localhost:15564` does not make
`http://localhost:14886` a trusted Hub host.

Fixes both call sites for free: redirect following in
`_httpx_follow_hub_redirects_with_backoff` and auth stripping in
`_get_metadata_or_catch_error`.

Regression since huggingface#4739 (v1.30.0), which started following redirects
between Hub hosts. Before that, only relative redirects were followed.

* [Tests] Avoid request-derived value in Location header of fake Hub server

Silences a CodeQL HTTP Response Splitting false positive on the test
fixture: the redirect target is fixed for the test, so build it from
literals instead of from self.path.

* [Quality] Trim comments on redirect handling

* [Download] Trust Hub origins instead of hostnames when following redirects

* [Tests] Use renamed httpx2 redirect helper

* fix tests: keep only the _is_same_or_hub_host unit test, no mocks

---------

Co-authored-by: célina <hanouticelina@gmail.com>
…ace#5090)

* [CLI] Snapshot by default in hf jobs stats, add -f/--follow

* fix snapshot hanging on jobs that send no metrics

* align fetch_job_metrics with fetch_job_logs (follow param)

* add a hint when hf jobs stats -f ends

* fix stats -f end hint claiming jobs stopped
* fix ls new empty bucket

* Update src/huggingface_hub/hf_file_system.py

---------

Co-authored-by: célina <hanouticelina@gmail.com>
…uggingface#5099)

* [HfFileSystem] Replace cached listings instead of appending to them

_ls_tree appended each fetched entry to its parent's dircache listing.
Cached listings got duplicates, and refresh=True kept deleted files.
A listing that failed halfway stayed cached as if it were complete.
On buckets, ls() on a file cached that file alone as its folder's listing.

Build the listings while iterating, then store them once the listing is
complete. Skip the entry for the listed path itself, which only buckets
return.

* fix tests: replace mocked listings with a staging test

---------

Co-authored-by: Celina Hanouti <hanouticelina@gmail.com>
* [CI] Retry transient hub-ci errors in tests

* rerun on BadRequestError instead of matching server messages

* fix: keep only the bucket listing wait
huggingface#5102)

* Fix race in _get_version that makes concurrent downloads skip hf_xet

* Update src/huggingface_hub/utils/_runtime.py

---------

Co-authored-by: célina <hanouticelina@gmail.com>
@g0rdonL
g0rdonL force-pushed the guard-upload-pr-documentation-479674078769653152 branch from 0725616 to 3cfa593 Compare October 8, 2026 04:17
@g0rdonL
g0rdonL merged commit c42f32b into main Oct 8, 2026
14 of 26 checks passed
@g0rdonL
g0rdonL deleted the guard-upload-pr-documentation-479674078769653152 branch October 8, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.