Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Target @io_bazel_rules_docker//platforms:image_transition was referenced as a platform, but does not provide PlatformInfo #700

Closed
sgowroji opened this issue Sep 21, 2023 · 6 comments

Comments

@sgowroji
Copy link

sgowroji commented Sep 21, 2023

https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3321#018ab594-28c8-4eee-ab66-be1399583a81

Platform : Ubuntu Bazel Remote Cache (:ubuntu: 18.04, 20.04)

Logs:

RROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/c452177aff3ea7c8ea21ee9042ebc31a/external/io_bazel_rules_docker/platforms/BUILD:78:9: in constraint_values attribute of platform rule @io_bazel_rules_docker//platforms:image_transition: '@io_bazel_rules_docker//platforms:image_transition_cpu' does not have mandatory providers: 'ConstraintValueInfo'
(02:32:09) ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/c452177aff3ea7c8ea21ee9042ebc31a/external/io_bazel_rules_docker/platforms/BUILD:78:9: in constraint_values attribute of platform rule @io_bazel_rules_docker//platforms:image_transition: '@io_bazel_rules_docker//platforms:image_transition_os' does not have mandatory providers: 'ConstraintValueInfo'
(02:32:09) ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/c452177aff3ea7c8ea21ee9042ebc31a/external/io_bazel_rules_docker/platforms/BUILD:78:9: Analysis of target '@io_bazel_rules_docker//platforms:image_transition' failed
(02:32:09) ERROR: /var/lib/buildkite-agent/builds/bk-docker-gdxt/bazel-downstream-projects/bazel-remote/BUILD.bazel:134:16: Target @io_bazel_rules_docker//platforms:image_transition was referenced as a platform, but does not provide PlatformInfo
(02:32:09) ERROR: Analysis of target '//:bazel-remote-image' failed; build aborted

Steps:

git clone -v https://github.com/buchgr/bazel-remote.git
git reset 2bcc2f59e111f71b4de4d84013f8e93a1b981872 --hard
export USE_BAZEL_VERSION=6446607f6eb2ce2b1ff5e5d8d429456dcdfec01f
bazel build //:bazel-remote //:bazel-remote-image

Culprit Found: 87fb4620c6edd0e525d4621ecdca4bd47d69484c

CC Greenteam @comius

@comius
Copy link

comius commented Sep 21, 2023

cc @katre

The culprit seems likely cause.

@katre
Copy link

katre commented Sep 21, 2023

This is the same as buildfarm/buildfarm#1446. I guess I need to file an issue against rules_docker.

@katre
Copy link

katre commented Sep 21, 2023

Filed bazelbuild/rules_docker#2275, in the meantime using --@io_bazel_rules_docker//transitions:enable=false to disable the problematic behavior seems to work (but means that the image's architecture attribute is ignored, I don't know if the usage in this project is impacted).

@sgowroji
Copy link
Author

Bazel remote CI is green now. Hence we are closing this issue now.

@jayeshkotia
Copy link

How to resolve this issue I am unable to find the route map. Can anyone help me what all things I have to add in my project

@mostynb
Copy link
Collaborator

mostynb commented Feb 4, 2024

@jayeshkotia: https://github.com/bazelbuild/rules_docker is archived and unmaintained, they suggest migrating to rules_oci.

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

No branches or pull requests

5 participants