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

[rbe] Local registry: build config diff ids from layers #15

Closed
wants to merge 1 commit into from

Conversation

gabrielrussoc
Copy link

@gabrielrussoc gabrielrussoc commented Nov 19, 2024

The local registry gets the image config as input, which contains the hashes of all the layers inside of the image.
We were simply returning it but it turns out the hashes of the layers in the config does not always match the actual layers.
This is caused by a weird interaction in Databricks internal rules where we have a docker layer as a parent of a docker base like docker_layer -> docker_base -> docker_layer.

Essentially, if the docker layer changes, we are required to rebuild the docker_base but there is nothing enforcing that today (see https://github.com/databricks-eng/universe/blob/bf55a02cb20c5bb72992a4bb401212bea69f9397/bazel/rules/docker.bzl#L2051).

When that happens, we get errors like the ones seen on:
https://runbot-ci.cloud.databricks.com/build/Unit-Compile-Pr/run-logs/45377642

layers from manifest don't match image configuration

So to workaround this we make the behaviour of the loader_tool to be the same as the original incremental loader: we overwrite the hashes in the config using the values computed from the actual layers:

"diff_ids": [$(join_by , ${diff_ids[@]})],

@gabrielrussoc gabrielrussoc changed the title [rbe] Local registry: change config format [rbe] Local registry: build config diff ids from layers Nov 20, 2024
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

Successfully merging this pull request may close these issues.

1 participant