From 5ed45709f33119417066b71607456fa2104d8f1a Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sun, 31 Mar 2024 11:32:00 +0200 Subject: [PATCH] Use the existing opentelemetry-proto package This package is more complete than what we already have. --- BUILD.bazel | 2 +- MODULE.bazel | 15 +--- MODULE.bazel.lock | 90 ++++++++++++---------- pkg/proto/auth/BUILD.bazel | 2 +- pkg/proto/configuration/global/BUILD.bazel | 2 +- 5 files changed, 55 insertions(+), 56 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index deb9ec15..3c5345ce 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -17,7 +17,7 @@ load("@gazelle//:def.bzl", "gazelle") # gazelle:resolve proto google/protobuf/timestamp.proto @protobuf//:timestamp_proto # gazelle:resolve proto google/protobuf/wrappers.proto @protobuf//:wrappers_proto # gazelle:resolve proto google/rpc/status.proto @googleapis//google/rpc:status_proto -# gazelle:resolve proto opentelemetry/proto/common/v1/common.proto @io_opentelemetry_proto//:common_proto +# gazelle:resolve proto opentelemetry/proto/common/v1/common.proto @opentelemetry-proto//:common_proto gazelle( name = "gazelle", ) diff --git a/MODULE.bazel b/MODULE.bazel index 2c040c55..ddf5ee7f 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -5,6 +5,7 @@ bazel_dep(name = "aspect_rules_js", version = "1.39.1") bazel_dep(name = "gazelle", version = "0.35.0") bazel_dep(name = "googleapis", version = "0.0.0-20240326-1c8d509c5") bazel_dep(name = "jsonnet_go", version = "0.20.0", repo_name = "google_jsonnet_go") +bazel_dep(name = "opentelemetry-proto", version = "1.1.0") bazel_dep(name = "protobuf", version = "23.1") bazel_dep(name = "rules_go", version = "0.46.0") bazel_dep(name = "rules_oci", version = "1.7.5") @@ -128,20 +129,6 @@ http_archive( urls = ["https://github.com/bazelbuild/rules_jsonnet/archive/0.5.0.tar.gz"], ) -http_archive( - name = "io_opentelemetry_proto", - build_file_content = """ -proto_library( - name = "common_proto", - srcs = ["opentelemetry/proto/common/v1/common.proto"], - visibility = ["//visibility:public"], -) -""", - sha256 = "464bc2b348e674a1a03142e403cbccb01be8655b6de0f8bfe733ea31fcd421be", - strip_prefix = "opentelemetry-proto-0.19.0", - urls = ["https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/v0.19.0.tar.gz"], -) - llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True) llvm.toolchain( llvm_version = "14.0.0", diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 95c32df1..d4fcc2bf 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -1,6 +1,6 @@ { "lockFileVersion": 6, - "moduleFileHash": "bb120a5fa3b95a82eaa01371c308c3bfaa7b102fa6542a17c342b9862a8b69b5", + "moduleFileHash": "2eea5184f35190cdc35fc95003763ce78e92d881e13215ddfb5c44d2b047366e", "flags": { "cmdRegistries": [ "https://bcr.bazel.build/" @@ -30,7 +30,7 @@ "usingModule": "", "location": { "file": "@@//:MODULE.bazel", - "line": 26, + "line": 27, "column": 23 }, "imports": {}, @@ -44,7 +44,7 @@ "devDependency": false, "location": { "file": "@@//:MODULE.bazel", - "line": 27, + "line": 28, "column": 16 } } @@ -58,7 +58,7 @@ "usingModule": "", "location": { "file": "@@//:MODULE.bazel", - "line": 29, + "line": 30, "column": 24 }, "imports": { @@ -116,7 +116,7 @@ "devDependency": false, "location": { "file": "@@//:MODULE.bazel", - "line": 30, + "line": 31, "column": 18 } }, @@ -139,7 +139,7 @@ "devDependency": true, "location": { "file": "@@//:MODULE.bazel", - "line": 79, + "line": 80, "column": 29 } }, @@ -154,7 +154,7 @@ "devDependency": true, "location": { "file": "@@//:MODULE.bazel", - "line": 93, + "line": 94, "column": 28 } }, @@ -169,7 +169,7 @@ "devDependency": true, "location": { "file": "@@//:MODULE.bazel", - "line": 97, + "line": 98, "column": 28 } }, @@ -184,7 +184,7 @@ "devDependency": true, "location": { "file": "@@//:MODULE.bazel", - "line": 101, + "line": 102, "column": 28 } }, @@ -199,7 +199,7 @@ "devDependency": true, "location": { "file": "@@//:MODULE.bazel", - "line": 105, + "line": 106, "column": 28 } }, @@ -214,7 +214,7 @@ "devDependency": true, "location": { "file": "@@//:MODULE.bazel", - "line": 109, + "line": 110, "column": 28 } } @@ -233,8 +233,7 @@ }, "imports": { "com_github_twbs_bootstrap": "com_github_twbs_bootstrap", - "io_bazel_rules_jsonnet": "io_bazel_rules_jsonnet", - "io_opentelemetry_proto": "io_opentelemetry_proto" + "io_bazel_rules_jsonnet": "io_bazel_rules_jsonnet" }, "devImports": [], "tags": [ @@ -252,7 +251,7 @@ "devDependency": false, "location": { "file": "@@//:MODULE.bazel", - "line": 116, + "line": 117, "column": 13 } }, @@ -269,25 +268,7 @@ "devDependency": false, "location": { "file": "@@//:MODULE.bazel", - "line": 124, - "column": 13 - } - }, - { - "tagName": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", - "attributeValues": { - "build_file_content": "\nproto_library(\n name = \"common_proto\",\n srcs = [\"opentelemetry/proto/common/v1/common.proto\"],\n visibility = [\"//visibility:public\"],\n)\n", - "sha256": "464bc2b348e674a1a03142e403cbccb01be8655b6de0f8bfe733ea31fcd421be", - "strip_prefix": "opentelemetry-proto-0.19.0", - "urls": [ - "https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/v0.19.0.tar.gz" - ], - "name": "io_opentelemetry_proto" - }, - "devDependency": false, - "location": { - "file": "@@//:MODULE.bazel", - "line": 131, + "line": 125, "column": 13 } } @@ -301,7 +282,7 @@ "usingModule": "", "location": { "file": "@@//:MODULE.bazel", - "line": 145, + "line": 132, "column": 21 }, "imports": { @@ -319,7 +300,7 @@ "devDependency": true, "location": { "file": "@@//:MODULE.bazel", - "line": 146, + "line": 133, "column": 15 } } @@ -333,7 +314,7 @@ "usingModule": "", "location": { "file": "@@//:MODULE.bazel", - "line": 151, + "line": 138, "column": 20 }, "imports": { @@ -351,7 +332,7 @@ "devDependency": false, "location": { "file": "@@//:MODULE.bazel", - "line": 152, + "line": 139, "column": 23 } } @@ -365,7 +346,7 @@ "usingModule": "", "location": { "file": "@@//:MODULE.bazel", - "line": 159, + "line": 146, "column": 20 }, "imports": { @@ -387,7 +368,7 @@ "devDependency": false, "location": { "file": "@@//:MODULE.bazel", - "line": 160, + "line": 147, "column": 9 } } @@ -402,6 +383,7 @@ "gazelle": "gazelle@_", "googleapis": "googleapis@0.0.0-20240326-1c8d509c5", "google_jsonnet_go": "jsonnet_go@0.20.0", + "opentelemetry-proto": "opentelemetry-proto@1.1.0", "protobuf": "protobuf@23.1", "rules_go": "rules_go@0.46.0", "rules_oci": "rules_oci@1.7.5", @@ -920,6 +902,36 @@ } } }, + "opentelemetry-proto@1.1.0": { + "name": "opentelemetry-proto", + "version": "1.1.0", + "key": "opentelemetry-proto@1.1.0", + "repoName": "opentelemetry-proto", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "com_github_grpc_grpc": "grpc@1.56.3.bcr.1", + "rules_proto": "rules_proto@6.0.0-rc2", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "urls": [ + "https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/v1.1.0.tar.gz" + ], + "integrity": "sha256-30kaBfP8v4bMW6XJ3oH2piTXTUdz1wCdVz431uK2r2Q=", + "strip_prefix": "opentelemetry-proto-1.1.0", + "remote_patches": { + "https://bcr.bazel.build/modules/opentelemetry-proto/1.1.0/patches/0001-Add-MODULE.bazel.patch": "sha256-RrO6zvMf7Z36RlhKw/7d3/6RnyTbMpQfOp8kq2bqWJw=" + }, + "remote_patch_strip": 1 + } + } + }, "protobuf@23.1": { "name": "protobuf", "version": "23.1", diff --git a/pkg/proto/auth/BUILD.bazel b/pkg/proto/auth/BUILD.bazel index 504bd665..7981cb33 100644 --- a/pkg/proto/auth/BUILD.bazel +++ b/pkg/proto/auth/BUILD.bazel @@ -7,7 +7,7 @@ proto_library( srcs = ["auth.proto"], visibility = ["//visibility:public"], deps = [ - "@io_opentelemetry_proto//:common_proto", + "@opentelemetry-proto//:common_proto", "@protobuf//:struct_proto", ], ) diff --git a/pkg/proto/configuration/global/BUILD.bazel b/pkg/proto/configuration/global/BUILD.bazel index 7c51b3ef..e5007e5d 100644 --- a/pkg/proto/configuration/global/BUILD.bazel +++ b/pkg/proto/configuration/global/BUILD.bazel @@ -9,7 +9,7 @@ proto_library( deps = [ "//pkg/proto/configuration/grpc:grpc_proto", "//pkg/proto/configuration/http:http_proto", - "@io_opentelemetry_proto//:common_proto", + "@opentelemetry-proto//:common_proto", "@protobuf//:duration_proto", "@protobuf//:empty_proto", "@protobuf//:wrappers_proto",