Skip to content

Observing restarts when fetching external dependencies #1399

@aignas

Description

@aignas

🐞 bug report

Affected Rule

whl_library

The issue is caused by the rule:

Is this a regression?

This may be an old bug as the code hasn't changed in a while.

Yes, the previous version in which this bug was not present was: ....

Description

A clear and concise description of the problem...

The whl_library restarts for a lot of times before succeeding to fetch the repo causing unnecessary load. This issue is very similar to what rules_go and gazelle have seen in

🔬 Minimal Reproduction

This can be reproduced by:

$ vim python/pip_install/pip_repository.bzl # add a print statement to better see the restarts
$ cd examples/bzlmod
$ bazel clean --expunge --async && bazel build //entry_points:yamllint
INFO: Starting clean.
INFO: Output base moved to /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025_tmp_6111_adc3dcf2-9c36-468a-87c6-10b180e635fb for deletion
Starting local Bazel server and connecting to it...
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/extensions/python.bzl:44:10: WARNING: Ignoring toolchain 'python_3_9' from module 'other_module': Toolchain 'python_3_9' from module 'example_bzlmod' already registered Python version 3.9 and has precedence
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/extensions/python.bzl:44:10: WARNING: Ignoring toolchain 'python_3_11' from module 'other_module': Toolchain 'python_3_11' from module 'rules_python' already registered Python version 3.11 and has precedence
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_yamllint
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_setuptools
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_pyyaml
DEBUG: /private/var/tmp/_bazel_aignas/ee423e5d9d08c035dfd0b914eadb5025/external/rules_python~override/python/pip_install/pip_repository.bzl:619:10: Fetching whl_library: {} rules_python~override~pip~pip_39_pathspec
INFO: Analyzed target //entry_points:yamllint (79 packages loaded, 3063 targets configured).
INFO: Found 1 target...
Target //entry_points:yamllint up-to-date:
  bazel-bin/entry_points/rules_python_entry_point_yamllint.py
  bazel-bin/entry_points/_yamllint
INFO: Elapsed time: 50.036s, Critical Path: 5.67s
INFO: 14 processes: 13 internal, 1 darwin-sandbox.
INFO: Build completed successfully, 14 total actions
aignas@FA21050003 ~/src/github/aignas/rules_python/examples/bzlmod main

🌍 Your Environment

Running on OSX with bazelisk invoking bazel within rules_python examples/bzlmod example.

$ bazel version
Bazelisk version: development
Build label: 6.0.0
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Mon Dec 19 16:07:42 2022 (1671466062)
Build timestamp: 1671466062
Build timestamp as int: 1671466062

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