chainguard-dev/rules_apko

Unable to build the examples in this repo

Closed this issue · 3 comments

For instance, trying to build //examples/wolfi-base

$ bazelisk build //examples/wolfi-base
WARNING: For repository 'bazel_skylib', the root module requires module version bazel_skylib@1.4.1, but got bazel_skylib@1.4.2 in the resolved dependency graph.
INFO: Repository _main~apko~apko_linux_amd64 instantiated at:
  callstack not available
Repository rule apko_repositories defined at:
  /home/fleroux/git/rules_apko/apko/repositories.bzl:78:36: in <toplevel>
WARNING: Download from https://github.com/thesayyn/apko/releases/download/v0.0.0/apko_0.0.0_linux_amd64.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException Checksum was 65ce0e5025987ee21ef354b451e0b03ce03be576fbba87fd366e4feb12e29751 but wanted e4760455355b58ef8c923b1ef45a61926d849b04f996b69fdc1093164bbb5af8
ERROR: An error occurred during the fetch of repository '_main~apko~apko_linux_amd64':
   Traceback (most recent call last):
        File "/home/fleroux/git/rules_apko/apko/repositories.bzl", line 56, column 40, in _apko_repo_impl
                repository_ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/thesayyn/apko/releases/download/v0.0.0/apko_0.0.0_linux_amd64.tar.gz] to /home/fleroux/.cache/bazel/_bazel_fleroux/ca54dcbac6918510f4d28199918c045a/external/_main~apko~apko_linux_amd64/temp775921487159720202/apko_0.0.0_linux_amd64.tar.gz: Checksum was 65ce0e5025987ee21ef354b451e0b03ce03be576fbba87fd366e4feb12e29751 but wanted e4760455355b58ef8c923b1ef45a61926d849b04f996b69fdc1093164bbb5af8
ERROR: <builtin>: fetching apko_repositories rule //:_main~apko~apko_linux_amd64: Traceback (most recent call last):
        File "/home/fleroux/git/rules_apko/apko/repositories.bzl", line 56, column 40, in _apko_repo_impl
                repository_ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://github.com/thesayyn/apko/releases/download/v0.0.0/apko_0.0.0_linux_amd64.tar.gz] to /home/fleroux/.cache/bazel/_bazel_fleroux/ca54dcbac6918510f4d28199918c045a/external/_main~apko~apko_linux_amd64/temp775921487159720202/apko_0.0.0_linux_amd64.tar.gz: Checksum was 65ce0e5025987ee21ef354b451e0b03ce03be576fbba87fd366e4feb12e29751 but wanted e4760455355b58ef8c923b1ef45a61926d849b04f996b69fdc1093164bbb5af8
ERROR: /home/fleroux/git/rules_apko/examples/wolfi-base/BUILD.bazel:6:11: //examples/wolfi-base:wolfi-base depends on @_main~apko~apko_linux_amd64//:apko_toolchain in repository @_main~apko~apko_linux_amd64 which failed to fetch. no such package '@_main~apko~apko_linux_amd64//': java.io.IOException: Error downloading [https://github.com/thesayyn/apko/releases/download/v0.0.0/apko_0.0.0_linux_amd64.tar.gz] to /home/fleroux/.cache/bazel/_bazel_fleroux/ca54dcbac6918510f4d28199918c045a/external/_main~apko~apko_linux_amd64/temp775921487159720202/apko_0.0.0_linux_amd64.tar.gz: Checksum was 65ce0e5025987ee21ef354b451e0b03ce03be576fbba87fd366e4feb12e29751 but wanted e4760455355b58ef8c923b1ef45a61926d849b04f996b69fdc1093164bbb5af8
ERROR: Analysis of target '//examples/wolfi-base:wolfi-base' failed; build aborted: Analysis failed

@fleroux514 could you please try with the latest version of apko and rules_apko?

fixed by #18

@thesayyn I can now build, thanks.