diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eaa9ee3..972612a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,4 +26,18 @@ jobs: # Runs a single command using the runners shell - name: Build and test everything - run: bazel build //... && bazel test //... + run: bazelisk build //... && bazelisk test //... + + # TODO(5h4d0w4rt) add cross-build https://github.com/marketplace/actions/run-on-architecture + build-linux: + # The type of runner that the job will run on + runs-on: ubuntu-20.04 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Build and test everything + run: bazelisk build //... && bazelisk test //... diff --git a/WORKSPACE b/WORKSPACE index 5612a77..468f872 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,6 +1,16 @@ workspace(name = "io_bazel_rules_prometheus") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") + +http_archive( + name = "platforms", + sha256 = "079945598e4b6cc075846f7fd6a9d0857c33a7afc0de868c2ccb96405225135d", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz", + "https://github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz", + ], +) http_archive( name = "bazel_skylib", @@ -11,12 +21,6 @@ http_archive( ], ) -load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") - -bazel_skylib_workspace() - -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") - git_repository( name = "io_bazel_stardoc", commit = "4378e9b6bb2831de7143580594782f538f461180", @@ -28,6 +32,10 @@ load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories") stardoc_repositories() +load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") + +bazel_skylib_workspace() + load("@io_bazel_rules_prometheus//:deps.bzl", "prometheus_repositories") prometheus_repositories() diff --git a/prometheus/internal/BUILD b/prometheus/internal/BUILD index e4bcf1d..f3ff4ae 100644 --- a/prometheus/internal/BUILD +++ b/prometheus/internal/BUILD @@ -1,5 +1,6 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -load(":toolchain.bzl", "declare_toolchains_dummy", "declare_toolchains_prod") +load(":toolchain.bzl", "declare_toolchains") +load(":platforms.bzl", "declare_constraints") package( default_visibility = [ @@ -42,49 +43,29 @@ bzl_library( srcs = ["providers.bzl"], ) +bzl_library( + name = "platforms", + srcs = ["platforms.bzl"], +) + bzl_library( name = "toolchain", srcs = ["toolchain.bzl"], - deps = [":providers"], + deps = [ + ":platforms", + ":providers", + ], ) bzl_library( name = "repositories", srcs = ["repositories.bzl"], - deps = [":toolchain"], + deps = [ + ":platforms", + ":toolchain", + ], ) -declare_toolchains_prod( - architectures = ( - "darwin-amd64", - ), -) +declare_constraints() -declare_toolchains_dummy( - architectures = ( - "dragonfly-amd64", - "freebsd-386", - "freebsd-amd64", - "freebsd-armv6", - "freebsd-armv7", - "linux-386", - "linux-amd64", - "linux-arm64", - "linux-armv5", - "linux-armv6", - "linux-armv7", - "linux-mips64", - "linux-mips64le", - "linux-ppc64", - "linux-ppc64le", - "linux-s390x", - "netbsd-386", - "netbsd-amd64", - "netbsd-armv6", - "netbsd-armv7", - "openbsd-386", - "openbsd-amd64", - "windows-386", - "windows-amd64", - ), -) +declare_toolchains() diff --git a/prometheus/internal/platforms.bzl b/prometheus/internal/platforms.bzl new file mode 100644 index 0000000..0a9b00f --- /dev/null +++ b/prometheus/internal/platforms.bzl @@ -0,0 +1,117 @@ +INCOMPATIBLE = "@platforms//:incompatible" + +_LIST_OF_PLATFORMS = ( + "darwin-amd64", + "darwin-arm64", + "dragonfly-amd64", + "freebsd-386", + "freebsd-amd64", + "freebsd-arm64", + "freebsd-armv6", + "freebsd-armv7", + "illumos-amd64", + "linux-386", + "linux-amd64", + "linux-arm64", + "linux-armv5", + "linux-armv6", + "linux-armv7", + "linux-mips", + "linux-mips64", + "linux-mips64le", + "linux-mipsle", + "linux-ppc64", + "linux-ppc64le", + "linux-s390x", + "netbsd-386", + "netbsd-amd64", + "netbsd-arm64", + "netbsd-armv6", + "netbsd-armv7", + "openbsd-386", + "openbsd-amd64", + "openbsd-arm64", + "openbsd-armv7", + "windows-386", + "windows-amd64", +) + +PrometheusPlatformsInfo = provider( + # this should store os-arch combinations for toolchain generation + doc = "OS and CPU platforms, constraints and available architectures metadata provider", + fields = { + "platforms": "mapping of PrometheusPlatformInfo providers", + "available_platforms": "list of platforms", + }, +) + +PrometheusPlatformInfo = provider( + # this should store os-arch combinations for toolchain generation + doc = "OS and CPU platform constraints metadata provider", + fields = [ + "os", + "cpu", + ], +) + +OsConstraintsInfo = struct( + darwin = "@platforms//os:osx", + freebsd = "@platforms//os:freebsd", + dragonfly = "@platforms//os:freebsd", + linux = "@platforms//os:linux", + windows = "@platforms//os:windows", + netbsd = "@platforms//os:freebsd", + openbsd = "@platforms//os:openbsd", + illumos = "@platforms//os:openbsd", +) + +CpuConstraintsInfo = struct( + amd64 = "@platforms//cpu:x86_64", + arm = "@platforms//cpu:arm", + arm64 = "@platforms//cpu:arm64", + armv5 = "@platforms//cpu:arm", + armv6 = "@platforms//cpu:arm", + armv7 = "@platforms//cpu:armv7", + mips64 = "@platforms//cpu:mips64", + mips64le = "@platforms//cpu:mips64", + ppc64 = "@platforms//cpu:x86_32", + ppc64le = "@platforms//cpu:ppc", + s390x = "@platforms//cpu:s390x", + mips = "@platforms//cpu:x86_32", + mipsle = "@platforms//cpu:x86_32", + # because you can't pass integer as keyword in python + **{"386": "@platforms//cpu:x86_32"} +) + +def platform_info_factory(list_of_platforms): + return PrometheusPlatformsInfo( + available_platforms = list_of_platforms, + platforms = struct(**{ + platform: PrometheusPlatformInfo( + os = platform.partition("-")[0], + cpu = platform.partition("-")[-1], + ) + for platform in list_of_platforms + }), + ) + +PLATFORMS = platform_info_factory( + _LIST_OF_PLATFORMS, +) + +def declare_constraints(_platforms_info = PLATFORMS): + """Generates constraint_values and platform targets for valid platforms. + Args: + _platforms_info: pre-built PrometheusPlatformInfo provider with info on all available os+architectures + """ + + for platform in _platforms_info.available_platforms: + platform_info = getattr(_platforms_info.platforms, platform) + + native.platform( + name = "prometheus_platform_{platform}".format(platform = platform), + constraint_values = [ + getattr(OsConstraintsInfo, platform_info.os), + getattr(CpuConstraintsInfo, platform_info.cpu), + ], + ) diff --git a/prometheus/internal/providers.bzl b/prometheus/internal/providers.bzl index c252439..324dd9e 100644 --- a/prometheus/internal/providers.bzl +++ b/prometheus/internal/providers.bzl @@ -31,3 +31,21 @@ AmtoolStubInfo = provider( }, ) AmtoolInfo = AmtoolStubInfo + +PrometheusPlatformsInfo = provider( + # this should store os-arch combinations for toolchain generation + doc = "OS and CPU platforms, constraints and available architectures metadata provider", + fields = { + "platforms": "mapping of PrometheusPlatformInfo providers", + "available_platforms": "list of platforms", + }, +) + +PrometheusPlatformInfo = provider( + # this should store os-arch combinations for toolchain generation + doc = "OS and CPU platform constraints metadata provider", + fields = [ + "os", + "cpu", + ], +) diff --git a/prometheus/internal/repositories.bzl b/prometheus/internal/repositories.bzl index b2bb373..dcd23bb 100644 --- a/prometheus/internal/repositories.bzl +++ b/prometheus/internal/repositories.bzl @@ -1,8 +1,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load(":toolchain.bzl", "build_toolchains", "prometheus_register_toolchains") +load(":platforms.bzl", "PLATFORMS") -_PROMETHEUS_DEFAULT_VERSION = "2.26.0" -_ALERTMANAGER_DEFAULT_VERSION = "0.21.0" +_PROMETHEUS_DEFAULT_VERSION = "2.30.3" +_ALERTMANAGER_DEFAULT_VERSION = "0.23.0" _DEFAULT_HTTP_ARCHIVE_EXTENSION = "tar.gz" @@ -39,6 +40,7 @@ AlertmanagerBinaryInfo = provider( PrometheusPackageInfo = provider( doc = "Provides metadata for building http_archive objects", fields = { + "platforms_info": "metadata providers for os-arch", "available_architectures": "list of available architectures", "prometheus_binary_info": "prometheus binary provider", "alertmanager_binary_info": "alertmanager binary provider", @@ -51,7 +53,6 @@ HttpArchiveInfo = provider( "name": "unique name for to-be initialized bazel repository", "sha256": "sha256 checksum of the blob", "version": "specific version of the binary", - "arch": "binary architecture", "urls": "list of urls to download blob from", "strip_prefix": "A directory prefix to strip from the extracted files", "build_file_content": "bazel build file content after unpacking", @@ -60,33 +61,36 @@ HttpArchiveInfo = provider( def _http_archive_provider_factory( binary, - arch, + os, + cpu, version, sha256, build_file_content, archive_extension = _DEFAULT_HTTP_ARCHIVE_EXTENSION): return HttpArchiveInfo( - name = "{binary}_{arch}".format( + name = "{binary}_{os}-{cpu}".format( binary = binary, - arch = arch, + os = os, + cpu = cpu, ), sha256 = sha256, version = version, - arch = arch, urls = [( "https://github.com/prometheus/{binary}/releases/download/".format( binary = binary, ) + - "v{version}/{binary}-{version}.{arch}.{archive_extension}".format( + "v{version}/{binary}-{version}.{os}-{cpu}.{archive_extension}".format( version = version, - arch = arch, + os = os, + cpu = cpu, binary = binary, archive_extension = archive_extension, ) )], - strip_prefix = "{binary}-{version}.{arch}".format( + strip_prefix = "{binary}-{version}.{os}-{cpu}".format( version = version, - arch = arch, + os = os, + cpu = cpu, binary = binary, ), build_file_content = build_file_content, @@ -118,35 +122,43 @@ def _build_http_archives( alertmanager_build_file_content: BUILD file content for resulting bazel repository """ - for arch in prometheus_package_info.available_architectures: + for platform in prometheus_package_info.platforms_info.available_platforms: http_archive_factory(http_archive_info( binary = "prometheus", - arch = arch, + os = getattr(prometheus_package_info.platforms_info.platforms, platform).os, + cpu = getattr(prometheus_package_info.platforms_info.platforms, platform).cpu, version = prometheus_package_info.prometheus_binary_info.version, build_file_content = prometheus_build_file_content, sha256 = prometheus_package_info.prometheus_binary_info.available_binaries[( prometheus_package_info.prometheus_binary_info.version, - arch, + platform, )], )) http_archive_factory(http_archive_info( binary = "alertmanager", - arch = arch, + os = getattr(prometheus_package_info.platforms_info.platforms, platform).os, + cpu = getattr(prometheus_package_info.platforms_info.platforms, platform).cpu, version = prometheus_package_info.alertmanager_binary_info.version, build_file_content = alertmanager_build_file_content, sha256 = prometheus_package_info.alertmanager_binary_info.available_binaries[( prometheus_package_info.alertmanager_binary_info.version, - arch, + platform, )], )) def _validate_prometheus_package_info(prometheus_package_info): - if not prometheus_package_info.prometheus_binary_info.version in [key[0] for key in prometheus_package_info.prometheus_binary_info.available_binaries]: + if not ( + prometheus_package_info.prometheus_binary_info.version in + [key[0] for key in prometheus_package_info.prometheus_binary_info.available_binaries] + ): fail( "No %s version in supported prometheus versions" % prometheus_package_info.prometheus_binary_info.version, ) - if not prometheus_package_info.alertmanager_binary_info.version in [key[0] for key in prometheus_package_info.alertmanager_binary_info.available_binaries]: + if not ( + prometheus_package_info.alertmanager_binary_info.version in + [key[0] for key in prometheus_package_info.alertmanager_binary_info.available_binaries] + ): fail( "No %s in supported alertmanager versions" % prometheus_package_info.alertmanager_binary_info.version, ) @@ -167,134 +179,125 @@ def _prometheus_repositories_impl( prometheus_package_info = prometheus_package_info, ) - prometheus_register_toolchains(native_toolchains_factory(prometheus_package_info.available_architectures)) + prometheus_register_toolchains(native_toolchains_factory(prometheus_package_info.platforms_info.available_platforms)) def prometheus_repositories( prometheus_version = _PROMETHEUS_DEFAULT_VERSION, - alertmanager_version = _ALERTMANAGER_DEFAULT_VERSION): + alertmanager_version = _ALERTMANAGER_DEFAULT_VERSION, + _platforms_info = PLATFORMS): """Download dependency tools and initialize toolchains Args: prometheus_version: Prometheus package version to download from source repositories if supported by reposiory alertmanager_version: Alertmanager package version to download from source repositories if supported by reposiory + _platforms_info: pre-built PrometheusPlatformInfo provider with info on all available os+architectures """ + # TODO(5h4d0w4rt) add custom version support prometheus_package_info = PrometheusPackageInfo( - available_architectures = ( - "darwin-amd64", - "dragonfly-amd64", - "freebsd-386", - "freebsd-amd64", - "freebsd-armv6", - "freebsd-armv7", - "linux-386", - "linux-amd64", - "linux-arm64", - "linux-armv5", - "linux-armv6", - "linux-armv7", - "linux-mips64", - "linux-mips64le", - "linux-ppc64", - "linux-ppc64le", - "linux-s390x", - "netbsd-386", - "netbsd-amd64", - "netbsd-armv6", - "netbsd-armv7", - "openbsd-386", - "openbsd-amd64", - "windows-386", - "windows-amd64", - ), + platforms_info = _platforms_info, prometheus_binary_info = PrometheusBinaryInfo( version = prometheus_version, available_binaries = { - ("2.24.1", "darwin-amd64"): "73c27ba24f5b7beaf78a7bd46a6695966c6ad5f4db02866dc577aaf55b844505", - ("2.24.1", "dragonfly-amd64"): "e7a1f6c102d6664b74ddd379f29a48125963628a4b6e5228dd95632da61c2537", - ("2.24.1", "freebsd-386"): "b91c0e3cdaadd237b86444e4384a561db40d6788bf85bc7217fef86f10b1a844", - ("2.24.1", "freebsd-amd64"): "b983b713e15ff9ba6cc7fcccce67d8d73e40182d818fbf7cb40dbef2b8328d72", - ("2.24.1", "freebsd-armv6"): "1e1b34d6d1eb5421e91643586162976d39e54fc791939ef73aa268b8a611dd53", - ("2.24.1", "freebsd-armv7"): "4657c8f82aba0ba9d2ccc4f2a16af020604c49313a44f23ee8e192e83ad6e366", - ("2.24.1", "linux-386"): "357c8ad6d3a1d38fb30c42b2858830b19acd44cfd3494d4e205222ec4ab2d41e", - ("2.24.1", "linux-amd64"): "5aec10296624449e83469ef647cb762bd4de2aa12fc91d2375c5e6be9fd049c0", - ("2.24.1", "linux-arm64"): "8687469d860eb52b67a82ada11591bee7c1446631fe86dcc2bcbeb2ed7810dc3", - ("2.24.1", "linux-armv5"): "ef8a7a58b29027d230da9c904429375af93b82db5da7067fe5fff3a24a7f5c4c", - ("2.24.1", "linux-armv6"): "27ca010697f048396b0c63f5522d876d5fb937894f582faff49c9dc4cd815a35", - ("2.24.1", "linux-armv7"): "7233ca39c740d86a94f8a21a7bf02aa535b20a7ed5efa893b3c7c97dcbddb334", - ("2.24.1", "linux-mips64"): "5f6d12bd3605e78af623f1ea0bc80b2e6335b403c0a4a637d260eb528686eade", - ("2.24.1", "linux-mips64le"): "f88196587c122b5cc75fcc8dd5cae0d78357d81407650573e7d4a33e0a091537", - ("2.24.1", "linux-ppc64"): "7e3e5a184875683f9afc205d43ebd62067211e2811c5a07bbb770a3adc10b408", - ("2.24.1", "linux-ppc64le"): "96fa5f23f6caf613449091d4bdf38abcab88e801c5c4659f2608ef0d03840dd0", - ("2.24.1", "linux-s390x"): "1287f2b9c59940f17f3ea05d9a4d2287f567c095f57b1f4aa40c2c1eb54dd03c", - ("2.24.1", "netbsd-386"): "e3ec99ce88fcf0f9951c69d4c04a0e3031af0fcdb19177efa188ac99260ca742", - ("2.24.1", "netbsd-amd64"): "73395fa7528a02a54b76361d4f91bb7415b3de70b598d5935eef9afa37254187", - ("2.24.1", "netbsd-armv6"): "ce66f8e3be723cfb7eebd30608d7284f1d0f58b7373f1299f8fadb9becf303e4", - ("2.24.1", "netbsd-armv7"): "6ae984c21dd11836132785aba95b712ffa0bea229ca054f442eeb9c7bec6a7ff", - ("2.24.1", "openbsd-386"): "faf8e685647ca59979d94be7446e56dbd6a15645bce374ea3a556016b4d20d94", - ("2.24.1", "openbsd-amd64"): "7b02f7accd1caab4ff64fa7f28198e3dfade9309efbbbe4a6fb625e18369db5d", - ("2.24.1", "openbsd-armv7"): "6c4a9e62ef764dfe2e4e65072436995ad317a7b9da65b38cc9e0fbc9ee696ed2", - ("2.24.1", "windows-386"): "f8ed11b95c6227e7652270b129f5ed59c23a243825f6ccbb5f26a05d8ee75994", - ("2.24.1", "windows-amd64"): "434f6931705d9e57f40b696e023a95b7e65c5ca572ad8c0af81f99b3332ae107", - ("2.25.2", "darwin-amd64"): "c45622d1985e7283c2833a1a90dcede1cac2d5dab04f7c7015262b354f3fb7fb", - ("2.25.2", "dragonfly-amd64"): "530ece8e0c8b3d5a999864800954ebcea86e274f690159e48f00dd8cd6fee82c", - ("2.25.2", "freebsd-386"): "82fea4ea99f1a7a626e365fb1f281df18960e77321e46b6f6535d235803cfd2f", - ("2.25.2", "freebsd-amd64"): "5ca88c416de84741fbdf55377cabe631e0dea4d75924a331df7f1d36f9ddce00", - ("2.25.2", "freebsd-armv6"): "458f6e443e69d872b7b30ce9e619de9d1747d6e9bc43ddc4b66174cc85936608", - ("2.25.2", "freebsd-armv7"): "ac8ea1983d58fe8c0d3249dad3b59963fa5c577cbb19fa7a17b185e3535d4db1", - ("2.25.2", "linux-386"): "8cc41fe5307e9900622ce99c8d8239b883f783f2b191bc56495b844fd8385c78", - ("2.25.2", "linux-amd64"): "362804a065949bfb03d31783e6522a4d874c40f507a64add6455f95e6c7de33e", - ("2.25.2", "linux-arm64"): "ac0e38d5210bc8f32d066ecad9ea96b50c98fe2c8c60c85eb2da5cbde7ba6579", - ("2.25.2", "linux-armv5"): "09d251498d9e558ec3792d400d5048c1e33b4b95fb73636fe763ba0c7211d697", - ("2.25.2", "linux-armv6"): "bf895483d4e4e16f1c74d2bdbd9a6b27e1caeaa63e5646eed5c80fe2c2851791", - ("2.25.2", "linux-armv7"): "d4883c2b3d7ce0272671650b6c5b5b9b6b71c272f8b9bbe9a1d8fa295a656a6a", - ("2.25.2", "linux-mips64"): "3eded05ca21702a3bc10641d6e3ca37f44a7ec9bcbd78eb8d5cdaeaa85184be6", - ("2.25.2", "linux-mips64le"): "40a09a193e5891c41ac09d88572185cfc722f21117f0d860382d14c3f0a5ff8b", - ("2.25.2", "linux-ppc64"): "fe1d8c2c3189233a9091403201c69b03ca2300c27ffb0ca388671f0bafadd8f5", - ("2.25.2", "linux-ppc64le"): "92682b24df2d5e00e291d40367d2bb1900d06b30dfc0b1faca01acd2c824aee2", - ("2.25.2", "linux-s390x"): "a3c9e3ac48ecd4da4ab0d82fa5e9a67f4a12563ee8413306dcc6745088b11eaf", - ("2.25.2", "netbsd-386"): "a6451a02b57aeb063804837ef3715595b908488e84c9edffa4879dbfadba6ab6", - ("2.25.2", "netbsd-amd64"): "ede213bce93e560e225dc50d11828f777a00f4133c573b9603b39366d8c87b81", - ("2.25.2", "netbsd-armv6"): "c5f4b3dd58a500bf16c6186066c00137a3a5aa76d010ddc9a75211c41aa9ef36", - ("2.25.2", "netbsd-armv7"): "bf18973a3fc75cf88b0d7fa28f8591d23dad003899657a58f293b15c574a4c06", - ("2.25.2", "openbsd-386"): "b02c17e5fc373b015eb4dca94cd305286140ae6153dc975682895570971398dd", - ("2.25.2", "openbsd-amd64"): "7fcba4e2ef78c0e19b2f736edf226bd877073b4bea5e65c45f8dc432dc0d9c8c", - ("2.25.2", "openbsd-armv7"): "3db8c561c01ef0a3d9010a0cb9a0ea19328a613c1b7cafb344c4e3c33bfeae81", - ("2.25.2", "windows-386"): "f1b3cd91af89d9ce6e29a7e975a3254070813ecfee2a601b2e952048ea8d8360", - ("2.25.2", "windows-amd64"): "f4d4a2e460b97f9d7a7f4f6d7ad54a8f9ca1595520c215c383ab90568a65aeb2", - ("2.26.0", "darwin-amd64"): "2c6eb33d3d02a8f01e16900121e54e67a427ccfb6fa5a9a712771e6b79c2a466", - ("2.26.0", "darwin-arm64"): "ee492dea2574d66fac741bac11540c488dddb4cbf45a9bc67ef0598099fbc66e", - ("2.26.0", "dragonfly-amd64"): "07f2a61e44bea85a27b4149edd926a29e0978f2ac29b5c46e7950f836fd9b9f0", - ("2.26.0", "freebsd-386"): "25c3b064f3145443ec58fd724a6b3fdf2440603df3923c10e767eac00e40f9b1", - ("2.26.0", "freebsd-amd64"): "352ec23dc32d111f3c4e4b14975290ac575350039687143910743d802ad334fc", - ("2.26.0", "freebsd-arm64"): "574b7bcbe2a5a9992019a2167b332c14527b74c764f5496840c8318223a8b296", - ("2.26.0", "freebsd-armv6"): "3f3f21c7060df3fa69e37e74b84db6f426cf1c1ead8706bda461398837b86513", - ("2.26.0", "freebsd-armv7"): "21e71a81aa660b0198c24915b7d64ba21dc0e15dea864bfd30ba4beac2d80d3e", - ("2.26.0", "illumos-amd64"): "24e23ce5d7aaa2e1d473ab206c07847e29740ac1de3bb3da797f7fb84583d28a", - ("2.26.0", "linux-386"): "0c4decd7fd7aa085a01b03c19325b2ec47ee10336d280156ddf311619473d626", - ("2.26.0", "linux-amd64"): "8dd6786c338dc62728e8891c13b62eda66c7f28a01398869f2b3712895b441b9", - ("2.26.0", "linux-arm64"): "dff361ce317462bfc4203f53addcb0185223ec633f7c81a27fc118d04f8a9f47", - ("2.26.0", "linux-armv5"): "5b1789899a3d3202a9f8d36747c13caf561b088667440e90a13962c59852a4e1", - ("2.26.0", "linux-armv6"): "cb4b0e203ab9f64931d6725bf43211a9e04e8ccec1ff2ae8ec1b7850fc2d744c", - ("2.26.0", "linux-armv7"): "523eb3dc7805eb023db8cc23faa4b91707d4765ec77158dbd98cf8db1c7d20a7", - ("2.26.0", "linux-mips"): "0015cecf9d06e6df918ea0f62351477c66d52d1f6b2f164ab48fe81d1dcdd438", - ("2.26.0", "linux-mips64"): "a6ad4ca7df5a18e7d26d6bbfa8114ac0e1058b19062c8791a499e215f8f1ef91", - ("2.26.0", "linux-mips64le"): "00cf7c387db0682ce168a6b33d590183fda12d53bafcd3af87aec67ca688abfa", - ("2.26.0", "linux-mipsle"): "2629121ce0a9ac1da8ee97dce280cf01b80b796c920bf2713f21cba17b15961a", - ("2.26.0", "linux-ppc64"): "c33171a95bcdf790feaa93248224402b3b94ef1c69ef6d89d42456097528717e", - ("2.26.0", "linux-ppc64le"): "c4fb66c28100589ad5f7e7bfbfec7da2f7a47e69574bd07e68a00cf28533ac13", - ("2.26.0", "linux-s390x"): "dc3fce7b8b01e917eb5b3752e909a8c9979c26ccb428b56851e89ecf2796ff98", - ("2.26.0", "netbsd-386"): "787a43428680d47d03ea9e5aeecb13769bf473338019d3246eefc1bc92f94c30", - ("2.26.0", "netbsd-amd64"): "4e5472f8937e30c1e6cd0ac3c42ba8e365fde5970e7a43e3039be0c00e4f4a88", - ("2.26.0", "netbsd-arm64"): "4da34873c7eb9a8eb5082c878e012e0520938ef308c0fa3367ff79709f160da7", - ("2.26.0", "netbsd-armv6"): "b080410cb0bb6b62e2dc3dc11c6026f08e3ed10749dbfd54dd82ffc7047e6144", - ("2.26.0", "netbsd-armv7"): "7175336d07c2dd95685e9014750e9ee44de6e83dd8e3fd2497f6ea9cc6b3ec31", - ("2.26.0", "openbsd-386"): "00b58e4f251848daf2ff3bf5fd9704ea1e24607f6597fa146689c4841e1f1559", - ("2.26.0", "openbsd-amd64"): "08f08e0e1612da4fafd159f6f8ecc0d783d2bb4ecc9b2e9523632000670f0dd9", - ("2.26.0", "openbsd-arm64"): "87253d9cf8b92012e9e8c01806f79c4234f3cfbe1e3a2ee7ac8ce8f0fee208da", - ("2.26.0", "openbsd-armv7"): "12e0a62cbf37894a2de7174f3bc139a2572fabb1f873eca5e9a841f784cd5a5a", - ("2.26.0", "windows-386"): "1677dc32cea976d346d5bcffee45dc9864e06dffaaad4a0678ca12b484ac6d5f", - ("2.26.0", "windows-amd64"): "4e75dc7d72b3006bc718bb2e89930cae058f5f4642a5b75ac9daa565a0a7272e", + ("2.28.1", "darwin-amd64"): "3941b102a06ebae9bcfa52d07b84825543f529c1e308f2bd66c6ad55cd4d25a4", + ("2.28.1", "darwin-arm64"): "1c39922ef27835cf1c68658a20cdfd0323f61ed1efe9424cc1643020bd990a1e", + ("2.28.1", "dragonfly-amd64"): "cd9d87f861909cfc358324163ecedf030665d89f071b0a973072722bee2fa762", + ("2.28.1", "freebsd-386"): "746477a3723438d91c123a2dbfb4a4690b6cc2883b7747af43ab70b5abd3067e", + ("2.28.1", "freebsd-amd64"): "632843a2ff187f955b2c3d3b905375eb461561834a3a3a03faffd74ba56a332b", + ("2.28.1", "freebsd-arm64"): "e953a02dfa60dc0035645eed24f8c9103dca2c43e204fd5b905f32926588763c", + ("2.28.1", "freebsd-armv6"): "dca05a532e94d2eae847a9db40fe1bfe3542905a0795936b17ac00dac95d371c", + ("2.28.1", "freebsd-armv7"): "a8bc3a565e57719aefd5eea9ce6666fec329858bcda0f7ebc71532f58cb8f122", + ("2.28.1", "illumos-amd64"): "52381975a967db432fadfcf869e6345aa1a34bbe8892cdebcc00771f3856a11d", + ("2.28.1", "linux-386"): "df70438c909f3bd7d26ae2b38dc6f1782bfa54cd4b99d4f01a1f39171426c60c", + ("2.28.1", "linux-amd64"): "91dd91e13f30fe520e01175ca1027dd09a458d4421a584ba557ba88b38803f27", + ("2.28.1", "linux-arm64"): "298e5e32cc2d106f4d886548a535e787871650095fe87b1e8b29f83cbcbddbd1", + ("2.28.1", "linux-armv5"): "a249704d67d6271894a932fd5c6e91f543549b41acbf8b90acb170de357c0396", + ("2.28.1", "linux-armv6"): "25456957df9bcfdd54a04cef58689a5cc5ce51ddefc661f59a42e656b5b158f2", + ("2.28.1", "linux-armv7"): "0ee31e4ee719680143887911dc15e9108ac595fe4345cb1bb959aad5f0281b1a", + ("2.28.1", "linux-mips"): "8039a41bf80c003a04e927dd1ea974b6f25837a1871ee0a5533269acda1b4e57", + ("2.28.1", "linux-mips64"): "16f64bc7c9138964a6ce14da2bbe3a6ec19d01c4c6b24d7977d22d5d0c2a6d4e", + ("2.28.1", "linux-mips64le"): "87845a55567555c39058bd8b7f0377e08ee008b59c8cca1ccd84d2b8770d3ff2", + ("2.28.1", "linux-mipsle"): "8b36ea48fa4e263fe9f4060ec6105ac3285613c047fad04d5b9c0229b1c83493", + ("2.28.1", "linux-ppc64"): "b4187b1becc445b17fde05443f737033af3210ae57d1b7921e09350438173454", + ("2.28.1", "linux-ppc64le"): "1a9c06b997a6698f8b4d1e71df11078eb5dfcd8348bfff8660f3061f26be013f", + ("2.28.1", "linux-s390x"): "dd75c1cdf01ce7bfde341a7db1cc1b76a16008aaed7522fba08a073270c2b1fa", + ("2.28.1", "netbsd-386"): "ba7d5adedc068ef0752e385f6b20a82e2479f0cc9eaef4121ef362953df8ad97", + ("2.28.1", "netbsd-amd64"): "0f57c6f98b103745e3a80d589e8da5b967f6fea473b6ad5685fb5bc84dec5439", + ("2.28.1", "netbsd-arm64"): "86b50ddff15e316b24553ad236a712feded8a6eba2df6bb0df96255d53acf507", + ("2.28.1", "netbsd-armv6"): "07bc88f662a5e206b736305fb486fde88895b37a6edcd31a7e0bab46005a97eb", + ("2.28.1", "netbsd-armv7"): "3f3c677333db8599117fbdf62e773506859553331a66a62eb956ae31410be917", + ("2.28.1", "openbsd-386"): "47a458b300209b5971a342ecd4efc06c06eb55d63dc3b4e12529cc2d81af7a61", + ("2.28.1", "openbsd-amd64"): "d7d62a3851069087deebacc3ef0e7f6c58f7c4bbaeb2f02848622a06665703ce", + ("2.28.1", "openbsd-arm64"): "23e506d00de16fd9904dd38ed9085f64bc3dee2419674785901b89b59b3a0b05", + ("2.28.1", "openbsd-armv7"): "79bb4b7ec88a9d85654ea334f352a826c046732a6729cb7616921e654aceae61", + ("2.28.1", "windows-386"): "b8277b3a58faf22ec5d385fbc888b64ab934911d36eea57fe4fe5cce5b2461f3", + ("2.28.1", "windows-amd64"): "c81cf1e677247263bdbd7158efb8b00afbd1bc7ae155eb86af5cfe90abdb2969", + ("2.29.2", "darwin-amd64"): "810a94974be44f92d6c3ba1b7604513ef0a2c1a159bd10afc50da25370813302", + ("2.29.2", "darwin-arm64"): "fc42d62c6b2cb486a14767465c46d72e436ae795be620d01813f20772a264324", + ("2.29.2", "dragonfly-amd64"): "bb2f52e6d1bd4035679b51b3e1cd02b067cccb867fd596f667f6bd62fcb4bee3", + ("2.29.2", "freebsd-386"): "fc273ea7e3d8e6ff3f5806ccd2be9c6d07ae615d0ccb43c3272d07f4b2603355", + ("2.29.2", "freebsd-amd64"): "6a7adf4add15233972b61486f4366036c1f0539d553782fbc3ffbdb15d55a1de", + ("2.29.2", "freebsd-arm64"): "aa9031cfa0ec88d895e9003a6d2ce8d041bc24b24fb054b865b2d1c8bc791f6e", + ("2.29.2", "freebsd-armv6"): "9882dbd7f7adf6521e5b90408c1a9fede4ad09b3fee01dea6faf9ca5350de2e4", + ("2.29.2", "freebsd-armv7"): "32468c0800baef58807f7b151c7572fee876bbe296302e20ea08a0333055cffe", + ("2.29.2", "illumos-amd64"): "b171568308d8aa73d6438886fe1de197ac3f0bae2874e09a833941d96b65435a", + ("2.29.2", "linux-386"): "7a19cb2e1d70d60857029ff793de375b1d04ffd270d59d82d5dbaa0ff199acf2", + ("2.29.2", "linux-amd64"): "51500b603a69cf1ea764b59a7456fe0c4164c4574714aca2a2b6b3d4da893348", + ("2.29.2", "linux-arm64"): "c2f1ff7338479ef87d3a94b5ddbf5e431e7de6e326bb23c98616dc2ca395c9a6", + ("2.29.2", "linux-armv5"): "af8692e4f1afc47f28399e187baac347bb6af3caabd5ead27978a9200239a9bf", + ("2.29.2", "linux-armv6"): "3d45075491a149b013a760b22b99ef32fbceec6d7969bb2e5557c2d7af4f15fd", + ("2.29.2", "linux-armv7"): "c4e108c997f9afa0a87b6f075e430c7ff2016adb8bf62a97f927f1840fb70ebd", + ("2.29.2", "linux-mips"): "b5258663c7c3d92ad5117c989b474df61de29f760233a60adf06cb60dd548842", + ("2.29.2", "linux-mips64"): "3fc4917fb8ff0371473ca987270c66fc89a450b513af4ff932a24fe34b3cb387", + ("2.29.2", "linux-mips64le"): "87afa73e0e5d3f772eabe874ac0fab29b493654dc7845e69a4c447331bba6cf3", + ("2.29.2", "linux-mipsle"): "a81c80c1c16ece9f2409ae866ffd7eae180fba732708d4709203271b68eaf5eb", + ("2.29.2", "linux-ppc64"): "22b133b111626fbbe2c22e0ecf2803b2786ed8d5325a3005e8938c6f8374b39f", + ("2.29.2", "linux-ppc64le"): "51c977e15dca823dd79da52d0af7182648a7ff5c4c77932540d7905931d073a6", + ("2.29.2", "linux-s390x"): "39e5fab1821f11f8a89793013f0392a5da9824f0d19870406422ace510e0f640", + ("2.29.2", "netbsd-386"): "645e143784172c518965721cf067faa4498861d136c8a5e8834627d1fdf401b6", + ("2.29.2", "netbsd-amd64"): "374e37d12b7a791265416693e4ce058400995c0b746e9c23eba672b0f008bfc1", + ("2.29.2", "netbsd-arm64"): "334854973a8f7ed65eccaed82e337ecb63fcb94fe9d00d19de66f52bb015e2fc", + ("2.29.2", "netbsd-armv6"): "3d2c5c42ca372a317136f96758d8ad635fc60d174c7e6958be4ed9201d0b6199", + ("2.29.2", "netbsd-armv7"): "2d5a86ba651b752bafb9c9e2a625d54e7c28805615a66fb4972c5e657b667947", + ("2.29.2", "openbsd-386"): "971320e25ec0056a0f1bac83b9313c150ab708513fa52085265a9399cf98b5c1", + ("2.29.2", "openbsd-amd64"): "294260afe9c59afe8dbed062aba1a0863009a9f67b8fac4937d9fc0b18de10a2", + ("2.29.2", "openbsd-arm64"): "2914cf1bfcbf4d70838345cc8f333a44fcd99b07189b6a34e9c0c6719b25a695", + ("2.29.2", "openbsd-armv7"): "bfc5c375b34c07e847b1ce4b8934079156efbfb0cf0699fa89d3dfa9ddd65b30", + ("2.29.2", "windows-386"): "ed557402f6165b1d85d1281af3d156337ef4fb5677a099d897228e08170bc951", + ("2.29.2", "windows-amd64"): "924b52ad4f12f8e3b74a8e151c30bc5b7fbb866934c9dfba013509e3f2b38a62", + ("2.30.3", "darwin-amd64"): "8d7e0cda867553a01373fd93f24d718d10f74e0bb43c43f7902bc2216894a281", + ("2.30.3", "darwin-arm64"): "dc52f5042d2606f848847014222b06a7ab243c062c39120e4bacdd058eedf289", + ("2.30.3", "dragonfly-amd64"): "2acb977702e8f37605fefbd9eff3c7cbaa9e88e4d674362f90d5f728391bd2a5", + ("2.30.3", "freebsd-386"): "c6cbb68f9d9898e42d01e88827df4b5549e0e661f882e2fd1062db0b196d6a68", + ("2.30.3", "freebsd-amd64"): "b241d60c79da4504b6c082bd09a47c1164a15552e66bc981e319fdf9f3757e7c", + ("2.30.3", "freebsd-arm64"): "627688eec5060486fa5d070bc95de0cd005bfa6206d8d657693f54b699971878", + ("2.30.3", "freebsd-armv6"): "afc76f8e6e6c8cd3964886db10463256988dacb0c533700346495d52035d2edf", + ("2.30.3", "freebsd-armv7"): "ad0b56c76b342ac1bb02648b13efcc28296d4ca79900ecbbd00bb42972d0a9b9", + ("2.30.3", "illumos-amd64"): "9d8e4905da66ba4750a2d6e7c06ecf0f46053b5a0c6c6a95677490978b27effc", + ("2.30.3", "linux-386"): "7a194951fb51bc0f4f5a15d370ba8c60f62d3f6a5e02e0ccc75238e459bfc3a8", + ("2.30.3", "linux-amd64"): "1ccd386d05f73a98b69aa5e0ed31fffac95cd9dadf7df1540daf2f182c5287e2", + ("2.30.3", "linux-arm64"): "0bf66e0ab8fcad44ee5041d7909a955017f4587868ee96b76c44c02f500d843e", + ("2.30.3", "linux-armv5"): "3492153b60c973d0bccd90ea6ff131da7683dbec46565eb5af6901cfddf77b27", + ("2.30.3", "linux-armv6"): "89d4757507b3d233f1b516c48f362287972eed171b82572f437677c56e915534", + ("2.30.3", "linux-armv7"): "cb2d8eb3a22d6dbe69449f7d6604f2fa80fa70df4c35dfb412354188047941e7", + ("2.30.3", "linux-mips"): "13d5acca1fe121b6e4c1f75d5169aeac2da08067f7c1ee3ed39d781946e476a9", + ("2.30.3", "linux-mips64"): "8e8150e40ab1f67114dcd6091a5a0bbe4ecbe87f2a7aa239e086ec37a985fd33", + ("2.30.3", "linux-mips64le"): "f8dc62e8938b6226cc6fc7fd82c8d0c65b0f275b2e103266323b2146aec480c8", + ("2.30.3", "linux-mipsle"): "4122cf9642f099fb5b25ab89fac58e67b3b661c5c61de5377b17d62d032c1b04", + ("2.30.3", "linux-ppc64"): "57fce3a76f492ecddfcefa0745eadea776eac417ad1d8c0b25073ef672a7f1d1", + ("2.30.3", "linux-ppc64le"): "002ee190b11a904554e5c00bd1713679894bdcce32067b0de5fae87d4a31dc2c", + ("2.30.3", "linux-s390x"): "c6a3feaacf85474126b30577a8d85fa075a41497e03c48f7a5486a50fb02ebcd", + ("2.30.3", "netbsd-386"): "5747b0f539fff5db22a58b532f5be6f450e3da88795f642a0d16f1c40d6dc4e1", + ("2.30.3", "netbsd-amd64"): "393cd29411094785059f66309359791abd4605d22d6e76197d5e54003168e13c", + ("2.30.3", "netbsd-arm64"): "d9dad97f671c825ab071fa4eee9aecd5971ec5fb963eeadcb614e3100e9d9658", + ("2.30.3", "netbsd-armv6"): "3040ece61cbb92a60fb32246fa19dc001398bba4cb2324688cbe071a23f5c9c1", + ("2.30.3", "netbsd-armv7"): "8bb1c2d03a46294fd1bc4c47b7fdc3be8b7c5bcc589a3472c7776c4adb944e52", + ("2.30.3", "openbsd-386"): "cd00cb6cc74527162c51bf5f830bc4e800dec88a4b03dbf84f78051e6349f66f", + ("2.30.3", "openbsd-amd64"): "98609477fd38c3c45bb326f284615f15db05931a013238d308bee9530663697e", + ("2.30.3", "openbsd-arm64"): "85b01bd03872866852132d325738b59f20bc658c9e33496224e60bcd544d0fee", + ("2.30.3", "openbsd-armv7"): "d288f631b0db0a80e62dbf8ac1b5262fe85b3751be66c2d46f32463e0a9cb387", + ("2.30.3", "windows-386"): "90250bd300063ea1e041e82efee579e103b1e435f120bd252e4f597bd0e2f7a8", + ("2.30.3", "windows-amd64"): "365f8884b92e037f41f59f583b31c5e83fd3b6dbe821e91d3644a701f1001e96", }, ), alertmanager_binary_info = AlertmanagerBinaryInfo( @@ -325,6 +328,72 @@ def prometheus_repositories( ("0.21.0", "openbsd-amd64"): "ffd4fde08ff1236d37eabb10a6d1896404f06ebf8c5fd4c15c322b67a628f6a5", ("0.21.0", "windows-386"): "16797370f99db1d10aec642c4f266eb7d051bfaa874d17caf3041141a64cd26f", ("0.21.0", "windows-amd64"): "12c9a77d904bd7982e7ceacfbe9106e725e31536913c491e7b2703f9ddff4aa2", + ("0.22.2", "darwin-amd64"): "2629b6a598e3d16726cfbaec1debdcaf62dcf60ed2b52b2b18bb794e3a5b2e63", + ("0.22.2", "darwin-arm64"): "76c4b15189ccd9501ac7a3e30cc02447a08f78c8087bed2da17d29334a0c2927", + ("0.22.2", "dragonfly-amd64"): "c75625695d3afacdb89eff34001f5c0f85d8607502dd4eaeec1c0b8fe5e5218e", + ("0.22.2", "freebsd-386"): "dccd8a844bb03200d8e7fe42293c083f96fe5d4402b33f39b87133cf2bacea77", + ("0.22.2", "freebsd-amd64"): "0a7541595c713091dd1bba800281e6e3abe69073dbd1906019c1e285215f7d6a", + ("0.22.2", "freebsd-arm64"): "149e62254a03b607c860ba8655d9321085c36222a58f97a688f58801fbdd05d9", + ("0.22.2", "freebsd-armv6"): "7383eb8c630ffa46953cf8599888a8cbff0ca1bcb5f3ef6aa0cb6b03471c50f2", + ("0.22.2", "freebsd-armv7"): "081f79abf5a953db2b5153ac21df9b39627aad43c54daee1e887b08e9a911895", + ("0.22.2", "illumos-amd64"): "2522272c404580c5a59634f75315ddb85780a9b2e14894a583093d6d8caf9ecd", + ("0.22.2", "linux-386"): "d4248d2bb47bbd891de9f092f129a65246ef4cb32538c97824b9fec34b867d40", + ("0.22.2", "linux-amd64"): "9c3b1cce9c74f5cecb07ec4a636111ca52696c0a088dbaecf338594d6e55cd1a", + ("0.22.2", "linux-arm64"): "2592ba596b59a69db397987fc2ee1c4a91dddb63b92bada692270203d183e5f1", + ("0.22.2", "linux-armv5"): "c48a20f14ca4ae6ced976752a115f0687ecd734a873f0393afd6f7ab6159bdbe", + ("0.22.2", "linux-armv6"): "8d31f59b52f69a77f869bd124e87a5fc9434a9f4fce5325a980d35acd269f71c", + ("0.22.2", "linux-armv7"): "514e0629fed4594d14e9c1f3466fecb7e38f692a7b63772d7b6826bdbe071665", + ("0.22.2", "linux-mips"): "11e235fe01dbc5adbfaf355503ac0babbae7b2a00276a2770b8f4a01e9c55915", + ("0.22.2", "linux-mips64"): "94101a86f2eb99e0b7c98b8154a17b8f1d443911c5e52cd51604ba92e59098d3", + ("0.22.2", "linux-mips64le"): "c6c06e6468e09297e72af9896bbdb879aebf122a7118f9104243aadc976af350", + ("0.22.2", "linux-mipsle"): "3df3c3064cc3e88f8bfc7c05b55e717acc21ea8d24517a58be96ef2cb44cb845", + ("0.22.2", "linux-ppc64"): "dd03dc898aeaadeb29192f56be2da5bf785cc0075a0c4e94892f31c8363de7d5", + ("0.22.2", "linux-ppc64le"): "0e8c79b4e80a4535ce4e9fae7913884429f55d1725852a43a2964d3b0847b9c8", + ("0.22.2", "linux-s390x"): "38505aca84989ea3c8089f7d5e0663c826b977ce38dca1003e8b0bf14828d1ce", + ("0.22.2", "netbsd-386"): "218311641781781871ea2a5699732c771ed76a6f281bd67b3f8a024afa06efa6", + ("0.22.2", "netbsd-amd64"): "2bfab1d64bff8578e1edc1efde5c692ce03f07c75e0768c785e53066366fdb4a", + ("0.22.2", "netbsd-arm64"): "94049615dc7a92f959579d4175852385049d2a6ebbe38d6e9bd9d97287c39189", + ("0.22.2", "netbsd-armv6"): "ab2ca08e6b16100fe52f8c83d53fe33c70e8302488f4389c23b1c70e07e842c7", + ("0.22.2", "netbsd-armv7"): "88faa3ea904c4be57fc537dc2b7dc492ab7f17817f3d7ebcd7221a7d171036c4", + ("0.22.2", "openbsd-386"): "b13b00d77248b3b39324ce5ed03ee9a628bb24345d33be3a78b3e0a7c736f4b0", + ("0.22.2", "openbsd-amd64"): "b40fae31909ada235e213e03a638f25028a8655feaca907a6c7688309a6bb688", + ("0.22.2", "openbsd-arm64"): "747e05d7d4e1a73cb343db42485753616bbf82605f57cc85735ed5022b67b36e", + ("0.22.2", "openbsd-armv7"): "7fd037a22b39f9f0f3f4b671059d0ad8881d326d7a5f50d152146799a37c6ebe", + ("0.22.2", "windows-386"): "78e45056b359c78b3e67b443e127d6c25a8fc6b7776c64aea82ad6f386cf98bf", + ("0.22.2", "windows-amd64"): "98b8b66ff8818c64452a54041c1d388af2f0be124dc3bac801ce095744e6e66b", + ("0.23.0", "darwin-amd64"): "f8d668f88f8934202aaf646a93a116ac38532144bdaad291319518704a01f2ca", + ("0.23.0", "darwin-arm64"): "01d47f98b46d92dac2a7ae8f45668e8491f835c57f8c3cab39a3cb6ec8d16ca1", + ("0.23.0", "dragonfly-amd64"): "d50d3c6f2d524157d1447e7e793c1567f0b7e5c5bd3a8664dcf35f8811e74132", + ("0.23.0", "freebsd-386"): "b25c51b19e4295159e81c3a94e91f34b6750ad8bb54971263a9296695f267e3a", + ("0.23.0", "freebsd-amd64"): "59c73c66dc5e103f96d2d54920baf9168d754636e96876b5f4b713effabc8c1c", + ("0.23.0", "freebsd-arm64"): "875dec9177aa9e1185924773fa478f27368fc7b71b42628dca8db6a5351a99c0", + ("0.23.0", "freebsd-armv6"): "fd07d75d4823437527fe91736b6fe63aae2e7624a6b1bb84d05a83fc4b6739d0", + ("0.23.0", "freebsd-armv7"): "0673354936807c12d5f7dd13837524f7d23b177a31af8e8bb5235eb5325c1e7f", + ("0.23.0", "illumos-amd64"): "93d91f2ff06c4de271b8b3180e6673fd2fe2569dce0da335e860a261a700717b", + ("0.23.0", "linux-386"): "097abb8b7b676bf1543d9020120f56beedb3935ab2f71a03e4537e17350d3be3", + ("0.23.0", "linux-amd64"): "77793c4d9bb92be98f7525f8bc50cb8adb8c5de2e944d5500e90ab13918771fc", + ("0.23.0", "linux-arm64"): "afa44f350797032ceb714598900cfdddbf81d6ef03d2ecbfc0221cc2cb28a6b9", + ("0.23.0", "linux-armv5"): "11bfd273a0e115f662fc31cb8c818f8857dd5857c3045ad104aa15766ad4fb65", + ("0.23.0", "linux-armv6"): "9837426d31084aec1e9f55bbce8defc05417e3af2098255a5eebab096dc246cd", + ("0.23.0", "linux-armv7"): "489c377a04b6097f07fdcc4b532a9643e520739b268be5350c4ffa999956d5c9", + ("0.23.0", "linux-mips"): "7a0d2690d69df8cb1500568d02d9ad8a990b8e13bb8e3ef383ef09c5fe6fc5d6", + ("0.23.0", "linux-mips64"): "c3711cd95cde42dfe19c4c6186026555fedc39980449a118cbbb894b6173a1fb", + ("0.23.0", "linux-mips64le"): "460ebf9f92bac4b0fad1bf554ad9d60dcea65ff80b7d5326fb36e8d15a3b254a", + ("0.23.0", "linux-mipsle"): "ee2ab5f329e728d57f2f8ae59ad4c10351800c20b69058daa42857d63771c2d0", + ("0.23.0", "linux-ppc64"): "f79cf779b758d1cda4cf6b9e6708497e1c67e0e619efefadba66d57a7b937f6c", + ("0.23.0", "linux-ppc64le"): "c047283a61bb99234e8050347c5f1333c6805eb3e5806e73a0e80f6249967831", + ("0.23.0", "linux-s390x"): "45a9ea7549f8d4242703d9bd66d03c62530e67097010303d3a002a79de7a01aa", + ("0.23.0", "netbsd-386"): "e43d565eda9132c385b9e06883ce67fc8bc09053e70d5b8e54967d2c384f5778", + ("0.23.0", "netbsd-amd64"): "6c4983b500fe18d71174e817a31828bda89710ad8a9f1329ed2ff6da08826a48", + ("0.23.0", "netbsd-arm64"): "15e0b87bfe5bb53d2240af855f66a5d895eec6c324dc0764e8799045543b770d", + ("0.23.0", "netbsd-armv6"): "814bbb0f1c425d05ce60122726e8a16f2d18ae89255c37622bac1abdb3fe1c11", + ("0.23.0", "netbsd-armv7"): "9a8fa1ba2c181797013494d74dcb4bbb4aa568a00467cb270f3e393dd8a09c9a", + ("0.23.0", "openbsd-386"): "ef82fbeb03243eae8c6fede858d8118dad28a4c1f0504451361e02eac2808cdf", + ("0.23.0", "openbsd-amd64"): "9ed30892abc21fe7b32dd29c11b3ddb0262f0f8e6f80c9265139c92611b95290", + ("0.23.0", "openbsd-arm64"): "f47ad57dceecae7a40ede243b99f8b56bde5b930ec98d95c14c95d5e398f8fa9", + ("0.23.0", "openbsd-armv7"): "4afc7974f078bc882cfcead000ffc52ccac9609caec5798d90d4a35eb7a10a8b", + ("0.23.0", "windows-386"): "b1dd8405de144f4d2e2ae067138fb720fb9eb9fa6234c8de14dfc6c5cb8df155", + ("0.23.0", "windows-amd64"): "7832aac30f849de0a1a60d961dec083e97933a73dc26673ffaef4809719fcd3c", }, ), ) diff --git a/prometheus/internal/toolchain.bzl b/prometheus/internal/toolchain.bzl index d8060cd..92a397b 100644 --- a/prometheus/internal/toolchain.bzl +++ b/prometheus/internal/toolchain.bzl @@ -1,4 +1,5 @@ load(":providers.bzl", "AlertmanagerInfo", "AmtoolInfo", "PrometheusInfo", "PromtoolInfo") +load(":platforms.bzl", "CpuConstraintsInfo", "OsConstraintsInfo", "PLATFORMS") PrometheusToolchainInfo = provider( doc = "Prometheus Toolchain metadata, contains prometheus, alertmanager, promtool and amtool's necessary data", @@ -13,22 +14,23 @@ PrometheusToolchainInfo = provider( def _prometheus_toolchain_impl(ctx): """Toolchain main implementation function""" - toolchain_info = platform_common.ToolchainInfo( - prometheusToolchainInfo = PrometheusToolchainInfo( - name = ctx.label.name, - prometheus = PrometheusInfo( - tool = ctx.attr.prometheus, - template = ctx.attr.prometheus_executor_template, - ), - promtool = PromtoolInfo( - tool = ctx.attr.promtool, - template = ctx.attr.promtool_executor_template, + return [ + platform_common.ToolchainInfo( + prometheusToolchainInfo = PrometheusToolchainInfo( + name = ctx.label.name, + prometheus = PrometheusInfo( + tool = ctx.attr.prometheus, + template = ctx.attr.prometheus_executor_template, + ), + promtool = PromtoolInfo( + tool = ctx.attr.promtool, + template = ctx.attr.promtool_executor_template, + ), + amtool = AmtoolInfo(), + alertmanager = AlertmanagerInfo(), ), - amtool = AmtoolInfo(), - alertmanager = AlertmanagerInfo(), ), - ) - return [toolchain_info] + ] prometheus_toolchain = rule( implementation = _prometheus_toolchain_impl, @@ -42,47 +44,41 @@ prometheus_toolchain = rule( provides = [platform_common.ToolchainInfo], ) -def declare_toolchains_prod(architectures): - """Create prometheus_toolchain rules for every supported platform and link toolchains to them""" - - for arch in architectures: - prometheus_toolchain( - name = "prometheus_%s" % arch, - prometheus = "@prometheus_%s//:prometheus" % arch, - promtool = "@prometheus_%s//:promtool" % arch, - promtool_executor_template = "@io_bazel_rules_prometheus//prometheus/internal:promtool.sh.tpl", - prometheus_executor_template = "@io_bazel_rules_prometheus//prometheus/internal:prometheus.sh.tpl", - ) +def declare_toolchains(_platforms_info = PLATFORMS): + """ + Create prometheus_toolchain rules for every supported platform and link toolchains to them - native.toolchain( - name = "prometheus_toolchain_%s" % arch, - exec_compatible_with = [ - "@platforms//os:osx", - "@platforms//cpu:x86_64", - ], - target_compatible_with = [ - "@platforms//os:osx", - "@platforms//cpu:x86_64", - ], - toolchain = "@io_bazel_rules_prometheus//prometheus/internal:prometheus_%s" % arch, - toolchain_type = "@io_bazel_rules_prometheus//prometheus:toolchain", - ) + Args: + _platforms_info: pre-built PrometheusPlatformInfo provider with info on all available os+architectures + """ -def declare_toolchains_dummy(architectures): - """Experimental: Create toolchain dummies for all platforms""" + for platform in _platforms_info.available_platforms: + platform_info = getattr(_platforms_info.platforms, platform) - for arch in architectures: prometheus_toolchain( - name = "prometheus_%s" % arch, - prometheus = "@prometheus_%s//:prometheus" % arch, - promtool = "@prometheus_%s//:promtool" % arch, + name = "prometheus_{platform}".format(platform = platform), + prometheus = "@prometheus_{platform}//:prometheus".format(platform = platform), + promtool = "@prometheus_{platform}//:promtool".format(platform = platform), promtool_executor_template = "@io_bazel_rules_prometheus//prometheus/internal:promtool.sh.tpl", prometheus_executor_template = "@io_bazel_rules_prometheus//prometheus/internal:prometheus.sh.tpl", + + # https://docs.bazel.build/versions/main/be/common-definitions.html#common.tags + # exclude toolchain from expanding on wildcard + # so you won't download all dependencies for all platforms + tags = ["manual"], ) native.toolchain( - name = "prometheus_toolchain_%s" % arch, - toolchain = "@io_bazel_rules_prometheus//prometheus/internal:prometheus_%s" % arch, + name = "prometheus_toolchain_{platform}".format(platform = platform), + target_compatible_with = [ + getattr(OsConstraintsInfo, platform_info.os), + getattr(CpuConstraintsInfo, platform_info.cpu), + ], + exec_compatible_with = [ + getattr(OsConstraintsInfo, platform_info.os), + getattr(CpuConstraintsInfo, platform_info.cpu), + ], + toolchain = ":prometheus_{platform}".format(platform = platform), toolchain_type = "@io_bazel_rules_prometheus//prometheus:toolchain", )