Updates to the Red Hat Dockerfile for Konflux#3967
Updates to the Red Hat Dockerfile for Konflux#3967stevegrubb wants to merge 2 commits intoopenvinotoolkit:mainfrom
Conversation
The konflux build system has trouble in 2 areas. 1) It cuts of network access at certain times. The solution was to build everything in one shot. 2) Konflux causesbazel to do things differently which results in not being able to find libovms_shared.so or capi_benchmark. So, it was changed to try to put it in a known spot for searching. These changes do not affect the build done by Docker or podman.
| # hadolint ignore=SC2046 | ||
| RUN bazel build --jobs=$JOBS ${debug_bazel_flags} ${minitrace_flags} //src:ovms $(if [ "$OPTIMIZE_BUILDING_TESTS" == "1" ] ; then echo -n //src:ovms_test; fi) | ||
| RUN bazel build --jobs=$JOBS ${debug_bazel_flags} //:ovms_dependencies @com_google_googletest//:gtest && \ | ||
| bazel build --jobs=$JOBS ${debug_bazel_flags} //src:release_custom_nodes && \ |
There was a problem hiding this comment.
we are using separate docker commands to take better advantage of docker cache. Usually the changes are from the target ovms and ovms_test. Why is it more reliable in one command?
There was a problem hiding this comment.
There are times when bazel can't resolve packages due to konflux. (Konflux is designed to do hermetic builds. Of course, this is impossible due to bazel. But it is strict in it's interpretation of standards.) The only fix we could think of is move everything to a window when it has network access. The problem doesn't show up in podman or docker. But the solution doesn't affect them either. They still build.
There was a problem hiding this comment.
And maybe konflux blows up the cache between RUN commands? Konflux takes a very strict interpretation of what the OCI standard says. I wasn't the one that worked on this. Our DevOps team was tasked with the konflux migration. I am passing along what I heard discussed as they tried to solve it. When all 3 are in the same RUN command, it works.
The konflux build system has trouble in 2 areas.
It cuts of network access at certain times. The solution was to build a group of the software in one shot.
Konflux causes bazel to do things differently which results in not being able to find libovms_shared.so or capi_benchmark. So, it was changed to try to put it in a known spot for searching.
These changes do not affect the build done by Docker or podman.