kubev2v / forklift

Apache License 2.0
29 stars 28 forks source link

bazel build issues #1083

Open jsakil14 opened 6 days ago

jsakil14 commented 6 days ago

Discussed in https://github.com/orgs/kubev2v/discussions/1082

Originally posted by **jsakil14** October 3, 2024 I am getting errors: when running below ``` bazel run push-forklift-operator Starting local Bazel server and connecting to it... ERROR: /root/.cache/bazel/_bazel_root/3d084ffa320f6dc5a80a67e2b78d0f1c/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' ERROR: /root/.cache/bazel/_bazel_root/3d084ffa320f6dc5a80a67e2b78d0f1c/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' ERROR: /root/.cache/bazel/_bazel_root/3d084ffa320f6dc5a80a67e2b78d0f1c/external/io_bazel_rules_docker/platforms/BUILD:78:9: Analysis of target '@@io_bazel_rules_docker//platforms:image_transition' failed ERROR: /root/forklift/operator/BUILD.bazel:37:16: Target @@io_bazel_rules_docker//platforms:image_transition was referenced as a platform, but does not provide PlatformInfo ERROR: Analysis of target '//:push-forklift-operator' failed; build aborted: Analysis failed INFO: Elapsed time: 3.524s, Critical Path: 0.02s INFO: 1 process: 1 internal. ERROR: Build did NOT complete successfully ERROR: Build failed. Not running target ```
jsakil14 commented 1 day ago

bump!

jsakil14 commented 1 day ago

@mnecas Is this relevant with https://github.com/kubev2v/forklift/pull/1046

mnecas commented 1 day ago

@jsakil14 have you tried the make push-operator-image?

mnecas commented 1 day ago

I just run the make build-operator-image and without a problem

mnecas commented 1 day ago

We should update the readme, but also running the bazel run push-forklift-operator worked for me. Have you set all env variables? Which bazel version are you using?

jsakil14 commented 21 hours ago

https://github.com/kubev2v/forklift#runing-operator-build I followed this -

I dont have REGISTRY_ORG , so ignored this...

export REGISTRY=internal artifcatory local registry export REGISTRY_TAG=latest CONTROLLER_IMAGE=${REGISTRY}/forklift-controller:${REGISTRY_TAG} OPERATOR_IMAGE=${REGISTRY}/forklift-operator:${REGISTRY_TAG}

My install is on a kubevirt cluster running on bare metal k8s nodes.

bazel version

bazel 7.3.2

From the error: Do we need to set this values? somewhere?

ERROR: /root/.cache/bazel/_bazel_root/3d084ffa320f6dc5a80a67e2b78d0f1c/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'