diff --git a/.bazelignore b/.bazelignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.bazelignore @@ -0,0 +1 @@ +node_modules diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 277e407..ec7ef44 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] workflow_dispatch: jobs: diff --git a/.gitignore b/.gitignore index 32afa98..c4ddd4b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ bazel-rules_oci bazel-testlogs bin/ocitool-* + +node_modules diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..d8f8d46 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +docs diff --git a/BUILD.bazel b/BUILD.bazel index 74bee6b..a5af016 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,38 +1,27 @@ load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files") -load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test") load("@gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle", "gazelle_binary") +load("@npm//:defs.bzl", "npm_link_all_packages") load("//oci:toolchain.bzl", "oci_local_toolchain") # gazelle:prefix github.com/DataDog/rules_oci # gazelle:go_naming_convention go_default_library # gazelle:lang go -oci_local_toolchain( - name = "oci_local_toolchain", -) - -buildifier( - name = "buildifier", - exclude_patterns = ["./.git/*"], - lint_mode = "warn", - mode = "fix", +npm_link_all_packages( + name = "node_modules", ) -buildifier_test( - name = "buildifier_test", - exclude_patterns = ["./.git/*"], - lint_mode = "warn", - no_sandbox = True, - workspace = "//:WORKSPACE", +oci_local_toolchain( + name = "oci_local_toolchain", ) gazelle( name = "gazelle", - gazelle = ":default_gazelle_binary", + gazelle = ":gazelle-binary", ) gazelle_binary( - name = "default_gazelle_binary", + name = "gazelle-binary", languages = DEFAULT_LANGUAGES + [ "@bazel_skylib_gazelle_plugin//bzl", ], @@ -54,3 +43,13 @@ write_source_files( "bin/ocitool-linux-arm64": "//go/cmd/ocitool", }, ) + +alias( + name = "format", + actual = "//tools/format", +) + +exports_files( + ["WORKSPACE"], + visibility = ["//visibility:public"], +) diff --git a/LICENSE-3rdparty.csv b/LICENSE-3rdparty.csv old mode 100755 new mode 100644 diff --git a/MODULE.bazel b/MODULE.bazel index 627c02d..b0c3999 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -3,10 +3,13 @@ module( repo_name = "com_github_datadog_rules_oci", ) +bazel_dep(name = "aspect_rules_js", version = "2.1.2") bazel_dep(name = "aspect_bazel_lib", version = "2.7.3") +bazel_dep(name = "aspect_rules_lint", version = "1.0.8") bazel_dep(name = "bazel_skylib", version = "1.6.1") bazel_dep(name = "gazelle", version = "0.38.0") bazel_dep(name = "rules_go", version = "0.47.1") +bazel_dep(name = "rules_nodejs", version = "6.3.2") bazel_dep(name = "rules_pkg", version = "0.10.1") bazel_dep(name = "stardoc", version = "0.6.2") @@ -14,8 +17,11 @@ bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.6.1", dev_dependenc bazel_dep(name = "buildifier_prebuilt", version = "7.3.1", dev_dependency = True) go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") -go_sdk.download(version = "1.22.5") -go_sdk.host() +go_sdk.download( + name = "go_sdk", + version = "1.22.5", +) +use_repo(go_sdk, "go_sdk") go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") go_deps.from_file(go_mod = "//:go.mod") @@ -23,29 +29,16 @@ use_repo( go_deps, "com_github_blakesmith_ar", "com_github_containerd_containerd", - "com_github_containerd_containerd_api", - "com_github_containerd_continuity", - "com_github_containerd_errdefs", - "com_github_containerd_fifo", "com_github_containerd_log", - "com_github_containerd_platforms", - "com_github_containerd_typeurl_v2", "com_github_docker_docker_credential_helpers", - "com_github_klauspost_compress", - "com_github_microsoft_go_winio", - "com_github_microsoft_hcsshim", "com_github_mitchellh_go_homedir", - "com_github_moby_sys_sequential", "com_github_opencontainers_go_digest", "com_github_opencontainers_image_spec", - "com_github_opencontainers_runtime_spec", "com_github_sirupsen_logrus", "com_github_stretchr_testify", "com_github_urfave_cli_v2", "land_oras_oras_go", - "org_golang_google_grpc", "org_golang_x_sync", - "org_golang_x_sys", ) go_deps.module_override( patch_strip = 1, @@ -55,16 +48,33 @@ go_deps.module_override( path = "github.com/containerd/containerd", ) -oci_pull = use_repo_rule("//oci:defs.bzl", "oci_pull") +oci_pull = use_repo_rule("//oci:repositories.bzl", "oci_pull") oci_pull( - name = "ubuntu_focal", - # Latest at "focal" tag - digest = "sha256:9d6a8699fb5c9c39cf08a0871bd6219f0400981c570894cd8cbea30d3424a31f", - registry = "ghcr.io", - repository = "datadog/rules_oci/ubuntu", + name = "ubuntu_noble", + # "noble" tag as of 2024-12-30 + digest = "sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab", + registry = "mirror.gcr.io", + repository = "library/ubuntu", ) register_toolchains( "@com_github_datadog_rules_oci//:oci_local_toolchain", ) + +node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node", dev_dependency = True) +node.toolchain(node_version = "16.14.2") + +npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True) +npm.npm_translate_lock( + name = "npm", + pnpm_lock = "//:pnpm-lock.yaml", + verify_node_modules_ignored = "//:.bazelignore", +) +use_repo(npm, "npm") + +pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") + +# Allows developers to use the matching pnpm version, for example: +# bazel run -- @pnpm --dir $PWD install +use_repo(pnpm, "pnpm") diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 45679b7..7fc5f81 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -7,14 +7,31 @@ "https://bcr.bazel.build/modules/abseil-cpp/20211102.0/source.json": "7e3a9adf473e9af076ae485ed649d5641ad50ec5c11718103f34de03170d94ad", "https://bcr.bazel.build/modules/apple_support/1.5.0/MODULE.bazel": "50341a62efbc483e8a2a6aec30994a58749bd7b885e18dd96aa8c33031e558ef", "https://bcr.bazel.build/modules/apple_support/1.5.0/source.json": "eb98a7627c0bc486b57f598ad8da50f6625d974c8f723e9ea71bd39f709c9862", + "https://bcr.bazel.build/modules/aspect_bazel_lib/1.31.2/MODULE.bazel": "7bee702b4862612f29333590f4b658a5832d433d6f8e4395f090e8f4e85d442f", + "https://bcr.bazel.build/modules/aspect_bazel_lib/1.38.0/MODULE.bazel": "6307fec451ba9962c1c969eb516ebfe1e46528f7fa92e1c9ac8646bef4cdaa3f", + "https://bcr.bazel.build/modules/aspect_bazel_lib/1.42.2/MODULE.bazel": "2e0d8ab25c57a14f56ace1c8e881b69050417ff91b2fb7718dc00d201f3c3478", "https://bcr.bazel.build/modules/aspect_bazel_lib/2.7.3/MODULE.bazel": "c3f66aa9f490a580dd9b4c0adf4b2e2d9712152c348c74b77a7c22b1461ed143", - "https://bcr.bazel.build/modules/aspect_bazel_lib/2.7.3/source.json": "8799cd15d297f5195b640bdc03583f9fff36231d5726447d442a7a331e5b5cd3", + "https://bcr.bazel.build/modules/aspect_bazel_lib/2.7.7/MODULE.bazel": "491f8681205e31bb57892d67442ce448cda4f472a8e6b3dc062865e29a64f89c", + "https://bcr.bazel.build/modules/aspect_bazel_lib/2.8.1/MODULE.bazel": "812d2dd42f65dca362152101fbec418029cc8fd34cbad1a2fde905383d705838", + "https://bcr.bazel.build/modules/aspect_bazel_lib/2.8.1/source.json": "95a6b56904e2d8bfea164dc6c98ccafe8cb75cb0623cb6ef5b3cfb15fdddabd6", + "https://bcr.bazel.build/modules/aspect_rules_js/1.33.1/MODULE.bazel": "db3e7f16e471cf6827059d03af7c21859e7a0d2bc65429a3a11f005d46fc501b", + "https://bcr.bazel.build/modules/aspect_rules_js/1.40.0/MODULE.bazel": "01a1014e95e6816b68ecee2584ae929c7d6a1b72e4333ab1ff2d2c6c30babdf1", + "https://bcr.bazel.build/modules/aspect_rules_js/2.1.2/MODULE.bazel": "05bbb900d2de0ac08c260af149ee6f1394c37b0ca388571305e33be00d7c3b97", + "https://bcr.bazel.build/modules/aspect_rules_js/2.1.2/source.json": "6eadb3c46d212fe4af0669f527d005331ad0acfdc3b0999b770a057e5d4177e2", + "https://bcr.bazel.build/modules/aspect_rules_lint/0.12.0/MODULE.bazel": "e767c5dbfeb254ec03275a7701b5cfde2c4d2873676804bc7cb27ddff3728fed", + "https://bcr.bazel.build/modules/aspect_rules_lint/1.0.8/MODULE.bazel": "2e4da649658a42c33b9541b9d32c363abff910da1317a53a69d0d22a369fce69", + "https://bcr.bazel.build/modules/aspect_rules_lint/1.0.8/source.json": "c4c16545e049f25101f293646f1acb4187a4f2e03aff5f735c2a896e7e96ab5a", + "https://bcr.bazel.build/modules/bazel_features/0.1.0/MODULE.bazel": "47011d645b0f949f42ee67f2e8775188a9cf4a0a1528aa2fa4952f2fd00906fd", "https://bcr.bazel.build/modules/bazel_features/1.1.0/MODULE.bazel": "cfd42ff3b815a5f39554d97182657f8c4b9719568eb7fded2b9135f084bf760b", "https://bcr.bazel.build/modules/bazel_features/1.1.1/MODULE.bazel": "27b8c79ef57efe08efccbd9dd6ef70d61b4798320b8d3c134fd571f78963dbcd", "https://bcr.bazel.build/modules/bazel_features/1.11.0/MODULE.bazel": "f9382337dd5a474c3b7d334c2f83e50b6eaedc284253334cf823044a26de03e8", "https://bcr.bazel.build/modules/bazel_features/1.11.0/source.json": "c9320aa53cd1c441d24bd6b716da087ad7e4ff0d9742a9884587596edfe53015", + "https://bcr.bazel.build/modules/bazel_features/1.2.0/MODULE.bazel": "122b2b606622afbaa498913d54f52d9bcd2d19a5edd1bd6d6c5aa17441c4d5f9", + "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", + "https://bcr.bazel.build/modules/bazel_features/1.9.0/MODULE.bazel": "885151d58d90d8d9c811eb75e3288c11f850e1d6b481a8c9f766adee4712358b", "https://bcr.bazel.build/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a", "https://bcr.bazel.build/modules/bazel_skylib/1.0.3/MODULE.bazel": "bcb0fd896384802d1ad283b4e4eb4d718eebd8cb820b0a2c3a347fb971afd9d8", + "https://bcr.bazel.build/modules/bazel_skylib/1.1.1/MODULE.bazel": "1add3e7d93ff2e6998f9e118022c84d163917d912f5afafb3058e3d2f1545b5e", "https://bcr.bazel.build/modules/bazel_skylib/1.2.0/MODULE.bazel": "44fe84260e454ed94ad326352a698422dbe372b21a1ac9f3eab76eb531223686", "https://bcr.bazel.build/modules/bazel_skylib/1.2.1/MODULE.bazel": "f35baf9da0efe45fa3da1696ae906eea3d615ad41e2e3def4aeb4e8bc0ef9a7a", "https://bcr.bazel.build/modules/bazel_skylib/1.3.0/MODULE.bazel": "20228b92868bf5cfc41bda7afc8a8ba2a543201851de39d990ec957b513579c5", @@ -25,12 +42,14 @@ "https://bcr.bazel.build/modules/bazel_skylib/1.6.1/source.json": "082ed5f9837901fada8c68c2f3ddc958bb22b6d654f71dd73f3df30d45d4b749", "https://bcr.bazel.build/modules/bazel_skylib_gazelle_plugin/1.6.1/MODULE.bazel": "e6862dead9e7a1b5bfe3008ae4df87b036f7937935d1344073bc5ae00bad0792", "https://bcr.bazel.build/modules/bazel_skylib_gazelle_plugin/1.6.1/source.json": "4636eba9f971fd34efbe73ea17a54bba678d993cc196a9472ed49be8fe545446", + "https://bcr.bazel.build/modules/buildifier_prebuilt/6.1.2/MODULE.bazel": "2ef4962c8b0b6d8d21928a89190755619254459bc67f870dc0ccb9ba9952d444", "https://bcr.bazel.build/modules/buildifier_prebuilt/7.3.1/MODULE.bazel": "537faf0ad9f5892910074b8e43b4c91c96f1d5d86b6ed04bdbe40cf68aa48b68", "https://bcr.bazel.build/modules/buildifier_prebuilt/7.3.1/source.json": "55153a5e6ca9c8a7e266c4b46b951e8a010d25ec6062bc35d5d4f89925796bad", "https://bcr.bazel.build/modules/buildozer/7.1.2/MODULE.bazel": "2e8dd40ede9c454042645fd8d8d0cd1527966aa5c919de86661e62953cd73d84", "https://bcr.bazel.build/modules/buildozer/7.1.2/source.json": "c9028a501d2db85793a6996205c8de120944f50a0d570438fcae0457a5f9d1f8", "https://bcr.bazel.build/modules/gazelle/0.27.0/MODULE.bazel": "3446abd608295de6d90b4a8a118ed64a9ce11dcb3dda2dc3290a22056bd20996", "https://bcr.bazel.build/modules/gazelle/0.29.0/MODULE.bazel": "a8c809839caeb52995de3f46bbc60cfd327fadfdbfa9f19ee297c8bc8500be45", + "https://bcr.bazel.build/modules/gazelle/0.30.0/MODULE.bazel": "f888a1effe338491f35f0e0e85003b47bb9d8295ccba73c37e07702d8d31c65b", "https://bcr.bazel.build/modules/gazelle/0.32.0/MODULE.bazel": "b499f58a5d0d3537f3cf5b76d8ada18242f64ec474d8391247438bf04f58c7b8", "https://bcr.bazel.build/modules/gazelle/0.33.0/MODULE.bazel": "a13a0f279b462b784fb8dd52a4074526c4a2afe70e114c7d09066097a46b3350", "https://bcr.bazel.build/modules/gazelle/0.34.0/MODULE.bazel": "abdd8ce4d70978933209db92e436deb3a8b737859e9354fb5fd11fb5c2004c8a", @@ -51,6 +70,8 @@ "https://bcr.bazel.build/modules/protobuf/3.19.0/MODULE.bazel": "6b5fbb433f760a99a22b18b6850ed5784ef0e9928a72668b66e4d7ccd47db9b0", "https://bcr.bazel.build/modules/protobuf/3.19.2/MODULE.bazel": "532ffe5f2186b69fdde039efe6df13ba726ff338c6bc82275ad433013fa10573", "https://bcr.bazel.build/modules/protobuf/3.19.6/MODULE.bazel": "9233edc5e1f2ee276a60de3eaa47ac4132302ef9643238f23128fea53ea12858", + "https://bcr.bazel.build/modules/rules_buf/0.1.1/MODULE.bazel": "6189aec18a4f7caff599ad41b851ab7645d4f1e114aa6431acf9b0666eb92162", + "https://bcr.bazel.build/modules/rules_buf/0.1.1/source.json": "021363d254f7438f3f10725355969c974bb2c67e0c28667782ade31a9cdb747f", "https://bcr.bazel.build/modules/rules_cc/0.0.1/MODULE.bazel": "cb2aa0747f84c6c3a78dad4e2049c154f08ab9d166b1273835a8174940365647", "https://bcr.bazel.build/modules/rules_cc/0.0.2/MODULE.bazel": "6915987c90970493ab97393024c156ea8fb9f3bea953b2f3ec05c34f19b5695c", "https://bcr.bazel.build/modules/rules_cc/0.0.8/MODULE.bazel": "964c85c82cfeb6f3855e6a07054fdb159aced38e99a5eecf7bce9d53990afa3e", @@ -58,6 +79,8 @@ "https://bcr.bazel.build/modules/rules_cc/0.0.9/source.json": "1f1ba6fea244b616de4a554a0f4983c91a9301640c8fe0dd1d410254115c8430", "https://bcr.bazel.build/modules/rules_go/0.33.0/MODULE.bazel": "a2b11b64cd24bf94f57454f53288a5dacfe6cb86453eee7761b7637728c1910c", "https://bcr.bazel.build/modules/rules_go/0.37.0/MODULE.bazel": "7639dae065f071efebbe73c03dc8330c3293206cf073af7c7084add4e0120aba", + "https://bcr.bazel.build/modules/rules_go/0.38.1/MODULE.bazel": "fb8e73dd3b6fc4ff9d260ceacd830114891d49904f5bda1c16bc147bcc254f71", + "https://bcr.bazel.build/modules/rules_go/0.39.1/MODULE.bazel": "d34fb2a249403a5f4339c754f1e63dc9e5ad70b47c5e97faee1441fc6636cd61", "https://bcr.bazel.build/modules/rules_go/0.41.0/MODULE.bazel": "55861d8e8bb0e62cbd2896f60ff303f62ffcb0eddb74ecb0e5c0cbe36fc292c8", "https://bcr.bazel.build/modules/rules_go/0.42.0/MODULE.bazel": "8cfa875b9aa8c6fce2b2e5925e73c1388173ea3c32a0db4d2b4804b453c14270", "https://bcr.bazel.build/modules/rules_go/0.46.0/MODULE.bazel": "3477df8bdcc49e698b9d25f734c4f3a9f5931ff34ee48a2c662be168f5f2d3fd", @@ -76,22 +99,36 @@ "https://bcr.bazel.build/modules/rules_license/0.0.4/MODULE.bazel": "6a88dd22800cf1f9f79ba32cacad0d3a423ed28efa2c2ed5582eaa78dd3ac1e5", "https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d", "https://bcr.bazel.build/modules/rules_license/0.0.7/source.json": "355cc5737a0f294e560d52b1b7a6492d4fff2caf0bef1a315df5a298fca2d34a", + "https://bcr.bazel.build/modules/rules_multirun/0.9.0/MODULE.bazel": "32d628ef586b5b23f67e55886b7bc38913ea4160420d66ae90521dda2ff37df0", + "https://bcr.bazel.build/modules/rules_multirun/0.9.0/source.json": "e882ba77962fa6c5fe68619e5c7d0374ec9a219fb8d03c42eadaf6d0243771bd", + "https://bcr.bazel.build/modules/rules_multitool/0.4.0/MODULE.bazel": "15517987d5c00c9e7faab41fbe22ee67a350b6eabcc1e08baded5c6d9025897f", + "https://bcr.bazel.build/modules/rules_multitool/0.4.0/source.json": "d73b450b7c6d9683e400d6cebc463fbc2b870cc5d8e2e75080d6278805aaab08", + "https://bcr.bazel.build/modules/rules_nodejs/5.8.2/MODULE.bazel": "6bc03c8f37f69401b888023bf511cb6ee4781433b0cb56236b2e55a21e3a026a", + "https://bcr.bazel.build/modules/rules_nodejs/6.3.0/MODULE.bazel": "45345e4aba35dd6e4701c1eebf5a4e67af4ed708def9ebcdc6027585b34ee52d", + "https://bcr.bazel.build/modules/rules_nodejs/6.3.2/MODULE.bazel": "42e8d5254b6135f890fecca7c8d7f95a7d27a45f8275b276f66ec337767530ef", + "https://bcr.bazel.build/modules/rules_nodejs/6.3.2/source.json": "80e0a68eb81772f1631f8b69014884eebc2474b3b3025fd19a5240ae4f76f9c9", "https://bcr.bazel.build/modules/rules_pkg/0.10.1/MODULE.bazel": "d6e593e048db5f1028f1f05ceb64b123aa6f1c2d43cba049c036443ab2cc2044", "https://bcr.bazel.build/modules/rules_pkg/0.10.1/source.json": "a3550442d1530f00fd2a51036250db1891c8fedfd85991c65a0bd0f6daefe0a3", "https://bcr.bazel.build/modules/rules_pkg/0.7.0/MODULE.bazel": "df99f03fc7934a4737122518bb87e667e62d780b610910f0447665a7e2be62dc", "https://bcr.bazel.build/modules/rules_proto/4.0.0/MODULE.bazel": "a7a7b6ce9bee418c1a760b3d84f83a299ad6952f9903c67f19e4edd964894e06", "https://bcr.bazel.build/modules/rules_proto/5.3.0-21.7/MODULE.bazel": "e8dff86b0971688790ae75528fe1813f71809b5afd57facb44dad9e8eca631b7", - "https://bcr.bazel.build/modules/rules_proto/5.3.0-21.7/source.json": "d57902c052424dfda0e71646cb12668d39c4620ee0544294d9d941e7d12bc3a9", + "https://bcr.bazel.build/modules/rules_proto/6.0.0-rc2/MODULE.bazel": "e17f94f8a347e2c808517b65d74988839d2d62daceb50073e44060193b785eb1", + "https://bcr.bazel.build/modules/rules_proto/6.0.0/MODULE.bazel": "b531d7f09f58dce456cd61b4579ce8c86b38544da75184eadaf0a7cb7966453f", + "https://bcr.bazel.build/modules/rules_proto/6.0.0/source.json": "de77e10ff0ab16acbf54e6b46eecd37a99c5b290468ea1aee6e95eb1affdaed7", "https://bcr.bazel.build/modules/rules_python/0.10.2/MODULE.bazel": "cc82bc96f2997baa545ab3ce73f196d040ffb8756fd2d66125a530031cd90e5f", "https://bcr.bazel.build/modules/rules_python/0.22.1/MODULE.bazel": "26114f0c0b5e93018c0c066d6673f1a2c3737c7e90af95eff30cfee38d0bbac7", "https://bcr.bazel.build/modules/rules_python/0.24.0/MODULE.bazel": "4bff7f583653d0762cda21303da0643cc4c545ddfd9593337f18dad8d1787801", - "https://bcr.bazel.build/modules/rules_python/0.24.0/source.json": "c4bbbd6350883cfc0f4a805577ab94ed94c2f5dc588e84cf1851137c121d3887", + "https://bcr.bazel.build/modules/rules_python/0.27.1/MODULE.bazel": "65dc875cc1a06c30d5bbdba7ab021fd9e551a6579e408a3943a61303e2228a53", + "https://bcr.bazel.build/modules/rules_python/0.27.1/source.json": "88980dfdcf0651a11344cad2ab1f962ea1b0e51edc80ebbae274c8fa9cde78f4", "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c", + "https://bcr.bazel.build/modules/stardoc/0.5.0/MODULE.bazel": "f9f1f46ba8d9c3362648eea571c6f9100680efc44913618811b58cc9c02cd678", "https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8", "https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c", "https://bcr.bazel.build/modules/stardoc/0.5.4/MODULE.bazel": "6569966df04610b8520957cb8e97cf2e9faac2c0309657c537ab51c16c18a2a4", "https://bcr.bazel.build/modules/stardoc/0.6.2/MODULE.bazel": "7060193196395f5dd668eda046ccbeacebfd98efc77fed418dbe2b82ffaa39fd", "https://bcr.bazel.build/modules/stardoc/0.6.2/source.json": "d2ff8063b63b4a85e65fe595c4290f99717434fa9f95b4748a79a7d04dfed349", + "https://bcr.bazel.build/modules/toolchains_protoc/0.2.1/MODULE.bazel": "2f08433ff5e659069b3a1abfee2377d68f510f2de1da50678ed992c455b4ff91", + "https://bcr.bazel.build/modules/toolchains_protoc/0.2.1/source.json": "4ee6b007b62e1b9e493b00ccc60e61a258633f304b74813b6e7f7234927be94c", "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43", "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/source.json": "f1ef7d3f9e0e26d4b23d1c39b5f5de71f584dd7d1b4ef83d9bbba6ec7a6a6459", "https://bcr.bazel.build/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0", @@ -131,8 +168,8 @@ }, "@@aspect_bazel_lib~//lib:extensions.bzl%toolchains": { "general": { - "bzlTransitiveDigest": "cIE3tZoia6TmpPqA1aE6iBwPwpubd6gNSIaejjdgFYw=", - "usagesDigest": "HI2w+jfuMaE+P6fUnT6o1mzJOPGv300K9EA4PjKA3H0=", + "bzlTransitiveDigest": "o+c8qRBWojmxp6XnxraB8cDLR3egI6E7hjYq4t1rzM8=", + "usagesDigest": "kovSbvt7seRuTXzVRp1rvp1iF2x23df0LZFWyeKbvhI=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -596,6 +633,111 @@ ] } }, + "@@aspect_rules_js~//npm:extensions.bzl%pnpm": { + "general": { + "bzlTransitiveDigest": "5zXWRCZJ+wamppia9yzrQ5rTtd5QNP6IQGMHvBwVzeg=", + "usagesDigest": "0ECRKD7LKH7Re9L89Ty6HnOAsqxp/2RRR09mpJ7jtEc=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "pnpm__links": { + "bzlFile": "@@aspect_rules_js~//npm/private:npm_import.bzl", + "ruleClassName": "npm_import_links", + "attributes": { + "package": "pnpm", + "version": "8.6.7", + "dev": false, + "root_package": "", + "link_packages": {}, + "deps": {}, + "transitive_closure": {}, + "lifecycle_build_target": false, + "lifecycle_hooks_env": [], + "lifecycle_hooks_execution_requirements": [ + "no-sandbox" + ], + "lifecycle_hooks_use_default_shell_env": false, + "bins": {}, + "package_visibility": [ + "//visibility:public" + ], + "replace_package": "" + } + }, + "pnpm": { + "bzlFile": "@@aspect_rules_js~//npm/private:npm_import.bzl", + "ruleClassName": "npm_import_rule", + "attributes": { + "package": "pnpm", + "version": "8.6.7", + "root_package": "", + "link_workspace": "", + "link_packages": {}, + "integrity": "sha512-vRIWpD/L4phf9Bk2o/O2TDR8fFoJnpYrp2TKqTIZF/qZ2/rgL3qKXzHofHgbXsinwMoSEigz28sqk3pQ+yMEQQ==", + "url": "", + "commit": "", + "patch_args": [ + "-p0" + ], + "patches": [], + "custom_postinstall": "", + "npm_auth": "", + "npm_auth_basic": "", + "npm_auth_username": "", + "npm_auth_password": "", + "lifecycle_hooks": [], + "extra_build_content": "load(\"@aspect_rules_js//js:defs.bzl\", \"js_binary\")\njs_binary(name = \"pnpm\", data = glob([\"package/**\"]), entry_point = \"package/dist/pnpm.cjs\", visibility = [\"//visibility:public\"])", + "generate_bzl_library_targets": false, + "extract_full_archive": true, + "system_tar": "auto" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "aspect_bazel_lib~", + "bazel_skylib", + "bazel_skylib~" + ], + [ + "aspect_bazel_lib~", + "bazel_tools", + "bazel_tools" + ], + [ + "aspect_rules_js~", + "aspect_bazel_lib", + "aspect_bazel_lib~" + ], + [ + "aspect_rules_js~", + "bazel_features", + "bazel_features~" + ], + [ + "aspect_rules_js~", + "bazel_skylib", + "bazel_skylib~" + ], + [ + "aspect_rules_js~", + "bazel_tools", + "bazel_tools" + ], + [ + "bazel_features~", + "bazel_features_globals", + "bazel_features~~version_extension~bazel_features_globals" + ], + [ + "bazel_features~", + "bazel_features_version", + "bazel_features~~version_extension~bazel_features_version" + ] + ] + } + }, "@@buildifier_prebuilt~//:defs.bzl%buildifier_prebuilt_deps_extension": { "general": { "bzlTransitiveDigest": "CwF9AlxMc7iKPY827VJXue9FxJnZ4ZwRbHgFbyUxKmg=", @@ -763,6 +905,31 @@ "recordedRepoMappingEntries": [] } }, + "@@rules_buf~//buf:extensions.bzl%ext": { + "general": { + "bzlTransitiveDigest": "gmPmM7QT5Jez2VVFcwbbMf/QWSRag+nJ1elFJFFTcn0=", + "usagesDigest": "h/C6mQFlmGdKnhVtzeaMHQFgfJmI8JO3uDmuBWGy5PA=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "rules_buf_toolchains": { + "bzlFile": "@@rules_buf~//buf/internal:toolchain.bzl", + "ruleClassName": "buf_download_releases", + "attributes": { + "version": "v1.27.0" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "rules_buf~", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, "@@rules_jvm_external~//:extensions.bzl%maven": { "general": { "bzlTransitiveDigest": "U98JuBYMWVrcyiXT1L6KAYSAA0chnjRZZloIUmNmZ7M=", @@ -1998,33 +2165,261 @@ ] } }, + "@@rules_multitool~//multitool:extension.bzl%multitool": { + "general": { + "bzlTransitiveDigest": "AtvPzG/SAawYMKVVHcMoJq4EXkVPTIhS3AeNwENXp9E=", + "usagesDigest": "xpm0zsz+sXr13CzbsWBhwi1YpiExXt+c07aOusBw3JY=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "multitool.linux_x86_64": { + "bzlFile": "@@rules_multitool~//multitool/private:multitool.bzl", + "ruleClassName": "_env_specific_tools", + "attributes": { + "lockfiles": [ + "@@aspect_rules_lint~//format:multitool.lock.json", + "@@aspect_rules_lint~//lint:multitool.lock.json" + ], + "os": "linux", + "cpu": "x86_64" + } + }, + "multitool.linux_arm64": { + "bzlFile": "@@rules_multitool~//multitool/private:multitool.bzl", + "ruleClassName": "_env_specific_tools", + "attributes": { + "lockfiles": [ + "@@aspect_rules_lint~//format:multitool.lock.json", + "@@aspect_rules_lint~//lint:multitool.lock.json" + ], + "os": "linux", + "cpu": "arm64" + } + }, + "multitool.macos_x86_64": { + "bzlFile": "@@rules_multitool~//multitool/private:multitool.bzl", + "ruleClassName": "_env_specific_tools", + "attributes": { + "lockfiles": [ + "@@aspect_rules_lint~//format:multitool.lock.json", + "@@aspect_rules_lint~//lint:multitool.lock.json" + ], + "os": "macos", + "cpu": "x86_64" + } + }, + "multitool.macos_arm64": { + "bzlFile": "@@rules_multitool~//multitool/private:multitool.bzl", + "ruleClassName": "_env_specific_tools", + "attributes": { + "lockfiles": [ + "@@aspect_rules_lint~//format:multitool.lock.json", + "@@aspect_rules_lint~//lint:multitool.lock.json" + ], + "os": "macos", + "cpu": "arm64" + } + }, + "multitool": { + "bzlFile": "@@rules_multitool~//multitool/private:multitool.bzl", + "ruleClassName": "_multitool_hub", + "attributes": { + "lockfiles": [ + "@@aspect_rules_lint~//format:multitool.lock.json", + "@@aspect_rules_lint~//lint:multitool.lock.json" + ] + } + } + }, + "recordedRepoMappingEntries": [] + } + }, + "@@rules_nodejs~//nodejs:extensions.bzl%node": { + "general": { + "bzlTransitiveDigest": "rphcryfYrOY/P3emfTskC/GY5YuHcwMl2B2ncjaM8lY=", + "usagesDigest": "pu6QwBPGWdfz0YEk0b4Jvk/V+o1Kk7wk4LBQqA9WogU=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "nodejs_host": { + "bzlFile": "@@rules_nodejs~//nodejs/private:nodejs_repo_host_os_alias.bzl", + "ruleClassName": "nodejs_repo_host_os_alias", + "attributes": { + "user_node_repository_name": "nodejs" + } + }, + "nodejs_linux_s390x": { + "bzlFile": "@@rules_nodejs~//nodejs:repositories.bzl", + "ruleClassName": "_nodejs_repositories", + "attributes": { + "node_download_auth": {}, + "node_repositories": {}, + "node_urls": [ + "https://nodejs.org/dist/v{version}/{filename}" + ], + "node_version": "16.14.2", + "include_headers": false, + "platform": "linux_s390x" + } + }, + "nodejs_windows_amd64": { + "bzlFile": "@@rules_nodejs~//nodejs:repositories.bzl", + "ruleClassName": "_nodejs_repositories", + "attributes": { + "node_download_auth": {}, + "node_repositories": {}, + "node_urls": [ + "https://nodejs.org/dist/v{version}/{filename}" + ], + "node_version": "16.14.2", + "include_headers": false, + "platform": "windows_amd64" + } + }, + "nodejs_toolchains": { + "bzlFile": "@@rules_nodejs~//nodejs/private:nodejs_toolchains_repo.bzl", + "ruleClassName": "nodejs_toolchains_repo", + "attributes": { + "user_node_repository_name": "nodejs" + } + }, + "nodejs_linux_amd64": { + "bzlFile": "@@rules_nodejs~//nodejs:repositories.bzl", + "ruleClassName": "_nodejs_repositories", + "attributes": { + "node_download_auth": {}, + "node_repositories": {}, + "node_urls": [ + "https://nodejs.org/dist/v{version}/{filename}" + ], + "node_version": "16.14.2", + "include_headers": false, + "platform": "linux_amd64" + } + }, + "nodejs_linux_ppc64le": { + "bzlFile": "@@rules_nodejs~//nodejs:repositories.bzl", + "ruleClassName": "_nodejs_repositories", + "attributes": { + "node_download_auth": {}, + "node_repositories": {}, + "node_urls": [ + "https://nodejs.org/dist/v{version}/{filename}" + ], + "node_version": "16.14.2", + "include_headers": false, + "platform": "linux_ppc64le" + } + }, + "nodejs_darwin_amd64": { + "bzlFile": "@@rules_nodejs~//nodejs:repositories.bzl", + "ruleClassName": "_nodejs_repositories", + "attributes": { + "node_download_auth": {}, + "node_repositories": {}, + "node_urls": [ + "https://nodejs.org/dist/v{version}/{filename}" + ], + "node_version": "16.14.2", + "include_headers": false, + "platform": "darwin_amd64" + } + }, + "nodejs_linux_arm64": { + "bzlFile": "@@rules_nodejs~//nodejs:repositories.bzl", + "ruleClassName": "_nodejs_repositories", + "attributes": { + "node_download_auth": {}, + "node_repositories": {}, + "node_urls": [ + "https://nodejs.org/dist/v{version}/{filename}" + ], + "node_version": "16.14.2", + "include_headers": false, + "platform": "linux_arm64" + } + }, + "nodejs": { + "bzlFile": "@@rules_nodejs~//nodejs/private:nodejs_repo_host_os_alias.bzl", + "ruleClassName": "nodejs_repo_host_os_alias", + "attributes": { + "user_node_repository_name": "nodejs" + } + }, + "nodejs_darwin_arm64": { + "bzlFile": "@@rules_nodejs~//nodejs:repositories.bzl", + "ruleClassName": "_nodejs_repositories", + "attributes": { + "node_download_auth": {}, + "node_repositories": {}, + "node_urls": [ + "https://nodejs.org/dist/v{version}/{filename}" + ], + "node_version": "16.14.2", + "include_headers": false, + "platform": "darwin_arm64" + } + } + }, + "recordedRepoMappingEntries": [] + } + }, "@@rules_python~//python/extensions:python.bzl%python": { "general": { - "bzlTransitiveDigest": "h1WwMtMNhOmMzSsCyaGXLFVp6B/FYYYOnfCnBiq1gtg=", - "usagesDigest": "5C1/2n78LWxziEIWtqoZJ1kCnmcf27xhCjlpWffa1Ng=", + "bzlTransitiveDigest": "/yOJamf205SazTZcWeVppJIMp+ft3hLNKXSwoDADZNo=", + "usagesDigest": "ZE2I3XMaBI3a/ZeZaclrZU48gDCvEch5L5cq9Ek70e8=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, "generatedRepoSpecs": { + "python_3_11_s390x-unknown-linux-gnu": { + "bzlFile": "@@rules_python~//python:repositories.bzl", + "ruleClassName": "python_repository", + "attributes": { + "sha256": "f9f19823dba3209cedc4647b00f46ed0177242917db20fb7fb539970e384531c", + "patches": [], + "platform": "s390x-unknown-linux-gnu", + "python_version": "3.11.6", + "release_filename": "20231002/cpython-3.11.6+20231002-s390x-unknown-linux-gnu-install_only.tar.gz", + "urls": [ + "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-s390x-unknown-linux-gnu-install_only.tar.gz" + ], + "distutils_content": "", + "strip_prefix": "python", + "coverage_tool": "", + "ignore_root_user_error": false + } + }, "python_3_11": { "bzlFile": "@@rules_python~//python/private:toolchains_repo.bzl", "ruleClassName": "toolchain_aliases", "attributes": { - "python_version": "3.11.1", - "user_repository_name": "python_3_11" + "python_version": "3.11.6", + "user_repository_name": "python_3_11", + "platforms": [ + "aarch64-apple-darwin", + "aarch64-unknown-linux-gnu", + "ppc64le-unknown-linux-gnu", + "s390x-unknown-linux-gnu", + "x86_64-apple-darwin", + "x86_64-pc-windows-msvc", + "x86_64-unknown-linux-gnu" + ] } }, "python_3_11_aarch64-unknown-linux-gnu": { "bzlFile": "@@rules_python~//python:repositories.bzl", "ruleClassName": "python_repository", "attributes": { - "sha256": "debf15783bdcb5530504f533d33fda75a7b905cec5361ae8f33da5ba6599f8b4", + "sha256": "3e26a672df17708c4dc928475a5974c3fb3a34a9b45c65fb4bd1e50504cc84ec", "patches": [], "platform": "aarch64-unknown-linux-gnu", - "python_version": "3.11.1", - "release_filename": "20230116/cpython-3.11.1+20230116-aarch64-unknown-linux-gnu-install_only.tar.gz", + "python_version": "3.11.6", + "release_filename": "20231002/cpython-3.11.6+20231002-aarch64-unknown-linux-gnu-install_only.tar.gz", "urls": [ - "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-aarch64-unknown-linux-gnu-install_only.tar.gz" + "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-aarch64-unknown-linux-gnu-install_only.tar.gz" ], "distutils_content": "", "strip_prefix": "python", @@ -2036,13 +2431,31 @@ "bzlFile": "@@rules_python~//python:repositories.bzl", "ruleClassName": "python_repository", "attributes": { - "sha256": "4918cdf1cab742a90f85318f88b8122aeaa2d04705803c7b6e78e81a3dd40f80", + "sha256": "916c35125b5d8323a21526d7a9154ca626453f63d0878e95b9f613a95006c990", "patches": [], "platform": "aarch64-apple-darwin", - "python_version": "3.11.1", - "release_filename": "20230116/cpython-3.11.1+20230116-aarch64-apple-darwin-install_only.tar.gz", + "python_version": "3.11.6", + "release_filename": "20231002/cpython-3.11.6+20231002-aarch64-apple-darwin-install_only.tar.gz", + "urls": [ + "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-aarch64-apple-darwin-install_only.tar.gz" + ], + "distutils_content": "", + "strip_prefix": "python", + "coverage_tool": "", + "ignore_root_user_error": false + } + }, + "python_3_11_ppc64le-unknown-linux-gnu": { + "bzlFile": "@@rules_python~//python:repositories.bzl", + "ruleClassName": "python_repository", + "attributes": { + "sha256": "7937035f690a624dba4d014ffd20c342e843dd46f89b0b0a1e5726b85deb8eaf", + "patches": [], + "platform": "ppc64le-unknown-linux-gnu", + "python_version": "3.11.6", + "release_filename": "20231002/cpython-3.11.6+20231002-ppc64le-unknown-linux-gnu-install_only.tar.gz", "urls": [ - "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-aarch64-apple-darwin-install_only.tar.gz" + "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-ppc64le-unknown-linux-gnu-install_only.tar.gz" ], "distutils_content": "", "strip_prefix": "python", @@ -2054,13 +2467,13 @@ "bzlFile": "@@rules_python~//python:repositories.bzl", "ruleClassName": "python_repository", "attributes": { - "sha256": "20a4203d069dc9b710f70b09e7da2ce6f473d6b1110f9535fb6f4c469ed54733", + "sha256": "178cb1716c2abc25cb56ae915096c1a083e60abeba57af001996e8bc6ce1a371", "patches": [], "platform": "x86_64-apple-darwin", - "python_version": "3.11.1", - "release_filename": "20230116/cpython-3.11.1+20230116-x86_64-apple-darwin-install_only.tar.gz", + "python_version": "3.11.6", + "release_filename": "20231002/cpython-3.11.6+20231002-x86_64-apple-darwin-install_only.tar.gz", "urls": [ - "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-x86_64-apple-darwin-install_only.tar.gz" + "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-x86_64-apple-darwin-install_only.tar.gz" ], "distutils_content": "", "strip_prefix": "python", @@ -2069,7 +2482,7 @@ } }, "pythons_hub": { - "bzlFile": "@@rules_python~//python/extensions/private:pythons_hub.bzl", + "bzlFile": "@@rules_python~//python/private/bzlmod:pythons_hub.bzl", "ruleClassName": "hub_repo", "attributes": { "default_python_version": "3.11", @@ -2100,13 +2513,13 @@ "bzlFile": "@@rules_python~//python:repositories.bzl", "ruleClassName": "python_repository", "attributes": { - "sha256": "edc08979cb0666a597466176511529c049a6f0bba8adf70df441708f766de5bf", + "sha256": "3933545e6d41462dd6a47e44133ea40995bc6efeed8c2e4cbdf1a699303e95ea", "patches": [], "platform": "x86_64-pc-windows-msvc", - "python_version": "3.11.1", - "release_filename": "20230116/cpython-3.11.1+20230116-x86_64-pc-windows-msvc-shared-install_only.tar.gz", + "python_version": "3.11.6", + "release_filename": "20231002/cpython-3.11.6+20231002-x86_64-pc-windows-msvc-shared-install_only.tar.gz", "urls": [ - "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-x86_64-pc-windows-msvc-shared-install_only.tar.gz" + "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-x86_64-pc-windows-msvc-shared-install_only.tar.gz" ], "distutils_content": "", "strip_prefix": "python", @@ -2118,13 +2531,13 @@ "bzlFile": "@@rules_python~//python:repositories.bzl", "ruleClassName": "python_repository", "attributes": { - "sha256": "02a551fefab3750effd0e156c25446547c238688a32fabde2995c941c03a6423", + "sha256": "ee37a7eae6e80148c7e3abc56e48a397c1664f044920463ad0df0fc706eacea8", "patches": [], "platform": "x86_64-unknown-linux-gnu", - "python_version": "3.11.1", - "release_filename": "20230116/cpython-3.11.1+20230116-x86_64-unknown-linux-gnu-install_only.tar.gz", + "python_version": "3.11.6", + "release_filename": "20231002/cpython-3.11.6+20231002-x86_64-unknown-linux-gnu-install_only.tar.gz", "urls": [ - "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-x86_64-unknown-linux-gnu-install_only.tar.gz" + "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.11.6+20231002-x86_64-unknown-linux-gnu-install_only.tar.gz" ], "distutils_content": "", "strip_prefix": "python", @@ -2142,10 +2555,10 @@ ] } }, - "@@rules_python~//python/extensions/private:internal_deps.bzl%internal_deps": { + "@@rules_python~//python/private/bzlmod:internal_deps.bzl%internal_deps": { "general": { - "bzlTransitiveDigest": "KLeVzENpheKVQjdcbG2+BQ9j9QV8qFg7mxtaX0WKlPE=", - "usagesDigest": "j4M+Xz+hw2J2ILTfbhRK9hnPKE3jZ5u1Y1W22sY/Y4o=", + "bzlTransitiveDigest": "BBwtJlGgWcMoGDUgN/9oMYPkMEig0gnViMArGuYOgvw=", + "usagesDigest": "0KtJR32xTfnnwt2hOSAdBgKoWuOMjlmHn+Po/xBs5Aw=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -2154,8 +2567,8 @@ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://files.pythonhosted.org/packages/bd/7c/d38a0b30ce22fc26ed7dbc087c6d00851fb3395e9d0dac40bec1f905030c/wheel-0.38.4-py3-none-any.whl", - "sha256": "b60533f3f5d530e971d6737ca6d58681ee434818fab630c83a734bb10c083ce8", + "url": "https://files.pythonhosted.org/packages/b8/8b/31273bf66016be6ad22bb7345c37ff350276cfd46e389a0c2ac5da9d9073/wheel-0.41.2-py3-none-any.whl", + "sha256": "75909db2664838d015e3d9139004ee16711748a52c8f336b52882266540215d8", "type": "zip", "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude in /python/pip_install/tools/bazel.py\n # to avoid non-determinism following pip install's behavior.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/* *\",\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" } @@ -2164,8 +2577,8 @@ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://files.pythonhosted.org/packages/76/0a/b6c5f311e32aeb3b406e03c079ade51e905ea630fc19d1262a46249c1c86/click-8.0.1-py3-none-any.whl", - "sha256": "fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6", + "url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", + "sha256": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", "type": "zip", "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude in /python/pip_install/tools/bazel.py\n # to avoid non-determinism following pip install's behavior.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/* *\",\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" } @@ -2174,8 +2587,18 @@ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://files.pythonhosted.org/packages/d7/31/74dcb59a601b95fce3b0334e8fc9db758f78e43075f22aeb3677dfb19f4c/importlib_metadata-1.4.0-py2.py3-none-any.whl", - "sha256": "bdd9b7c397c273bcc9a11d6629a38487cd07154fa255a467bf704cd2c258e359", + "url": "https://files.pythonhosted.org/packages/cc/37/db7ba97e676af155f5fcb1a35466f446eadc9104e25b83366e8088c9c926/importlib_metadata-6.8.0-py3-none-any.whl", + "sha256": "3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude in /python/pip_install/tools/bazel.py\n # to avoid non-determinism following pip install's behavior.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/* *\",\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pyproject_hooks": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/d5/ea/9ae603de7fbb3df820b23a70f6aff92bf8c7770043254ad8d2dc9d6bcba4/pyproject_hooks-1.0.0-py3-none-any.whl", + "sha256": "283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8", "type": "zip", "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude in /python/pip_install/tools/bazel.py\n # to avoid non-determinism following pip install's behavior.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/* *\",\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" } @@ -2194,8 +2617,8 @@ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://files.pythonhosted.org/packages/8f/7b/42582927d281d7cb035609cd3a543ffac89b74f3f4ee8e1c50914bcb57eb/packaging-22.0-py3-none-any.whl", - "sha256": "957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3", + "url": "https://files.pythonhosted.org/packages/ab/c3/57f0601a2d4fe15de7a553c00adbc901425661bf048f2a22dfc500caf121/packaging-23.1-py3-none-any.whl", + "sha256": "994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61", "type": "zip", "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude in /python/pip_install/tools/bazel.py\n # to avoid non-determinism following pip install's behavior.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/* *\",\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" } @@ -2204,8 +2627,8 @@ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://files.pythonhosted.org/packages/5e/e8/f6d7d1847c7351048da870417724ace5c4506e816b38db02f4d7c675c189/pip_tools-6.12.1-py3-none-any.whl", - "sha256": "f0c0c0ec57b58250afce458e2e6058b1f30a4263db895b7d72fd6311bf1dc6f7", + "url": "https://files.pythonhosted.org/packages/e8/df/47e6267c6b5cdae867adbdd84b437393e6202ce4322de0a5e0b92960e1d6/pip_tools-7.3.0-py3-none-any.whl", + "sha256": "8717693288720a8c6ebd07149c93ab0be1fced0b5191df9e9decd3263e20d85e", "type": "zip", "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude in /python/pip_install/tools/bazel.py\n # to avoid non-determinism following pip install's behavior.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/* *\",\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" } @@ -2214,8 +2637,8 @@ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://files.pythonhosted.org/packages/7c/5b/3d92b9f0f7ca1645cba48c080b54fe7d8b1033a4e5720091d1631c4266db/setuptools-60.10.0-py3-none-any.whl", - "sha256": "782ef48d58982ddb49920c11a0c5c9c0b02e7d7d1c2ad0aa44e1a1e133051c96", + "url": "https://files.pythonhosted.org/packages/4f/ab/0bcfebdfc3bfa8554b2b2c97a555569c4c1ebc74ea288741ea8326c51906/setuptools-68.1.2-py3-none-any.whl", + "sha256": "3d8083eed2d13afc9426f227b24fd1659489ec107c0e86cec2ffdde5c92e790b", "type": "zip", "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude in /python/pip_install/tools/bazel.py\n # to avoid non-determinism following pip install's behavior.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/* *\",\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" } @@ -2224,8 +2647,8 @@ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://files.pythonhosted.org/packages/f4/50/cc72c5bcd48f6e98219fc4a88a5227e9e28b81637a99c49feba1d51f4d50/zipp-1.0.0-py2.py3-none-any.whl", - "sha256": "8dda78f06bd1674bd8720df8a50bb47b6e1233c503a4eed8e7810686bde37656", + "url": "https://files.pythonhosted.org/packages/8c/08/d3006317aefe25ea79d3b76c9650afabaf6d63d1c8443b236e7405447503/zipp-3.16.2-py3-none-any.whl", + "sha256": "679e51dd4403591b2d6838a48de3d283f3d188412a9782faadf845f298736ba0", "type": "zip", "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude in /python/pip_install/tools/bazel.py\n # to avoid non-determinism following pip install's behavior.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/* *\",\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" } @@ -2244,18 +2667,23 @@ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://files.pythonhosted.org/packages/03/97/f58c723ff036a8d8b4d3115377c0a37ed05c1f68dd9a0d66dab5e82c5c1c/build-0.9.0-py3-none-any.whl", - "sha256": "38a7a2b7a0bdc61a42a0a67509d88c71ecfc37b393baba770fae34e20929ff69", + "url": "https://files.pythonhosted.org/packages/58/91/17b00d5fac63d3dca605f1b8269ba3c65e98059e1fd99d00283e42a454f0/build-0.10.0-py3-none-any.whl", + "sha256": "af266720050a66c893a6096a2f410989eeac74ff9a68ba194b3f6473e8e26171", "type": "zip", "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude in /python/pip_install/tools/bazel.py\n # to avoid non-determinism following pip install's behavior.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/* *\",\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" } }, + "rules_python_internal": { + "bzlFile": "@@rules_python~//python/private:internal_config_repo.bzl", + "ruleClassName": "internal_config_repo", + "attributes": {} + }, "pypi__pip": { "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://files.pythonhosted.org/packages/09/bd/2410905c76ee14c62baf69e3f4aa780226c1bbfc9485731ad018e35b0cb5/pip-22.3.1-py3-none-any.whl", - "sha256": "908c78e6bc29b676ede1c4d57981d490cb892eb45cd8c214ab6298125119e077", + "url": "https://files.pythonhosted.org/packages/50/c2/e06851e8cc28dcad7c155f4753da8833ac06a5c704c109313b8d5a62968a/pip-23.2.1-py3-none-any.whl", + "sha256": "7ccf472345f20d35bdc9d1841ff5f313260c2c33fe417f48c30ac46cccabf5be", "type": "zip", "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude in /python/pip_install/tools/bazel.py\n # to avoid non-determinism following pip install's behavior.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/* *\",\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" } @@ -2274,8 +2702,8 @@ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", "ruleClassName": "http_archive", "attributes": { - "url": "https://files.pythonhosted.org/packages/bd/3f/c4b3dbd315e248f84c388bd4a72b131a29f123ecacc37ffb2b3834546e42/more_itertools-8.13.0-py3-none-any.whl", - "sha256": "c5122bffc5f104d37c1626b8615b511f3427aa5389b94d61e5ef8236bfbc3ddb", + "url": "https://files.pythonhosted.org/packages/5a/cb/6dce742ea14e47d6f565589e859ad225f2a5de576d7696e0623b784e226b/more_itertools-10.1.0-py3-none-any.whl", + "sha256": "64e0735fcfdc6f3464ea133afe8ea4483b1c5fe3a3d69852e6503b43a0b222e6", "type": "zip", "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude in /python/pip_install/tools/bazel.py\n # to avoid non-determinism following pip install's behavior.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/* *\",\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" } @@ -2292,23 +2720,95 @@ } }, "recordedRepoMappingEntries": [ - [ - "rules_python~", - "bazel_skylib", - "bazel_skylib~" - ], [ "rules_python~", "bazel_tools", "bazel_tools" - ], - [ - "rules_python~", - "rules_python", - "rules_python~" ] ] } + }, + "@@toolchains_protoc~//protoc:extensions.bzl%protoc": { + "general": { + "bzlTransitiveDigest": "HnmcD4ia7/1ZuQnymt4OGHXrW62MmIgwCtHByGQ7LQs=", + "usagesDigest": "OdpHUCO7Z6eHXrRPxbBX7o1+hQ8T8fCv2SeY/cbjo88=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "toolchains_protoc_hub.linux_aarch_64": { + "bzlFile": "@@toolchains_protoc~//protoc/private:prebuilt_protoc_toolchain.bzl", + "ruleClassName": "prebuilt_protoc_repo", + "attributes": { + "platform": "linux-aarch_64", + "version": "v25.3" + } + }, + "toolchains_protoc_hub": { + "bzlFile": "@@toolchains_protoc~//protoc/private:protoc_toolchains.bzl", + "ruleClassName": "protoc_toolchains_repo", + "attributes": { + "user_repository_name": "toolchains_protoc_hub" + } + }, + "toolchains_protoc_hub.osx_x86_64": { + "bzlFile": "@@toolchains_protoc~//protoc/private:prebuilt_protoc_toolchain.bzl", + "ruleClassName": "prebuilt_protoc_repo", + "attributes": { + "platform": "osx-x86_64", + "version": "v25.3" + } + }, + "toolchains_protoc_hub.linux_s390_64": { + "bzlFile": "@@toolchains_protoc~//protoc/private:prebuilt_protoc_toolchain.bzl", + "ruleClassName": "prebuilt_protoc_repo", + "attributes": { + "platform": "linux-s390_64", + "version": "v25.3" + } + }, + "toolchains_protoc_hub.osx_aarch_64": { + "bzlFile": "@@toolchains_protoc~//protoc/private:prebuilt_protoc_toolchain.bzl", + "ruleClassName": "prebuilt_protoc_repo", + "attributes": { + "platform": "osx-aarch_64", + "version": "v25.3" + } + }, + "com_google_protobuf": { + "bzlFile": "@@toolchains_protoc~//protoc:toolchain.bzl", + "ruleClassName": "_google_protobuf_alias_repo", + "attributes": { + "alias_to": "toolchains_protoc_hub.osx_aarch_64" + } + }, + "toolchains_protoc_hub.win64": { + "bzlFile": "@@toolchains_protoc~//protoc/private:prebuilt_protoc_toolchain.bzl", + "ruleClassName": "prebuilt_protoc_repo", + "attributes": { + "platform": "win64", + "version": "v25.3" + } + }, + "toolchains_protoc_hub.linux_x86_64": { + "bzlFile": "@@toolchains_protoc~//protoc/private:prebuilt_protoc_toolchain.bzl", + "ruleClassName": "prebuilt_protoc_repo", + "attributes": { + "platform": "linux-x86_64", + "version": "v25.3" + } + }, + "toolchains_protoc_hub.linux_ppcle_64": { + "bzlFile": "@@toolchains_protoc~//protoc/private:prebuilt_protoc_toolchain.bzl", + "ruleClassName": "prebuilt_protoc_repo", + "attributes": { + "platform": "linux-ppcle_64", + "version": "v25.3" + } + } + }, + "recordedRepoMappingEntries": [] + } } } } diff --git a/README.md b/README.md index f949b00..78c2d24 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,11 @@ DEPEND ON FOR PRODUCTION USE-CASES. A Bazel rule-set for extending, creating and publishing OCI artifacts, including image manifests, image indexes (multi-arch images) and custom artifacts ([ORAS](https://github.com/oras-project)), with a focus on: -* **Speed**, only pulling artifacts that are needed at build-time (no more long image pull times) -* **Extensibility**, creating custom artifacts to leverage standard OCI distribution + +- **Speed**, only pulling artifacts that are needed at build-time (no more long image pull times) +- **Extensibility**, creating custom artifacts to leverage standard OCI distribution APIs -* **Multi-arch images**, compiling and building multi-arch images with a single Bazel invocation +- **Multi-arch images**, compiling and building multi-arch images with a single Bazel invocation In addition to Bazel rules, we offer many helpers for interacting with OCI artifacts under the `go/pkg` directory and a CLI tool for creating new OCI @@ -67,27 +68,29 @@ in the image, but this trade-off is worth the speed of not downloaded many GBs o base images. ### Roadmap -* [ ] Flesh out code for non-shallow pulls and cases where the layers are coming + +- [ ] Flesh out code for non-shallow pulls and cases where the layers are coming from a different registry. -* [ ] Full Starlark DSL for creating custom artifacts, it's currently looks - a bit wonky -* [ ] Support for the ORAS Artifact Spec -* [ ] Support for custom artifact crawlers to pull artifacts that have children -not represented by the OCI Image Spec. Ex pulling a full CNAB bundle and all -dependencies. -* [ ] Benchmark against `rules_docker` and raw `docker build`. +- [ ] Full Starlark DSL for creating custom artifacts, it's currently looks + a bit wonky +- [ ] Support for the ORAS Artifact Spec +- [ ] Support for custom artifact crawlers to pull artifacts that have children + not represented by the OCI Image Spec. Ex pulling a full CNAB bundle and all + dependencies. +- [ ] Benchmark against `rules_docker` and raw `docker build`. ### FAQ **Comparison to `rules_docker`** -* `rules_docker` is built on `go-containerregistry`, which is focused on Docker, + +- `rules_docker` is built on `go-containerregistry`, which is focused on Docker, `rules_oci` uses `containerd` whose implementation complies more to the OCI spec and more easily supports custom artifacts -* `rules_oci` focused on supporting the OCI Image spec, rather than the Docker +- `rules_oci` focused on supporting the OCI Image spec, rather than the Docker spec -* `rules_oci` doesn't have language specific rules, instead a higher-level +- `rules_oci` doesn't have language specific rules, instead a higher-level package can build on `rules_oci` to create rules like `go_image` -* `rules_docker` doesn't have support for multi-arch images [#1599](https://github.com/bazelbuild/rules_docker/issues/1599) +- `rules_docker` doesn't have support for multi-arch images [#1599](https://github.com/bazelbuild/rules_docker/issues/1599) ### Developing diff --git a/bin/BUILD.bazel b/bin/BUILD.bazel index 076e882..3e3abb4 100755 --- a/bin/BUILD.bazel +++ b/bin/BUILD.bazel @@ -1,14 +1,16 @@ +load("@rules_pkg//pkg:mappings.bzl", "pkg_files") load("//oci:toolchain.bzl", "create_compiled_oci_toolchains") exports_files(glob(["*"])) -filegroup( - name = "bin-files", +create_compiled_oci_toolchains(name = "oci_toolchain") + +pkg_files( + name = "files", srcs = glob([ "*.bzl", "*.bazel", ]), - visibility = ["//visibility:public"], + prefix = "bin", + visibility = ["//release:__subpackages__"], ) - -create_compiled_oci_toolchains(name = "oci_toolchain") diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel index b6ed035..92e4be1 100644 --- a/docs/BUILD.bazel +++ b/docs/BUILD.bazel @@ -1,12 +1,18 @@ load("@aspect_bazel_lib//lib:docs.bzl", "stardoc_with_diff_test", "update_docs") -exports_files(["docs.md"]) - -# Sourced from https://github.com/bazelbuild/rules_go/pull/3000 -# For each doc file, generate MD from bzl_library, then perform diff test stardoc_with_diff_test( - name = "docs", + name = "defs", bzl_library_target = "//oci:defs", ) +stardoc_with_diff_test( + name = "providers", + bzl_library_target = "//oci:providers", +) + +stardoc_with_diff_test( + name = "repositories", + bzl_library_target = "//oci:repositories", +) + update_docs() diff --git a/docs/docs.md b/docs/defs.md similarity index 76% rename from docs/docs.md rename to docs/defs.md index 4678429..899e83c 100644 --- a/docs/docs.md +++ b/docs/defs.md @@ -1,6 +1,6 @@ -public API +public rules @@ -50,28 +50,6 @@ oci_image_index(name, manifests | - | List of labels | optional | `[]` | - - -## oci_image_layer - -
-oci_image_layer(name, directory, file_map, files, symlinks)
-
- -Create a tarball and an OCI descriptor for it - -**ATTRIBUTES** - - -| Name | Description | Type | Mandatory | Default | -| :------------- | :------------- | :------------- | :------------- | :------------- | -| name | A unique name for this target. | Name | required | | -| directory | Directory in the tarball to place the `files` | String | optional | `""` | -| file_map | Dictionary of file -> file location in tarball | Dictionary: Label -> String | optional | `{}` | -| files | List of files to include under `directory` | List of labels | optional | `[]` | -| symlinks | Dictionary of symlink -> target entries to place in the tarball | Dictionary: String -> String | optional | `{}` | - - ## oci_image_layout @@ -122,30 +100,26 @@ Pushes a manifest or a list of manifests to an OCI registry. | x_meta_headers | (optional) A list of key/values to to be sent to the registry as headers with an X-Meta- prefix. | Dictionary: String -> String | optional | `{}` | - + -## oci_pull +## oci_image_layer
-oci_pull(name, debug, digest, registry, repo_mapping, repository, shallow)
+oci_image_layer(name, directory, file_map, files, symlinks, kwargs)
 
-**ATTRIBUTES** +oci_image_layer +**PARAMETERS** -| Name | Description | Type | Mandatory | Default | -| :------------- | :------------- | :------------- | :------------- | :------------- | -| name | A unique name for this repository. | Name | required | | -| debug | Enable ocitool debug output | Boolean | optional | `False` | -| digest | - | String | required | | -| registry | - | String | required | | -| repo_mapping | In `WORKSPACE` context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.

For example, an entry `"@foo": "@bar"` declares that, for any time this repository depends on `@foo` (such as a dependency on `@foo//some:target`, it should actually resolve that dependency within globally-declared `@bar` (`@bar//some:target`).

This attribute is _not_ supported in `MODULE.bazel` context (when invoking a repository rule inside a module extension's implementation function). | Dictionary: String -> String | optional | | -| repository | - | String | required | | -| shallow | - | Boolean | optional | `True` | - -**ENVIRONMENT VARIABLES** - -This repository rule depends on the following environment variables: -* `OCI_CACHE_DIR` + +| Name | Description | Default Value | +| :------------- | :------------- | :------------- | +| name | A unique name for this rule | none | +| directory | Directory in the tarball to place the `files` | `"/"` | +| file_map | Dictionary of file -> file location in tarball | `None` | +| files | List of files to include under `directory` | `None` | +| symlinks | Dictionary of symlink -> target entries to place in the tarball | `None` | +| kwargs | Additional arguments to pass to the rule, e.g. `tags` or `visibility` | none | diff --git a/docs/providers.md b/docs/providers.md new file mode 100644 index 0000000..5ac632e --- /dev/null +++ b/docs/providers.md @@ -0,0 +1,126 @@ + + +public providers + + + +## OCIDescriptor + +
+OCIDescriptor(file, descriptor_file, media_type, size, urls, digest, annotations)
+
+ + + +**FIELDS** + + +| Name | Description | +| :------------- | :------------- | +| file | A file object of the content this descriptor describes | +| descriptor_file | A file object with the information in this provider | +| media_type | The MIME media type of the file | +| size | The size in bytes of the file | +| urls | Additional URLs where you can find the content of file | +| digest | A digest, including the algorithm, of the file | +| annotations | String map of aribtrary metadata | + + + + +## OCIImageIndexManifest + +
+OCIImageIndexManifest(manifests, annotations)
+
+ + + +**FIELDS** + + +| Name | Description | +| :------------- | :------------- | +| manifests | List of descriptors | +| annotations | String map of arbitrary metadata | + + + + +## OCIImageManifest + +
+OCIImageManifest(config, layers, annotations)
+
+ + + +**FIELDS** + + +| Name | Description | +| :------------- | :------------- | +| config | Descriptor that points to a configuration object | +| layers | List of descriptors | +| annotations | String map of arbitrary metadata | + + + + +## OCILayout + +
+OCILayout(blob_index, files)
+
+ +OCI Layout + +**FIELDS** + + +| Name | Description | +| :------------- | :------------- | +| blob_index | - | +| files | - | + + + + +## OCIReferenceInfo + +
+OCIReferenceInfo(registry, repository, tag, tag_file, digest)
+
+ +Refers to any artifact represented by an OCI-like reference URI + +**FIELDS** + + +| Name | Description | +| :------------- | :------------- | +| registry | the URI where the artifact is stored | +| repository | a namespace for an artifact | +| tag | a organizational reference within a repository | +| tag_file | a file containing the organizational reference within a repository | +| digest | a file containing the digest of the artifact | + + + + +## OCISDK + +
+OCISDK(ocitool)
+
+ +The OCI SDK + +**FIELDS** + + +| Name | Description | +| :------------- | :------------- | +| ocitool | - | + + diff --git a/docs/repositories.md b/docs/repositories.md new file mode 100644 index 0000000..92a0463 --- /dev/null +++ b/docs/repositories.md @@ -0,0 +1,31 @@ + + +public repository rules + + + +## oci_pull + +
+oci_pull(name, debug, digest, registry, repo_mapping, repository, shallow)
+
+ +**ATTRIBUTES** + + +| Name | Description | Type | Mandatory | Default | +| :------------- | :------------- | :------------- | :------------- | :------------- | +| name | A unique name for this repository. | Name | required | | +| debug | Enable ocitool debug output | Boolean | optional | `False` | +| digest | - | String | required | | +| registry | - | String | required | | +| repo_mapping | In `WORKSPACE` context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.

For example, an entry `"@foo": "@bar"` declares that, for any time this repository depends on `@foo` (such as a dependency on `@foo//some:target`, it should actually resolve that dependency within globally-declared `@bar` (`@bar//some:target`).

This attribute is _not_ supported in `MODULE.bazel` context (when invoking a repository rule inside a module extension's implementation function). | Dictionary: String -> String | optional | | +| repository | - | String | required | | +| shallow | - | Boolean | optional | `True` | + +**ENVIRONMENT VARIABLES** + +This repository rule depends on the following environment variables: +* `OCI_CACHE_DIR` + + diff --git a/tests/go-multiarch-image/BUILD.bazel b/examples/go-multiarch-image/BUILD.bazel similarity index 72% rename from tests/go-multiarch-image/BUILD.bazel rename to examples/go-multiarch-image/BUILD.bazel index d961309..5cb0f9b 100644 --- a/tests/go-multiarch-image/BUILD.bazel +++ b/examples/go-multiarch-image/BUILD.bazel @@ -1,4 +1,3 @@ -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("@com_github_datadog_rules_oci//oci:defs.bzl", "oci_push") load("@rules_go//go:def.bzl", "go_binary", "go_library") load(":go.bzl", "go_multiarch_image") @@ -22,7 +21,7 @@ go_multiarch_image( "amd64", "arm64", ], - base = "@ubuntu_focal//image", + base = "@ubuntu_noble//image", embed = [":go_default_library"], visibility = ["//visibility:public"], ) @@ -33,13 +32,3 @@ oci_push( registry = "ghcr.io", repository = "datadog/rules_oci/hello-world", ) - -bzl_library( - name = "go", - srcs = ["go.bzl"], - visibility = ["//visibility:public"], - deps = [ - "@com_github_datadog_rules_oci//oci:defs", - "@rules_go//go:def", - ], -) diff --git a/tests/go-multiarch-image/go.bzl b/examples/go-multiarch-image/go.bzl similarity index 100% rename from tests/go-multiarch-image/go.bzl rename to examples/go-multiarch-image/go.bzl diff --git a/tests/go-multiarch-image/main.go b/examples/go-multiarch-image/main.go similarity index 100% rename from tests/go-multiarch-image/main.go rename to examples/go-multiarch-image/main.go diff --git a/go.mod b/go.mod index a3e9afa..05cf73e 100644 --- a/go.mod +++ b/go.mod @@ -3,41 +3,29 @@ module github.com/DataDog/rules_oci go 1.22.5 require ( - github.com/Microsoft/go-winio v0.6.2 - github.com/Microsoft/hcsshim v0.12.3 github.com/bazelbuild/bazel-gazelle v0.38.0 github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb github.com/containerd/containerd v1.7.20 - github.com/containerd/containerd/api v1.7.19 - github.com/containerd/continuity v0.4.2 - github.com/containerd/errdefs v0.1.0 - github.com/containerd/fifo v1.1.0 github.com/containerd/log v0.1.0 - github.com/containerd/platforms v0.2.1 - github.com/containerd/typeurl/v2 v2.1.1 github.com/docker/docker-credential-helpers v0.8.1 - github.com/klauspost/compress v1.17.8 github.com/mitchellh/go-homedir v1.1.0 - github.com/moby/sys/sequential v0.5.0 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0 - github.com/opencontainers/runtime-spec v1.1.0 github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 github.com/urfave/cli/v2 v2.27.2 golang.org/x/sync v0.7.0 - golang.org/x/sys v0.22.0 - google.golang.org/grpc v1.63.2 oras.land/oras-go v1.2.6 ) require ( github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect + github.com/Microsoft/hcsshim v0.12.3 // indirect github.com/bazelbuild/buildtools v0.0.0-20240422193413-1429e15ae755 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/containerd/cgroups/v3 v3.0.2 // indirect - github.com/containerd/ttrpc v1.2.5 // indirect + github.com/containerd/errdefs v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect @@ -45,19 +33,14 @@ require ( github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/docker v27.1.1+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect - github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect github.com/docker/go-metrics v0.0.1 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/google/go-cmp v0.6.0 // indirect - github.com/google/uuid v1.6.0 // indirect github.com/gorilla/mux v1.8.1 // indirect + github.com/klauspost/compress v1.17.8 // indirect github.com/kr/text v0.2.0 // indirect github.com/moby/locker v1.0.1 // indirect - github.com/moby/sys/mountinfo v0.6.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.1 // indirect @@ -66,15 +49,13 @@ require ( github.com/prometheus/procfs v0.14.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect - go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect go.opentelemetry.io/otel v1.26.0 // indirect go.opentelemetry.io/otel/metric v1.26.0 // indirect go.opentelemetry.io/otel/trace v1.26.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + golang.org/x/sys v0.22.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434 // indirect + google.golang.org/grpc v1.63.2 // indirect google.golang.org/protobuf v1.34.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 1ff55f7..8786bba 100644 --- a/go.sum +++ b/go.sum @@ -29,27 +29,19 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0= github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE= github.com/containerd/containerd v1.7.20 h1:Sl6jQYk3TRavaU83h66QMbI2Nqg9Jm6qzwX57Vsn1SQ= github.com/containerd/containerd v1.7.20/go.mod h1:52GsS5CwquuqPuLncsXwG0t2CiUce+KsNHJZQJvAgR0= -github.com/containerd/containerd/api v1.7.19 h1:VWbJL+8Ap4Ju2mx9c9qS1uFSB1OVYr5JJrW2yT5vFoA= -github.com/containerd/containerd/api v1.7.19/go.mod h1:fwGavl3LNwAV5ilJ0sbrABL44AQxmNjDRcwheXDb6Ig= github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM= github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0= -github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= -github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= -github.com/containerd/ttrpc v1.2.5 h1:IFckT1EFQoFBMG4c3sMdT8EP3/aKfumK1msY+Ze4oLU= -github.com/containerd/ttrpc v1.2.5/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= -github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= -github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= @@ -80,9 +72,7 @@ github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQ github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= @@ -96,10 +86,7 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -113,19 +100,15 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= @@ -143,8 +126,6 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -160,8 +141,6 @@ github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= -github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= -github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -171,8 +150,6 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= -github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -218,22 +195,15 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/exporters/autoexport v0.46.1 h1:ysCfPZB9AjUlMa1UHYup3c9dAOCMQX/6sxSfPBUoxHw= @@ -271,27 +241,18 @@ go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v8 go.starlark.net v0.0.0-20210223155950-e043a3d3c984/go.mod h1:t3mmBBPzAVvK0L0n1drDmrQsJ8FoIx4INCqVMTr/Zo0= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -299,35 +260,24 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -336,16 +286,13 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= -google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434 h1:umK/Ey0QEzurTNlsV3R+MfxHAb78HCEX/IkuR+zH4WQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -357,8 +304,6 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= diff --git a/go/cmd/ocitool/createlayer_cmd.go b/go/cmd/ocitool/createlayer_cmd.go index b1b3922..acfaf6a 100644 --- a/go/cmd/ocitool/createlayer_cmd.go +++ b/go/cmd/ocitool/createlayer_cmd.go @@ -12,8 +12,8 @@ import ( "github.com/DataDog/rules_oci/go/internal/flagutil" "github.com/DataDog/rules_oci/go/internal/tarutil" - "github.com/DataDog/rules_oci/go/pkg/ociutil" "github.com/DataDog/rules_oci/go/pkg/layer" + "github.com/DataDog/rules_oci/go/pkg/ociutil" "github.com/opencontainers/go-digest" ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/urfave/cli/v2" diff --git a/go/pkg/deb2layer/deb_test.go b/go/pkg/deb2layer/deb_test.go index 5fa119c..2eb60c9 100644 --- a/go/pkg/deb2layer/deb_test.go +++ b/go/pkg/deb2layer/deb_test.go @@ -20,7 +20,7 @@ var ( // TestDebToLayer checks that the expected files are in the resulting layer // based on a deb file created by Bazel's rules_pkg func TestDebToLayer(t *testing.T) { - // XXX Fix generating deb package + // XXX Fix generating deb package f, err := os.Open("testdeb.deb") if err != nil { t.Fatalf("%v", err) diff --git a/go/pkg/ociutil/bazel.go b/go/pkg/ociutil/bazel.go index 66352a2..c97543d 100644 --- a/go/pkg/ociutil/bazel.go +++ b/go/pkg/ociutil/bazel.go @@ -26,23 +26,26 @@ func GenerateBuildFilesHandler(handler images.HandlerFunc, layoutRoot string, pr blobBuildFiles[digest.SHA256] = rule.EmptyFile(algoBUILDPath(layoutRoot, digest.SHA256), "") // Add load statements for all of the oci_* rules - ldBlob := rule.NewLoad("@com_github_datadog_rules_oci//oci:blob.bzl") + ldBlob := rule.NewLoad("@com_github_datadog_rules_oci//oci/private/repositories:oci_blob.bzl") ldBlob.Add("oci_blob") - ldManifest := rule.NewLoad("@com_github_datadog_rules_oci//oci:manifests.bzl") - ldManifest.Add("oci_image_index_manifest") - ldManifest.Add("oci_image_manifest") + ldImageManifest := rule.NewLoad("@com_github_datadog_rules_oci//oci/private/repositories:oci_image_manifest.bzl") + ldImageManifest.Add("oci_image_manifest") + + ldImageIndexManifest := rule.NewLoad("@com_github_datadog_rules_oci//oci/private/repositories:oci_image_index_manifest.bzl") + ldImageIndexManifest.Add("oci_image_index_manifest") for algo, f := range blobBuildFiles { ldBlob.Insert(f, 0) - ldManifest.Insert(f, 0) + ldImageManifest.Insert(f, 0) + ldImageIndexManifest.Insert(f, 0) f.Save(algoBUILDPath(layoutRoot, algo)) } // Top level build file for used as an index of the entire layout layoutBuild := rule.EmptyFile(filepath.Join(layoutRoot, "BUILD.bazel"), "") - ldLayout := rule.NewLoad("@com_github_datadog_rules_oci//oci:layout.bzl") + ldLayout := rule.NewLoad("@com_github_datadog_rules_oci//oci/private/repositories:oci_layout_index.bzl") ldLayout.Add("oci_layout_index") ldLayout.Insert(layoutBuild, 0) diff --git a/oci/BUILD.bazel b/oci/BUILD.bazel old mode 100755 new mode 100644 index eff474d..48cff8a --- a/oci/BUILD.bazel +++ b/oci/BUILD.bazel @@ -1,105 +1,69 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") -load(":debug_flag.bzl", "debug_flag") +load("@rules_pkg//pkg:mappings.bzl", "pkg_files") +load("//oci/private:debug_flag.bzl", "debug_flag") # gazelle:lang go,starlark -exports_files(["defs.bzl"]) +exports_files( + glob(["*.bzl"]), + visibility = ["//:__subpackages__"], +) toolchain_type( name = "toolchain", visibility = ["//visibility:public"], ) -filegroup( - name = "oci-files", - srcs = glob([ - "*.bzl", - "*.bazel", - ]), - visibility = ["//visibility:public"], -) - debug_flag( name = "debug", build_setting_default = False, visibility = ["//visibility:public"], ) -bzl_library( - name = "blob", - srcs = ["blob.bzl"], - visibility = ["//visibility:public"], - deps = ["@com_github_datadog_rules_oci//oci:providers"], -) - bzl_library( name = "defs", - srcs = ["defs.bzl"], + srcs = [ + ":defs.bzl", + ], visibility = ["//visibility:public"], deps = [ - ":image", - ":oci_image_layout", - ":pull", - ":push", + "//oci:providers.bzl", + "//oci/private:common.bzl", + "//oci/private:debug_flag.bzl", + "//oci/private:oci_image.bzl", + "//oci/private:oci_image_index.bzl", + "//oci/private:oci_image_layer.bzl", + "//oci/private:oci_image_layout.bzl", + "//oci/private:oci_push.bzl", + "@aspect_bazel_lib//lib:stamping", ], ) bzl_library( - name = "image", - srcs = ["image.bzl"], - visibility = ["//visibility:public"], - deps = ["@com_github_datadog_rules_oci//oci:providers"], -) - -bzl_library( - name = "layout", - srcs = ["layout.bzl"], - visibility = ["//visibility:public"], - deps = ["@com_github_datadog_rules_oci//oci:providers"], -) - -bzl_library( - name = "manifests", - srcs = ["manifests.bzl"], + name = "providers", + srcs = [ + ":providers.bzl", + ], visibility = ["//visibility:public"], - deps = ["@com_github_datadog_rules_oci//oci:providers"], ) bzl_library( - name = "oci_image_layout", - srcs = ["oci_image_layout.bzl"], - visibility = ["//visibility:public"], - deps = [ - "@com_github_datadog_rules_oci//oci:debug_flag", - "@com_github_datadog_rules_oci//oci:providers", + name = "repositories", + srcs = [ + ":repositories.bzl", ], -) - -bzl_library( - name = "push", - srcs = ["push.bzl"], visibility = ["//visibility:public"], deps = [ - "@aspect_bazel_lib//lib:stamping", - "@com_github_datadog_rules_oci//oci:debug_flag", - "@com_github_datadog_rules_oci//oci:providers", + "//oci/private/repositories:oci_pull.bzl", ], ) -bzl_library( - name = "debug_flag", - srcs = ["debug_flag.bzl"], - visibility = ["//visibility:public"], -) - -bzl_library( - name = "providers", - srcs = ["providers.bzl"], - visibility = ["//visibility:public"], -) - -bzl_library( - name = "pull", - srcs = ["pull.bzl"], - visibility = ["//visibility:public"], +pkg_files( + name = "files", + srcs = glob([ + "*.bzl", + "*.bazel", + ]), + prefix = "oci", + visibility = ["//release:__subpackages__"], ) diff --git a/oci/defs.bzl b/oci/defs.bzl old mode 100755 new mode 100644 index 5f461f4..0af379d --- a/oci/defs.bzl +++ b/oci/defs.bzl @@ -1,14 +1,13 @@ -""" public API """ +""" public rules """ -load(":image.bzl", _oci_image = "oci_image", _oci_image_index = "oci_image_index", _oci_image_layer = "oci_image_layer") -load(":oci_image_layout.bzl", _oci_image_layout = "oci_image_layout") -load(":pull.bzl", _oci_pull = "oci_pull") -load(":push.bzl", _oci_push = "oci_push") - -oci_pull = _oci_pull -oci_push = _oci_push +load("//oci/private:oci_image.bzl", _oci_image = "oci_image") +load("//oci/private:oci_image_index.bzl", _oci_image_index = "oci_image_index") +load("//oci/private:oci_image_layer.bzl", _oci_image_layer = "oci_image_layer") +load("//oci/private:oci_image_layout.bzl", _oci_image_layout = "oci_image_layout") +load("//oci/private:oci_push.bzl", _oci_push = "oci_push") oci_image = _oci_image oci_image_index = _oci_image_index oci_image_layer = _oci_image_layer oci_image_layout = _oci_image_layout +oci_push = _oci_push diff --git a/oci/manifests.bzl b/oci/manifests.bzl deleted file mode 100755 index 9fb298e..0000000 --- a/oci/manifests.bzl +++ /dev/null @@ -1,53 +0,0 @@ -""" manifests """ - -load("@com_github_datadog_rules_oci//oci:providers.bzl", "OCIDescriptor", "OCIImageIndexManifest", "OCIImageManifest", "OCILayout") - -def _oci_image_manifest_impl(ctx): - return [OCIImageManifest( - config = ctx.attr.config[OCIDescriptor], - layers = [layer[OCIDescriptor] for layer in ctx.attr.layers], - annotations = ctx.attr.annotations, - ), ctx.attr.layout[OCILayout], ctx.attr.descriptor[OCIDescriptor]] - -oci_image_manifest = rule( - implementation = _oci_image_manifest_impl, - provides = [OCIImageManifest], - attrs = { - "descriptor": attr.label( - mandatory = True, - providers = [OCIDescriptor], - ), - "config": attr.label( - mandatory = True, - providers = [OCIDescriptor], - ), - "layers": attr.label_list( - mandatory = False, - providers = [OCIDescriptor], - ), - "annotations": attr.string_dict(), - "layout": attr.label(), - }, -) - -def _oci_image_index_manifest_impl(ctx): - return [OCIImageIndexManifest( - manifests = [m[OCIDescriptor] for m in ctx.attr.manifests], - ), ctx.attr.layout[OCILayout], ctx.attr.descriptor[OCIDescriptor]] - -oci_image_index_manifest = rule( - implementation = _oci_image_index_manifest_impl, - attrs = { - "descriptor": attr.label( - mandatory = True, - providers = [OCIDescriptor], - ), - "manifests": attr.label_list( - mandatory = False, - providers = [OCIDescriptor], - ), - "annotations": attr.string_dict(), - "layout": attr.label(), - }, - provides = [OCIImageIndexManifest], -) diff --git a/oci/private/BUILD.bazel b/oci/private/BUILD.bazel new file mode 100644 index 0000000..bf21dcf --- /dev/null +++ b/oci/private/BUILD.bazel @@ -0,0 +1,16 @@ +load("@rules_pkg//pkg:mappings.bzl", "pkg_files") + +exports_files( + glob(["*.bzl"]), + visibility = ["//oci:__subpackages__"], +) + +pkg_files( + name = "files", + srcs = glob([ + "*.bzl", + "*.bazel", + ]), + prefix = "oci/private", + visibility = ["//release:__subpackages__"], +) diff --git a/oci/private/common.bzl b/oci/private/common.bzl new file mode 100644 index 0000000..8c91387 --- /dev/null +++ b/oci/private/common.bzl @@ -0,0 +1,18 @@ +# buildifier: disable=function-docstring +def get_descriptor_file(ctx, desc): + if hasattr(desc, "descriptor_file"): + return desc.descriptor_file + + out = ctx.actions.declare_file(desc.digest) + ctx.actions.write( + output = out, + content = json.encode({ + "mediaType": desc.media_type, + "size": desc.size, + "digest": desc.digest, + "urls": desc.urls, + "annotations": desc.annotations, + }), + ) + + return out diff --git a/oci/debug_flag.bzl b/oci/private/debug_flag.bzl old mode 100755 new mode 100644 similarity index 100% rename from oci/debug_flag.bzl rename to oci/private/debug_flag.bzl diff --git a/oci/image.bzl b/oci/private/oci_image.bzl old mode 100755 new mode 100644 similarity index 53% rename from oci/image.bzl rename to oci/private/oci_image.bzl index 8727bf1..4a51013 --- a/oci/image.bzl +++ b/oci/private/oci_image.bzl @@ -1,148 +1,10 @@ -""" image """ +""" oci_image """ -load("@com_github_datadog_rules_oci//oci:providers.bzl", "OCIDescriptor", "OCILayout") +load("//oci:providers.bzl", "OCIDescriptor", "OCILayout") +load(":common.bzl", "get_descriptor_file") -# buildifier: disable=function-docstring -def get_descriptor_file(ctx, desc): - if hasattr(desc, "descriptor_file"): - return desc.descriptor_file - - out = ctx.actions.declare_file(desc.digest) - ctx.actions.write( - output = out, - content = json.encode({ - "mediaType": desc.media_type, - "size": desc.size, - "digest": desc.digest, - "urls": desc.urls, - "annotations": desc.annotations, - }), - ) - - return out - -def _oci_image_layer_impl(ctx): - toolchain = ctx.toolchains["@com_github_datadog_rules_oci//oci:toolchain"] - - descriptor_file = ctx.actions.declare_file("{}.descriptor.json".format(ctx.label.name)) - - ctx.actions.run( - executable = toolchain.sdk.ocitool, - arguments = [ - "create-layer", - "--out={}".format(ctx.outputs.layer.path), - "--outd={}".format(descriptor_file.path), - "--dir={}".format(ctx.attr.directory), - "--bazel-label={}".format(ctx.label), - ] + - ["--file={}".format(f.path) for f in ctx.files.files] + - ["--symlink={}={}".format(k, v) for k, v in ctx.attr.symlinks.items()] + - ["--file-map={}={}".format(k.files.to_list()[0].path, v) for k, v in ctx.attr.file_map.items()], - inputs = ctx.files.files + ctx.files.file_map, - outputs = [ - descriptor_file, - ctx.outputs.layer, - ], - ) - - return [ - OCIDescriptor( - descriptor_file = descriptor_file, - file = ctx.outputs.layer, - ), - ] - -oci_image_layer = rule( - implementation = _oci_image_layer_impl, - doc = "Create a tarball and an OCI descriptor for it", - attrs = { - "files": attr.label_list( - doc = "List of files to include under `directory`", - allow_files = True, - ), - "directory": attr.string( - doc = "Directory in the tarball to place the `files`", - ), - "symlinks": attr.string_dict( - doc = "Dictionary of symlink -> target entries to place in the tarball", - ), - "file_map": attr.label_keyed_string_dict( - doc = "Dictionary of file -> file location in tarball", - allow_files = True, - ), - }, - toolchains = ["@com_github_datadog_rules_oci//oci:toolchain"], - outputs = { - "layer": "%{name}-layer.tar.gz", - }, -) - -def _oci_image_index_impl(ctx): - toolchain = ctx.toolchains["@com_github_datadog_rules_oci//oci:toolchain"] - - layout_files = depset(None, transitive = [m[OCILayout].files for m in ctx.attr.manifests]) - - index_desc_file = ctx.actions.declare_file("{}.index.descriptor.json".format(ctx.label.name)) - index_file = ctx.actions.declare_file("{}.index.json".format(ctx.label.name)) - layout_file = ctx.actions.declare_file("{}.index.layout.json".format(ctx.label.name)) - - desc_files = [] - for manifest in ctx.attr.manifests: - desc_files.append(get_descriptor_file(ctx, manifest[OCIDescriptor])) - - outputs = [ - index_file, - index_desc_file, - layout_file, - ] - - ctx.actions.run( - executable = toolchain.sdk.ocitool, - arguments = ["--layout={}".format(m[OCILayout].blob_index.path) for m in ctx.attr.manifests] + - [ - "create-index", - "--out-index={}".format(index_file.path), - "--out-layout={}".format(layout_file.path), - "--outd={}".format(index_desc_file.path), - ] + - ["--desc={}".format(d.path) for d in desc_files] + - ["--annotations={}={}".format(k, v) for k, v in ctx.attr.annotations.items()], - inputs = desc_files + layout_files.to_list(), - outputs = outputs, - ) - - return [ - OCIDescriptor( - descriptor_file = index_desc_file, - ), - OCILayout( - blob_index = layout_file, - files = depset(direct = [index_file, layout_file], transitive = [layout_files]), - ), - DefaultInfo( - files = depset(outputs), - ), - ] - -oci_image_index = rule( - implementation = _oci_image_index_impl, - doc = """ - """, - attrs = { - "manifests": attr.label_list( - doc = """ - """, - ), - "annotations": attr.string_dict( - doc = """ - """, - ), - }, - toolchains = ["@com_github_datadog_rules_oci//oci:toolchain"], -) - -def _oci_image_impl(ctx): - toolchain = ctx.toolchains["@com_github_datadog_rules_oci//oci:toolchain"] +def _impl(ctx): + toolchain = ctx.toolchains["//oci:toolchain"] base_desc = get_descriptor_file(ctx, ctx.attr.base[OCIDescriptor]) base_layout = ctx.attr.base[OCILayout] @@ -235,7 +97,7 @@ def _oci_image_impl(ctx): ] oci_image = rule( - implementation = _oci_image_impl, + implementation = _impl, doc = """Creates a new image manifest and config by appending the `layers` to an existing image manifest and config defined by `base`. If `base` is an image index, then `os` and `arch` will be used to extract the image manifest.""", @@ -282,5 +144,5 @@ oci_image = rule( then the value of annotations will be used instead.""", ), }, - toolchains = ["@com_github_datadog_rules_oci//oci:toolchain"], + toolchains = ["//oci:toolchain"], ) diff --git a/oci/private/oci_image_index.bzl b/oci/private/oci_image_index.bzl new file mode 100644 index 0000000..1faef60 --- /dev/null +++ b/oci/private/oci_image_index.bzl @@ -0,0 +1,68 @@ +""" oci_image_index """ + +load("//oci:providers.bzl", "OCIDescriptor", "OCILayout") +load(":common.bzl", "get_descriptor_file") + +def _impl(ctx): + toolchain = ctx.toolchains["//oci:toolchain"] + + layout_files = depset(None, transitive = [m[OCILayout].files for m in ctx.attr.manifests]) + + index_desc_file = ctx.actions.declare_file("{}.index.descriptor.json".format(ctx.label.name)) + index_file = ctx.actions.declare_file("{}.index.json".format(ctx.label.name)) + layout_file = ctx.actions.declare_file("{}.index.layout.json".format(ctx.label.name)) + + desc_files = [] + for manifest in ctx.attr.manifests: + desc_files.append(get_descriptor_file(ctx, manifest[OCIDescriptor])) + + outputs = [ + index_file, + index_desc_file, + layout_file, + ] + + ctx.actions.run( + executable = toolchain.sdk.ocitool, + arguments = ["--layout={}".format(m[OCILayout].blob_index.path) for m in ctx.attr.manifests] + + [ + "create-index", + "--out-index={}".format(index_file.path), + "--out-layout={}".format(layout_file.path), + "--outd={}".format(index_desc_file.path), + ] + + ["--desc={}".format(d.path) for d in desc_files] + + ["--annotations={}={}".format(k, v) for k, v in ctx.attr.annotations.items()], + inputs = desc_files + layout_files.to_list(), + outputs = outputs, + ) + + return [ + OCIDescriptor( + descriptor_file = index_desc_file, + ), + OCILayout( + blob_index = layout_file, + files = depset(direct = [index_file, layout_file], transitive = [layout_files]), + ), + DefaultInfo( + files = depset(outputs), + ), + ] + +oci_image_index = rule( + implementation = _impl, + doc = """ + """, + attrs = { + "manifests": attr.label_list( + doc = """ + """, + ), + "annotations": attr.string_dict( + doc = """ + """, + ), + }, + toolchains = ["//oci:toolchain"], +) diff --git a/oci/private/oci_image_layer.bzl b/oci/private/oci_image_layer.bzl new file mode 100644 index 0000000..28cab58 --- /dev/null +++ b/oci/private/oci_image_layer.bzl @@ -0,0 +1,86 @@ +""" oci_image_layer """ + +load("//oci:providers.bzl", "OCIDescriptor") + +def oci_image_layer( + *, + name, + directory = "/", # str + file_map = None, # dict[label, str] + files = None, # list[label] + symlinks = None, # dict[str, str] + **kwargs): + # -> None + """ oci_image_layer + + Args: + name: A unique name for this rule + directory: Directory in the tarball to place the `files` + file_map: Dictionary of file -> file location in tarball + files: List of files to include under `directory` + symlinks: Dictionary of symlink -> target entries to place in the tarball + **kwargs: Additional arguments to pass to the rule, e.g. `tags` or `visibility` + """ + file_map = file_map or {} + files = files or [] + symlinks = symlinks or {} + + if len(files) == 0 and len(file_map) == 0: + fail("At least one of `files` or `file_map` must be provided") + + _oci_image_layer( + name = name, + directory = directory, + file_map = file_map, + files = files, + symlinks = symlinks, + **kwargs + ) + +def _impl(ctx): + toolchain = ctx.toolchains["//oci:toolchain"] + + descriptor_file = ctx.actions.declare_file("{}.descriptor.json".format(ctx.label.name)) + + ctx.actions.run( + executable = toolchain.sdk.ocitool, + arguments = [ + "create-layer", + "--out={}".format(ctx.outputs.layer.path), + "--outd={}".format(descriptor_file.path), + "--dir={}".format(ctx.attr.directory), + "--bazel-label={}".format(ctx.label), + ] + + ["--file={}".format(f.path) for f in ctx.files.files] + + ["--symlink={}={}".format(k, v) for k, v in ctx.attr.symlinks.items()] + + ["--file-map={}={}".format(k.files.to_list()[0].path, v) for k, v in ctx.attr.file_map.items()], + inputs = ctx.files.files + ctx.files.file_map, + outputs = [ + descriptor_file, + ctx.outputs.layer, + ], + ) + + return [ + DefaultInfo( + files = depset([ctx.outputs.layer, descriptor_file]), + ), + OCIDescriptor( + descriptor_file = descriptor_file, + file = ctx.outputs.layer, + ), + ] + +_oci_image_layer = rule( + implementation = _impl, + attrs = { + "files": attr.label_list(allow_files = True), + "directory": attr.string(), + "symlinks": attr.string_dict(), + "file_map": attr.label_keyed_string_dict(allow_files = True), + }, + toolchains = ["//oci:toolchain"], + outputs = { + "layer": "%{name}-layer.tar.gz", + }, +) diff --git a/oci/oci_image_layout.bzl b/oci/private/oci_image_layout.bzl similarity index 89% rename from oci/oci_image_layout.bzl rename to oci/private/oci_image_layout.bzl index ce631d1..d8fc0ef 100644 --- a/oci/oci_image_layout.bzl +++ b/oci/private/oci_image_layout.bzl @@ -1,10 +1,10 @@ """A rule to create a directory in OCI Image Layout format.""" -load("@com_github_datadog_rules_oci//oci:debug_flag.bzl", "DebugInfo") -load("@com_github_datadog_rules_oci//oci:providers.bzl", "OCIDescriptor", "OCILayout") +load("//oci:providers.bzl", "OCIDescriptor", "OCILayout") +load(":debug_flag.bzl", "DebugInfo") def _oci_image_layout_impl(ctx): - toolchain = ctx.toolchains["@com_github_datadog_rules_oci//oci:toolchain"] + toolchain = ctx.toolchains["//oci:toolchain"] layout = ctx.attr.manifest[OCILayout] @@ -70,5 +70,5 @@ oci_image_layout = rule( provides = [ DefaultInfo, ], - toolchains = ["@com_github_datadog_rules_oci//oci:toolchain"], + toolchains = ["//oci:toolchain"], ) diff --git a/oci/push.bzl b/oci/private/oci_push.bzl old mode 100755 new mode 100644 similarity index 93% rename from oci/push.bzl rename to oci/private/oci_push.bzl index 2a05ccc..8940610 --- a/oci/push.bzl +++ b/oci/private/oci_push.bzl @@ -1,11 +1,11 @@ -""" push """ +""" oci_push """ load("@aspect_bazel_lib//lib:stamping.bzl", "STAMP_ATTRS", "maybe_stamp") -load("@com_github_datadog_rules_oci//oci:debug_flag.bzl", "DebugInfo") -load("@com_github_datadog_rules_oci//oci:providers.bzl", "OCIDescriptor", "OCILayout", "OCIReferenceInfo") +load("//oci:providers.bzl", "OCIDescriptor", "OCILayout", "OCIReferenceInfo") +load(":debug_flag.bzl", "DebugInfo") -def _oci_push_impl(ctx): - toolchain = ctx.toolchains["@com_github_datadog_rules_oci//oci:toolchain"] +def _impl(ctx): + toolchain = ctx.toolchains["//oci:toolchain"] layout = ctx.attr.manifest[OCILayout] @@ -137,7 +137,7 @@ oci_push = rule( doc = """ Pushes a manifest or a list of manifests to an OCI registry. """, - implementation = _oci_push_impl, + implementation = _impl, executable = True, attrs = dict({ "manifest": attr.label( @@ -202,5 +202,5 @@ oci_push = rule( provides = [ OCIReferenceInfo, ], - toolchains = ["@com_github_datadog_rules_oci//oci:toolchain"], + toolchains = ["//oci:toolchain"], ) diff --git a/oci/private/repositories/BUILD.bazel b/oci/private/repositories/BUILD.bazel new file mode 100644 index 0000000..6bbce16 --- /dev/null +++ b/oci/private/repositories/BUILD.bazel @@ -0,0 +1,16 @@ +load("@rules_pkg//pkg:mappings.bzl", "pkg_files") + +exports_files( + glob(["*.bzl"]), + visibility = ["//oci:__subpackages__"], +) + +pkg_files( + name = "files", + srcs = glob([ + "*.bzl", + "*.bazel", + ]), + prefix = "oci/private/repositories", + visibility = ["//release:__subpackages__"], +) diff --git a/oci/blob.bzl b/oci/private/repositories/oci_blob.bzl old mode 100755 new mode 100644 similarity index 94% rename from oci/blob.bzl rename to oci/private/repositories/oci_blob.bzl index 2144378..314ea03 --- a/oci/blob.bzl +++ b/oci/private/repositories/oci_blob.bzl @@ -1,8 +1,8 @@ -""" blob """ +""" oci_blob """ load("@com_github_datadog_rules_oci//oci:providers.bzl", "OCIDescriptor") -def _oci_blob_impl(ctx): +def _impl(ctx): return [OCIDescriptor( file = ctx.file.file, media_type = ctx.attr.media_type, @@ -13,7 +13,7 @@ def _oci_blob_impl(ctx): )] oci_blob = rule( - implementation = _oci_blob_impl, + implementation = _impl, doc = """ An internal rule to represent a blob in a content-addressable store. This rule is usually generated by 'ocitool' when pulling an OCI artifact. diff --git a/oci/private/repositories/oci_image_index_manifest.bzl b/oci/private/repositories/oci_image_index_manifest.bzl new file mode 100644 index 0000000..e0689a2 --- /dev/null +++ b/oci/private/repositories/oci_image_index_manifest.bzl @@ -0,0 +1,30 @@ +""" oci_image_index_manifest """ + +load( + "@com_github_datadog_rules_oci//oci:providers.bzl", + "OCIDescriptor", + "OCIImageIndexManifest", + "OCILayout", +) + +def _impl(ctx): + return [OCIImageIndexManifest( + manifests = [m[OCIDescriptor] for m in ctx.attr.manifests], + ), ctx.attr.layout[OCILayout], ctx.attr.descriptor[OCIDescriptor]] + +oci_image_index_manifest = rule( + implementation = _impl, + attrs = { + "descriptor": attr.label( + mandatory = True, + providers = [OCIDescriptor], + ), + "manifests": attr.label_list( + mandatory = False, + providers = [OCIDescriptor], + ), + "annotations": attr.string_dict(), + "layout": attr.label(), + }, + provides = [OCIImageIndexManifest], +) diff --git a/oci/private/repositories/oci_image_manifest.bzl b/oci/private/repositories/oci_image_manifest.bzl new file mode 100644 index 0000000..5e72957 --- /dev/null +++ b/oci/private/repositories/oci_image_manifest.bzl @@ -0,0 +1,36 @@ +""" oci_image_manifest """ + +load( + "@com_github_datadog_rules_oci//oci:providers.bzl", + "OCIDescriptor", + "OCIImageManifest", + "OCILayout", +) + +def _impl(ctx): + return [OCIImageManifest( + config = ctx.attr.config[OCIDescriptor], + layers = [layer[OCIDescriptor] for layer in ctx.attr.layers], + annotations = ctx.attr.annotations, + ), ctx.attr.layout[OCILayout], ctx.attr.descriptor[OCIDescriptor]] + +oci_image_manifest = rule( + implementation = _impl, + provides = [OCIImageManifest], + attrs = { + "descriptor": attr.label( + mandatory = True, + providers = [OCIDescriptor], + ), + "config": attr.label( + mandatory = True, + providers = [OCIDescriptor], + ), + "layers": attr.label_list( + mandatory = False, + providers = [OCIDescriptor], + ), + "annotations": attr.string_dict(), + "layout": attr.label(), + }, +) diff --git a/oci/layout.bzl b/oci/private/repositories/oci_layout_index.bzl old mode 100755 new mode 100644 similarity index 90% rename from oci/layout.bzl rename to oci/private/repositories/oci_layout_index.bzl index 06f62c4..fe44eeb --- a/oci/layout.bzl +++ b/oci/private/repositories/oci_layout_index.bzl @@ -1,8 +1,8 @@ -""" layout """ +""" oci_layout_index """ load("@com_github_datadog_rules_oci//oci:providers.bzl", "OCIDescriptor", "OCILayout") -def _oci_layout_index_impl(ctx): +def _impl(ctx): blobs_map = {} all_files = [] for blob in ctx.attr.blobs: @@ -29,7 +29,7 @@ def _oci_layout_index_impl(ctx): ] oci_layout_index = rule( - implementation = _oci_layout_index_impl, + implementation = _impl, attrs = { "index": attr.label( providers = [OCIDescriptor], diff --git a/oci/pull.bzl b/oci/private/repositories/oci_pull.bzl old mode 100755 new mode 100644 similarity index 98% rename from oci/pull.bzl rename to oci/private/repositories/oci_pull.bzl index 61fe08c..36225c6 --- a/oci/pull.bzl +++ b/oci/private/repositories/oci_pull.bzl @@ -1,4 +1,4 @@ -""" pull """ +""" oci_pull """ # A directory to store cached OCI artifacts # TODO(griffin) currently not used, but going to start depending on this for @@ -51,7 +51,7 @@ def generate_build_files(rctx, layout_root, digest = ""): if res.return_code > 0: failout("failed to pull manifest", res) -def _oci_pull_impl(rctx): +def _impl(rctx): pull( rctx, rctx.path("."), @@ -68,7 +68,7 @@ def _oci_pull_impl(rctx): ) oci_pull = repository_rule( - implementation = _oci_pull_impl, + implementation = _impl, doc = """ """, attrs = { diff --git a/oci/providers.bzl b/oci/providers.bzl old mode 100755 new mode 100644 index 7b992cd..d22ff88 --- a/oci/providers.bzl +++ b/oci/providers.bzl @@ -1,4 +1,4 @@ -""" providers """ +""" public providers """ OCIReferenceInfo = provider( doc = "Refers to any artifact represented by an OCI-like reference URI", @@ -53,14 +53,9 @@ OCIImageIndexManifest = provider( }, ) -# buildifier: disable=name-conventions -OCIPlatform = provider( - doc = "Platform describes the platform which the image in the manifest runs on", +OCISDK = provider( + "The OCI SDK", fields = { - "architecture": "Architecture field specifies the CPU architecture, in the GOARCH format.", - "os": "OS specifies the operating system, in the GOOS format.", - "os_version": "OSVersion is an optional field specifying the operating system version", - "os_features": "OSFeatures is an optional field specifying an array of strings, each listing a required OS feature", - "variant": "Variant is an optional field specifying a variant of the CPU", + "ocitool": "", }, ) diff --git a/oci/repositories.bzl b/oci/repositories.bzl new file mode 100644 index 0000000..394866c --- /dev/null +++ b/oci/repositories.bzl @@ -0,0 +1,5 @@ +""" public repository rules """ + +load("//oci/private/repositories:oci_pull.bzl", _oci_pull = "oci_pull") + +oci_pull = _oci_pull diff --git a/oci/toolchain.bzl b/oci/toolchain.bzl old mode 100755 new mode 100644 index 4243006..d8811a9 --- a/oci/toolchain.bzl +++ b/oci/toolchain.bzl @@ -1,5 +1,7 @@ """ toolchain """ +load(":providers.bzl", "OCISDK") + # Follow golang's conventions for naming os and arch OS_CONSTRAINTS = { "darwin": "@platforms//os:osx", @@ -11,13 +13,6 @@ ARCH_CONSTRAINTS = { "arm64": "@platforms//cpu:arm64", } -OCISDK = provider( - "The OCI SDK", - fields = { - "ocitool": "", - }, -) - def _oci_toolchain_impl(ctx): return [platform_common.ToolchainInfo( sdk = ctx.attr.sdk[OCISDK], diff --git a/package.json b/package.json new file mode 100644 index 0000000..bb8539d --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "prettier": "^3.4.2" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..0c95ef6 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,18 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +devDependencies: + prettier: + specifier: ^3.4.2 + version: 3.4.2 + +packages: + + /prettier@3.4.2: + resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} + engines: {node: '>=14'} + hasBin: true + dev: true diff --git a/release/BUILD.bazel b/release/BUILD.bazel index e8ed3b2..b5a81dd 100644 --- a/release/BUILD.bazel +++ b/release/BUILD.bazel @@ -1,15 +1,22 @@ -load(":release.bzl", "go_binary_multi", "release_rules_oci") +load("@rules_pkg//pkg:pkg.bzl", "pkg_tar") +load(":pkg_go_binary_multiple_platforms.bzl", "pkg_go_binary_multiple_platforms") -go_binary_multi( - name = "ocitool", - embed = ["//go/cmd/ocitool:go_default_library"], -) - -release_rules_oci( +pkg_tar( name = "release", - binaries = [ - ":ocitool.all", - "//bin:bin-files", + srcs = [ + ":ocitool", + "//bin:files", + "//oci:files", + "//oci/private:files", + "//oci/private/repositories:files", ], - rules = ["//oci:oci-files"], + empty_files = ["BUILD.bazel"], + extension = "tar.gz", +) + +pkg_go_binary_multiple_platforms( + name = "ocitool", + go_binary = ["//go/cmd/ocitool:go_default_library"], + mode = "0755", + prefix = "bin", ) diff --git a/release/pkg_go_binary_multiple_platforms.bzl b/release/pkg_go_binary_multiple_platforms.bzl new file mode 100644 index 0000000..d63c604 --- /dev/null +++ b/release/pkg_go_binary_multiple_platforms.bzl @@ -0,0 +1,59 @@ +""" pkg_go_binary_multiple_platforms """ + +load("@rules_go//go:def.bzl", _go_binary = "go_binary") +load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files") + +_GOOSS = ["darwin", "linux"] +_GOARCHS = ["amd64", "arm64"] + +# buildifier: disable=function-docstring +def pkg_go_binary_multiple_platforms( + *, + name, # str + go_binary, # label + mode, # str + prefix, # str | None + **kwargs): + """ pkg_go_binary_multiple_platforms + + Creates a pkg_files target called that includes multiple go binary + executables (one for each platform) based off the provided go binary target. + + In other words, the following 4 exectuable will be included in the pkg_files + target called : + - -darwin-amd64 + - -darwin-arm64 + - -linux-amd64 + - -linux-arm64 + + Args: + name: + - The name of the pkg_files target to create + - Also determines the names of the executables insde the pkg_files + target, which will be of the form "--". + go_binary: The go_binary target to embed multiple versions of + mode: The mode of the executables in pkg_files + prefix: The prefix to pass to pkg_files + **kwargs: Additional arguments to pass to pkg_files + """ + all_binaries = [] + for goos in _GOOSS: + for goarch in _GOARCHS: + bin_name = "{}-{}-{}".format(name, goos, goarch) + _go_binary( + name = bin_name, + embed = go_binary, + goos = goos, + goarch = goarch, + ) + all_binaries.append(bin_name) + + pkg_files( + name = name, + srcs = all_binaries, + attributes = pkg_attributes( + mode = mode, + ), + prefix = prefix, + **kwargs + ) diff --git a/release/release.bzl b/release/release.bzl deleted file mode 100644 index e255076..0000000 --- a/release/release.bzl +++ /dev/null @@ -1,73 +0,0 @@ -""" release """ - -load("@rules_go//go:def.bzl", "go_binary") -load("@rules_pkg//pkg:pkg.bzl", "pkg_tar") - -DEFAULT_GOOSS = ["linux", "darwin"] -DEFAULT_GOARCHS = ["amd64", "arm64"] - -# buildifier: disable=function-docstring -def go_binary_multi(name, embed, gooss = DEFAULT_GOOSS, goarchs = DEFAULT_GOARCHS, **kwargs): - if "goos" in kwargs or "goarch" in kwargs: - fail("go_binary_multi does not allow goos or goarch in kwargs") - - go_binary( - name = name, - embed = embed, - **kwargs - ) - - all_binaries = [] - for goos in gooss: - for goarch in goarchs: - bin_name = "{}-{}-{}".format(name, goos, goarch) - go_binary( - name = bin_name, - embed = embed, - goos = goos, - goarch = goarch, - tags = ["manual"], - **kwargs - ) - all_binaries.append(bin_name) - - all_bin_name = "{}.all".format(name) - native.filegroup( - name = all_bin_name, - srcs = all_binaries, - ) - -# buildifier: disable=function-docstring -def release_rules_oci(name, rules, binaries, **kwargs): - top_name = "{}.top".format(name) - pkg_tar( - name = top_name, - empty_files = ["BUILD.bazel"], - package_dir = "", - ) - - rules_name = "{}.rules".format(name) - pkg_tar( - name = rules_name, - srcs = rules, - package_dir = "/oci", - ) - - binaries_name = "{}.bin".format(name) - pkg_tar( - name = binaries_name, - srcs = binaries, - mode = "0755", - package_dir = "/bin", - ) - - pkg_tar( - name = name, - extension = "tar.gz", - deps = [ - rules_name, - binaries_name, - top_name, - ], - **kwargs - ) diff --git a/tools/format/BUILD.bazel b/tools/format/BUILD.bazel new file mode 100644 index 0000000..fb5f090 --- /dev/null +++ b/tools/format/BUILD.bazel @@ -0,0 +1,32 @@ +load("@aspect_rules_lint//format:defs.bzl", "format_multirun", "format_test") +load("@npm//:prettier/package_json.bzl", prettier = "bin") + +package(default_visibility = ["//:__subpackages__"]) + +prettier.prettier_binary( + name = "prettier", + env = { + # Allow the binary to be run outside bazel + "BAZEL_BINDIR": ".", + }, + fixed_args = [ + "--log-level=warn", + ], +) + +format_multirun( + name = "format", + go = "@go_sdk//:bin/gofmt", + markdown = ":prettier", + starlark = "@buildifier_prebuilt//:buildifier", +) + +format_test( + name = "format_test", + size = "small", + go = "@go_sdk//:bin/gofmt", + markdown = ":prettier", + no_sandbox = True, + starlark = "@buildifier_prebuilt//:buildifier", + workspace = "//:WORKSPACE", +)