Skip to content

[fix] Transient locaion error due to CDN#4339

Merged
Wauplin merged 1 commit into
mainfrom
fix-transient-location-error-due-to-cdn
Jun 11, 2026
Merged

[fix] Transient locaion error due to CDN#4339
Wauplin merged 1 commit into
mainfrom
fix-transient-location-error-due-to-cdn

Conversation

@Wauplin

@Wauplin Wauplin commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

should fix this transient error

FAILED ..\tests\test_file_download.py::CachedDownloadTests::test_get_hf_file_metadata_from_a_lfs_file - AssertionError: 'xethub.hf.co' not found in 'https://us.aws.cdn.hf.co/xet-bridge-us/621ffdc036468d709f17434d/4195b41d9f36814bcbecf956b7e90bcbf41105ce9dd695a97246266b9328af55?X-Xet-Cas-Uid=public&response-content-disposition=inline%3B+filename*%3DUTF-8%27%27tf_model.h5%3B+filename%3D%22tf_model.h5%22%3B&Expires=1781168727&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly91cy5hd3MuY2RuLmhmLmNvL3hldC1icmlkZ2UtdXMvNjIxZmZkYzAzNjQ2OGQ3MDlmMTc0MzRkLzQxOTViNDFkOWYzNjgxNGJjYmVjZjk1NmI3ZTkwYmNiZjQxMTA1Y2U5ZGQ2OTVhOTcyNDYyNjZiOTMyOGFmNTVcXD9YLVhldC1DYXMtVWlkPXB1YmxpYyZyZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPWlubGluZSUzQitmaWxlbmFtZSUyQSUzRFVURi04JTI3JTI3dGZfbW9kZWwuaDUlM0IrZmlsZW5hbWUlM0QlMjJ0Zl9tb2RlbC5oNSUyMiUzQiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiRXBvY2hUaW1lIjoxNzgxMTY4NzI3fX19XX0_&Signature=MEUCIHpPGgUtNdIVczEOFwPbLxlinhbLx0bRJVS75rSUjJ9pAiEAhfRXpPAWbxzNq4uYwbDgWIB67yCgAv1J060ysofIl3A_&Key-Pair-Id=01KAYHXK2CBJSW0YZTMNXK9W1M'

CDN is used only X% of the time, hence the transient error and the need for a double check


Note

Low Risk
Test-only change with no production code or security impact.

Overview
Fixes flaky CI in test_get_hf_file_metadata_from_a_lfs_file by loosening the redirect URL check when fetching LFS metadata for gpt2/tf_model.h5.

The test no longer requires metadata.location to always include xethub.hf.co; it now passes if the final URL contains xethub.hf.co or cdn.hf.co, matching intermittent Hub routing to the CDN. The LFS size assertion is unchanged.

Reviewed by Cursor Bugbot for commit 79a5f43. Bugbot is set up for automated code reviews on this repo. Configure here.

@Wauplin Wauplin merged commit f6b439c into main Jun 11, 2026
25 checks passed
@Wauplin Wauplin deleted the fix-transient-location-error-due-to-cdn branch June 11, 2026 08:22
@bot-ci-comment

Copy link
Copy Markdown

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.

@huggingface-hub-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped as part of the v1.19.0 release.

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.

1 participant