Skip to content

Mark Python tests that need network access#1872

Open
gordonmessmer wants to merge 1 commit intohuggingface:mainfrom
gordonmessmer:network-tests
Open

Mark Python tests that need network access#1872
gordonmessmer wants to merge 1 commit intohuggingface:mainfrom
gordonmessmer:network-tests

Conversation

@gordonmessmer
Copy link
Contributor

I would like to mark tests that need network access in order to more easily disable them when building the software in an environment that restricts network access.

I'll mark this PR a draft while I try to determine which other tests require network access.

@gordonmessmer gordonmessmer marked this pull request as draft October 2, 2025 19:11
@gordonmessmer gordonmessmer marked this pull request as ready for review October 2, 2025 21:20
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Not super sure this is very important, will leave it as is

@gordonmessmer
Copy link
Contributor Author

Please consider marking tests that need network access so that they can be disabled easily.

In Fedora and related distributions, packages are built without network access to ensure that the source code provided is the only information required to produce the binary build artifact.

SLSA Build Level 4 is likely to specify hermetic builds as a secure build practice, in the future (as early drafts did). https://slsa.dev/spec/v1.2/future-directions

@gordonmessmer gordonmessmer force-pushed the network-tests branch 2 times, most recently from 61f332d to 41d8af8 Compare December 5, 2025 06:25
@jpodivin
Copy link

jpodivin commented Feb 4, 2026

I would also like to ask for this change to be implemented. It would simplify CI/CD in cases when network access is limited, for example for security reasons. Furthermore, it wouldn't impact experience of developers in situations when that is not the case.

@ArthurZucker
Copy link
Collaborator

sur, feel free to rebase fix conflicts!

@gordonmessmer
Copy link
Contributor Author

I've rebased on main and tested a variant of this patch against 0.22.2 for a networkless build.

@HuggingFaceDocBuilderDev

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.

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.

4 participants