-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
oci_pull fails spuriously #275
Comments
That is very surprising that Note that I see a related change landed five days ago - does using rules_oci at HEAD make a difference? |
It doesn't, this was actually using HEAD, since I had forked it to add more debug logging. |
Initially when I ran into this, I had just pushed some images before to public ECR, and was therefore authenticated in Docker's config.json. I did run |
This turned out to be exactly bazelbuild/bazel#17771, we were using |
Full credit to @thesayyn for identifying the issue! |
In case this helps others out there... We are seeing a variant of this issue. A small number of our users see a failure because the Error:
manifest.json v1 schema (got):
manifest.json v2 schema (expected):
The same The workaround was inspired by finding this code here: |
When using oci_pull as below:
I get an error that the repository fetch failed.
This took me a while to figure out, but it turns out that this is partially because
public.ecr.aws
requires awww-authenticate
header, so it gets passed tocurl
. I added debugging information in order to dig further into this, and found that thecurl
command is successful, and outputs the manifest to/private/var/tmp/_bazel_jamessigurdarson/51f04610ee38952253ec4b47d86a991d/external/oci_fluentd_linux_amd64/.output/manifest.json
.The output there is:
For completeness, the header.txt file is also
The curl command is successful, and fetches the manifest, but the download at
rules_oci/oci/private/download.bzl
Lines 102 to 110 in 7fd951a
echo -n "" | sha256sum
ise3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
.This seems like a race condition to me, the curl command is functional and works as intended, but the download rule gets an empty file?
What's more is that when I manually fetch this, using
bazel fetch @oci_fluentd
, it is successful, and from then on, the laterbazel build //:oci_fluentd_image
is also successful.Do you have any ideas as to what caused this / what we could do to avoid this race condition?
The text was updated successfully, but these errors were encountered: