Skip to content

Conversation

@YifeiZhuang
Copy link
Contributor

@YifeiZhuang YifeiZhuang commented Oct 31, 2025

Fix bazel build //release:release-tars build error. It looks bazel is confused about the python version.
This problem is probably linux environment only(not exist in the CI machine or mac).

This is error log from my glinux machine:

$  bazel clean && bazel build //release:release-tars
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
INFO: Analyzed target //release:release-tars (1358 packages loaded, 23560 targets configured).
INFO: Found 1 target...
ERROR: /usr/local/google/home/zivy/cloud-provider-gcp/deploy/BUILD:5:8: PackageTar deploy/manifest.tar failed: (Exit 1): build_tar failed: error executing command
  (cd /usr/local/google/home/zivy/.cache/bazel/_bazel_zivy/5c54abc67a5cbd579d396d87a25726a1/sandbox/linux-sandbox/14902/execroot/io_k8s_cloud_provider_gcp && \
  exec env - \
    PATH=/usr/local/google/home/zivy/bin:/usr/local/sbin/protoc-gen-grpc:/usr/local/google/home/zivy/jdk-11.0.2/bin:/usr/lib/google-golang/bin:/usr/local/buildtools/java/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
  bazel-out/k8-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/build_defs/pkg/build_tar --flagfile bazel-out/k8-fastbuild/bin/deploy/manifest.args)
# Configuration: 9b10e5be35fc4899806d8665ae6c56a3240c98b076914940f994efbcd04406d7
# Execution platform: @local_config_platform//:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Traceback (most recent call last):
  File "/usr/local/google/home/zivy/.cache/bazel/_bazel_zivy/5c54abc67a5cbd579d396d87a25726a1/sandbox/linux-sandbox/14902/execroot/io_k8s_cloud_provider_gcp/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/tools/build_defs/pkg/build_tar.py", line 21, in <module>
    from absl import app
  File "/usr/local/google/home/zivy/.cache/bazel/_bazel_zivy/5c54abc67a5cbd579d396d87a25726a1/sandbox/linux-sandbox/14902/execroot/io_k8s_cloud_provider_gcp/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/third_party/py/abseil/absl/app.py", line 38, in <module>
    from absl import flags
  File "/usr/local/google/home/zivy/.cache/bazel/_bazel_zivy/5c54abc67a5cbd579d396d87a25726a1/sandbox/linux-sandbox/14902/execroot/io_k8s_cloud_provider_gcp/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/third_party/py/abseil/absl/flags/__init__.py", line 40, in <module>
    from absl.flags import _argument_parser
  File "/usr/local/google/home/zivy/.cache/bazel/_bazel_zivy/5c54abc67a5cbd579d396d87a25726a1/sandbox/linux-sandbox/14902/execroot/io_k8s_cloud_provider_gcp/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/third_party/py/abseil/absl/flags/_argument_parser.py", line 29, in <module>
    from absl.flags import _helpers
  File "/usr/local/google/home/zivy/.cache/bazel/_bazel_zivy/5c54abc67a5cbd579d396d87a25726a1/sandbox/linux-sandbox/14902/execroot/io_k8s_cloud_provider_gcp/bazel-out/k8-opt-exec-2B5CBBC6/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/third_party/py/abseil/absl/flags/_helpers.py", line 38, in <module>
    from six.moves import range  # pylint: disable=redefined-builtin
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'six.moves'
Target //release:release-tars failed to build
INFO: Elapsed time: 3.406s, Critical Path: 1.34s
INFO: 53 processes: 53 internal.
FAILED: Build did NOT complete successfully

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 31, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If the repository mantainers determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 31, 2025
@k8s-ci-robot k8s-ci-robot requested a review from justinsb October 31, 2025 21:16
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: YifeiZhuang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from seans3 October 31, 2025 21:16
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 31, 2025
@YifeiZhuang
Copy link
Contributor Author

/test cloud-provider-gcp-tests

@YifeiZhuang
Copy link
Contributor Author

/assign @mmamczur
cc. @aojea

@YifeiZhuang
Copy link
Contributor Author

cc. @XuanWang-Amos

@justinsb
Copy link
Member

justinsb commented Nov 6, 2025

lgtm though I agree with the comment on changing the name to python_3_9 or similar to match the version.

We've been debating just deleting the bazel, I don't think there is test coverage (hence why the build is broken, perhaps!). Any thoughts?

@YifeiZhuang
Copy link
Contributor Author

lgtm though I agree with the comment on changing the name to python_3_9 or similar to match the version.

We've been debating just deleting the bazel, I don't think there is test coverage (hence why the build is broken, perhaps!). Any thoughts?

Fixed name.

There are test coverages, prow presubmit, just the failure does not happen on the prow machine, nor on my mac, only on my linux machine.

It sounds we should move to Make. But there are certain cleanups we need to do that are still referring to bazel, e2e, readme, etc.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants