forked from pixie-io/pixie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
189 lines (171 loc) · 10.4 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# Copyright 2018- The Pixie Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
load("@io_bazel_rules_docker//container:container.bzl", "container_image")
load("//bazel:repositories.bzl", "list_pl_deps")
load("//bazel/external/ubuntu_packages:packages.bzl", "packages")
licenses(["restricted"])
exports_files(["LICENSE"])
gazelle(
name = "gazelle",
prefix = "px.dev/pixie",
)
# This line is necessary to keep Gazelle from using the vendored gRPC for Go library:
# gazelle:exclude vendor
# gazelle:exclude third_party
# gazelle:exclude src/ui/node_modules
# gazelle:go_naming_convention import
# gazelle:exclude **/*.pb.go
# gazelle:exclude **/mock.go
# gazelle:exclude external
# Make gazelle not generate proto files. We need to use gogo proto and this does
# not seem to work automatically right now. Keep an eye out on issue:
# https://github.com/bazelbuild/bazel-gazelle/issues/181 for updates.
# gazelle:proto disable
# TODO(zasgar): We should keep an eye on fixes to gazelle that make this automatic
# Make gazelle resolve the proto paths correctly.
# gazelle:resolve go px.dev/pixie/src/api/proto/cloudpb //src/api/proto/cloudpb:cloudapi_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/api/proto/uuidpb //src/api/proto/uuidpb:uuid_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/api/proto/vispb //src/api/proto/vispb:vis_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/api/proto/vizierpb //src/api/proto/vizierpb:vizier_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/api/proto/vizierconfigpb //src/api/proto/vizierconfigpb:vizier_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/carnot/carnotpb //src/carnot/carnotpb:carnot_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/carnot/docspb //src/carnot/docspb:docs_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/carnot/planner/compilerpb //src/carnot/planner/compilerpb:compiler_status_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/carnot/planner/distributedpb //src/carnot/planner/distributedpb:distributed_plan_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/carnot/planner/dynamic_tracing/ir/logicalpb //src/carnot/planner/dynamic_tracing/ir/logicalpb:logical_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/carnot/planner/plannerpb //src/carnot/planner/plannerpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/carnot/planpb //src/carnot/planpb:plan_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/carnot/queryresultspb //src/carnot/queryresultspb:query_results_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/carnot/udfspb //src/carnot/udfspb:udfs_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/artifact_tracker/artifacttrackerpb //src/cloud/artifact_tracker/artifacttrackerpb:artifact_tracker_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/auth/authpb //src/cloud/auth/authpb:auth_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/auth/authpb //src/cloud/auth/authpb:auth_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/config_manager/configmanagerpb //src/cloud/config_manager/configmanagerpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/cron_script/cronscriptpb //src/cloud/cron_script/cronscriptpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/plugin/pluginpb //src/cloud/plugin/pluginpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/profile/profilepb //src/cloud/profile/profilepb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/project_manager/projectmanagerpb //src/cloud/project_manager/projectmanagerpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/scriptmgr/scriptmgrpb //src/cloud/scriptmgr/scriptmgrpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/shared/messagespb //src/cloud/shared/messagespb:messages_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/vzconn/vzconnpb //src/cloud/vzconn/vzconnpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/cloud/vzmgr/vzmgrpb //src/cloud/vzmgr/vzmgrpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/common/base/statuspb //src/common/base/statuspb:status_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/e2e_test/protocol_loadtest/grpc/loadtestpb //src/e2e_test/protocol_loadtest/grpc/loadtestpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/shared/artifacts/versionspb //src/shared/artifacts/versionspb:versions_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/shared/bloomfilterpb //src/shared/bloomfilterpb:bloomfilter_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/shared/cvmsgspb //src/shared/cvmsgspb:cvmsgs_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/shared/k8s/metadatapb //src/shared/k8s/metadatapb:metadata_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/shared/metadatapb //src/shared/metadatapb:metadata_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/shared/scriptspb //src/shared/scriptspb:scripts_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/shared/services/jwtpb //src/shared/services/jwtpb:jwt_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/shared/services/testproto //src/shared/services/testproto:ping_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/shared/types/typespb //src/shared/types/typespb:types_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/stirling/source_connectors/dynamic_tracer/dynamic_tracing/ir/logicalpb //src/stirling/source_connectors/dynamic_tracer/dynamic_tracing/ir/logicalpb:logical_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/stirling/source_connectors/socket_tracer/protocols/http2/testing/proto //src/stirling/source_connectors/socket_tracer/protocols/http2/testing/proto:greet_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/stirling/testing/demo_apps/go_grpc_tls_pl/server/greetpb //src/stirling/testing/demo_apps/go_grpc_tls_pl/server/greetpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/stirling/testing/demo_apps/hipster_shop/proto //src/stirling/testing/demo_apps/hipster_shop/proto:demo_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/table_store/schemapb //src/table_store/schemapb:schema_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/vizier/messages/messagespb //src/vizier/messages/messagespb:messages_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/vizier/services/metadata/metadatapb //src/vizier/services/metadata/metadatapb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/vizier/services/metadata/storepb //src/vizier/services/metadata/storepb:store_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/vizier/services/shared/agentpb //src/vizier/services/shared/agentpb:agent_pl_go_proto
#
# gazelle:resolve go px.dev/pixie/experimental/stirling/proto_data_model/proto //experimental/stirling/proto_data_model/proto:http_record_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/e2e_test/perf_tool/backend/sharedpb //src/e2e_test/perf_tool/backend/sharedpb:shared_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/e2e_test/perf_tool/backend/coordinator/coordinatorpb //src/e2e_test/perf_tool/backend/coordinator/coordinatorpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/e2e_test/perf_tool/experimentpb //src/e2e_test/perf_tool/experimentpb:experiment_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/e2e_test/perf_tool/backend/clustermgr/clustermgrpb //src/e2e_test/perf_tool/backend/clustermgr/clustermgrpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/e2e_test/perf_tool/backend/builder/builderpb //src/e2e_test/perf_tool/backend/builder/builderpb:service_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/e2e_test/perf_tool/artifactspb //src/e2e_test/perf_tool/artifactspb:artifacts_pl_go_proto
# gazelle:resolve go px.dev/pixie/src/e2e_test/perf_tool/backend/runner/runnerpb //src/e2e_test/perf_tool/backend/runner/runnerpb:service_pl_go_proto
#
# Make gazelle resolve CGO libraries correctly.
# gazelle:resolve go px.dev/pixie/src/carnot/goplanner //src/carnot/goplanner:go_default_library
# gazelle:resolve go px.dev/pixie/src/e2e_test/vizier/planner/dump_schemas/godumpschemas //src/e2e_test/vizier/planner/dump_schemas/godumpschemas:godumpschemas
# gazelle:map_kind go_binary pl_go_binary //bazel:pl_build_system.bzl
# gazelle:map_kind go_test pl_go_test //bazel:pl_build_system.bzl
buildifier(
name = "buildifier",
exclude_patterns = [
"./third_party/**/*",
],
lint_mode = "fix",
lint_warnings = ["all"],
)
pl_cc_base_packages = [
packages["libc6"],
packages["libelf1"],
packages["liblzma5"],
packages["libtinfo6"],
packages["libunwind8"],
packages["zlib1g"],
]
# These filegroups aren't strictly necessary but nice to avoid the extra @*_model//file:, in any other rules that want
# to use these files.
filegroup(
name = "sentencepiece.proto",
srcs = ["@sentencepiece_model//file:sentencepiece.proto"],
visibility = ["//visibility:public"],
)
filegroup(
name = "embedding.proto",
srcs = ["@embedding_model//file:embedding.proto"],
visibility = ["//visibility:public"],
)
container_image(
name = "pl_go_base_image",
base = "@base_image//image",
debs = pl_cc_base_packages,
visibility = ["//visibility:public"],
)
container_image(
name = "pl_cc_base_image",
base = "@base_image//image",
debs = pl_cc_base_packages,
files = [
"//:embedding.proto",
"//:sentencepiece.proto",
],
visibility = ["//visibility:public"],
)
container_image(
name = "pl_cc_base_debug_image",
base = "@base_image_debug//image",
debs = pl_cc_base_packages,
files = [
"//:embedding.proto",
"//:sentencepiece.proto",
],
visibility = ["//visibility:public"],
)
alias(
name = "llvm",
actual = select({
"//bazel:use_libcpp": "@com_llvm_lib_libcpp//:llvm",
"//conditions:default": "@com_llvm_lib//:llvm",
}),
visibility = ["//visibility:public"],
)
list_pl_deps(
name = "pl_3p_deps",
)
filegroup(
name = "pl_3p_go_sum",
srcs = ["go.sum"],
visibility = ["//visibility:public"],
)