Skip to content

SimpleAPI download failures are cached and require bazel clean #3260

Description

@brandonchinn178

🐞 bug report

Affected Rule

pip.parse()

Is this a regression?

Probably not.

Description

We have a downloader config that rewrites URLs to a private Artifactory instance that's only accessible via our VPN. If I try to build without the VPN, I get an expected failure:

Error in fail: Failed to download metadata for ["nh3", "idna", "rich", "zipp", "mdurl", "twine", "certifi", "keyring", "pkginfo", "rfc3986", "urllib3", "docutils", "pygments", "requests", "jaraco-classes", "jaraco-context", "markdown-it-py", "more-itertools", "readme-renderer", "jaraco-functools", "backports-tarfile", "requests-toolbelt", "charset-normalizer", "importlib-metadata", "cffi", "jeepney", "pycparser", "cryptography", "secretstorage", "pywin32-ctypes"] for from urls: ["https://pypi.org/simple"].
If you would like to skip downloading metadata for these packages please add 'simpleapi_skip=[
    "nh3",
    "idna",
    "rich",
    "zipp",
    "mdurl",
    "twine",
    "certifi",
    "keyring",
    "pkginfo",
    "rfc3986",
    "urllib3",
    "docutils",
    "pygments",
    "requests",
    "jaraco-classes",
    "jaraco-context",
    "markdown-it-py",
    "more-itertools",
    "readme-renderer",
    "jaraco-functools",
    "backports-tarfile",
    "requests-toolbelt",
    "charset-normalizer",
    "importlib-metadata",
    "cffi",
    "jeepney",
    "pycparser",
    "cryptography",
    "secretstorage",
    "pywin32-ctypes",
]' to your 'pip.parse' call.

However, even after turning on the VPN, I still get this error until I do bazel clean. It seems like failed downloads are cached, and shouldn't be?

🔬 Minimal Reproduction

🔥 Exception or Error

🌍 Your Environment

Operating System:

  

  

Output of bazel version:

  
Bazelisk version: 1.25.0
Build label: 8.2.1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Thu Apr 17 18:31:45 2025 (1744914705)
Build timestamp: 1744914705
Build timestamp as int: 1744914705
  

Rules_python version:

  
1.4.1
  

Anything else relevant?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions