Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proto: add sync to help bootstrap dev env easier #7602

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ use_repo(
"com_github_bits_and_blooms_bloom_v3",
"com_github_bojand_ghz",
"com_github_bradfitz_gomemcache",
"com_github_buildbuddy_io_pbsync",
"com_github_buildbuddy_io_tensorflow_proto",
"com_github_buildkite_terminal_to_html_v3",
"com_github_cavaliergopher_cpio",
Expand Down
6 changes: 6 additions & 0 deletions deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,12 @@ def install_go_mod_dependencies(workspace_name = "buildbuddy"):
sum = "h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o=",
version = "v0.0.0-20151223152923-e2c28503fcd0",
)
go_repository(
name = "com_github_buildbuddy_io_pbsync",
importpath = "github.com/buildbuddy-io/pbsync",
sum = "h1:tccXmKISum/I90CZ8EGXwKDkLQkGYKrTIsvKfTR/Kjw=",
version = "v0.0.0-20231219184002-0a821399e654",
)
go_repository(
name = "com_github_buildbuddy_io_tensorflow_proto",
build_directives = [
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ require (
github.com/bits-and-blooms/bloom/v3 v3.7.0
github.com/bojand/ghz v0.120.0
github.com/bradfitz/gomemcache v0.0.0-20230611145640-acc696258285
github.com/buildbuddy-io/pbsync v0.0.0-20231219184002-0a821399e654
github.com/buildbuddy-io/tensorflow-proto v0.0.0-20220908151343-929b41ab4dc6
github.com/buildkite/terminal-to-html/v3 v3.8.0
github.com/cavaliergopher/cpio v1.0.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ github.com/buildbuddy-io/firecracker-go-sdk v0.0.0-20230721-1d5c50b h1:Wx6fPNZOs
github.com/buildbuddy-io/firecracker-go-sdk v0.0.0-20230721-1d5c50b/go.mod h1:pcsIXRGgbFGr9QtUdlQCP/z6tuB7EMw6zXgFkcu7Q0c=
github.com/buildbuddy-io/kythe v0.0.72 h1:fga2YWn6WRkXuxnoXMj6/fxXZqsoVOkmW4tUpT/VcJY=
github.com/buildbuddy-io/kythe v0.0.72/go.mod h1:B841wxhIxy3xKwSgja69/VG87060EVNB5VxEu1JwcQk=
github.com/buildbuddy-io/pbsync v0.0.0-20231219184002-0a821399e654 h1:tccXmKISum/I90CZ8EGXwKDkLQkGYKrTIsvKfTR/Kjw=
github.com/buildbuddy-io/pbsync v0.0.0-20231219184002-0a821399e654/go.mod h1:ea23KAYOjOJBGJA4TeymzU15Nw8AjCecsttfIzl6w1w=
github.com/buildbuddy-io/soci-snapshotter v0.7.0-buildbuddy h1:WUJzYHmDlfHdi5MuEb+pAUFhRDRi3GhO9x3Vc6gk6PQ=
github.com/buildbuddy-io/soci-snapshotter v0.7.0-buildbuddy/go.mod h1:x83QdIYFKTJQuyXL9f3eMRpSYkQX0Y/c+RYLPLaLsAo=
github.com/buildbuddy-io/tensorflow-proto v0.0.0-20220908151343-929b41ab4dc6 h1:LcKnQdAYrT3LOZt0mTgw6uiEi7QVkH75cCxPj+AbkLA=
Expand Down
168 changes: 168 additions & 0 deletions proto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,174 @@ load(":defs.bzl", "ts_proto_library")

package(default_visibility = ["//visibility:public"])

genrule(
name = "sync",
srcs = [
"@com_github_buildbuddy_io_pbsync//:pbsync",
# bazel query 'kind("(_proto|js)_library", proto/...)' | sort
"//proto/api/v1:api_v1_go_proto",
"//proto/api/v1:common_go_proto",
"//proto/api/v1:common_ts_proto",
"//proto/jaeger:jaeger_go_proto",
"//proto:acl_go_proto",
"//proto:acl_ts_proto",
"//proto:action_cache_go_proto",
"//proto:action_cache_ts_proto",
"//proto:any_ts_proto",
"//proto:api_key_go_proto",
"//proto:api_key_ts_proto",
"//proto:auditlog_go_proto",
"//proto:auditlog_ts_proto",
"//proto:auth_go_proto",
"//proto:bazel_config_go_proto",
"//proto:bazel_config_ts_proto",
"//proto:bazel_query_go_proto",
"//proto:build_event_stream_go_proto",
"//proto:build_event_stream_ts_proto",
"//proto:build_events_go_proto",
"//proto:build_status_go_proto",
"//proto:build_status_ts_proto",
"//proto:buildbuddy_service_go_proto",
"//proto:buildbuddy_service_ts_proto",
"//proto:cache_go_proto",
"//proto:cache_ts_proto",
"//proto:certgenerator_go_proto",
"//proto:codesearch_service_go_proto",
"//proto:command_line_go_proto",
"//proto:command_line_ts_proto",
"//proto:config_go_proto",
"//proto:config_ts_proto",
"//proto:context_go_proto",
"//proto:context_ts_proto",
"//proto:descriptor_ts_proto",
"//proto:distributed_cache_go_proto",
"//proto:duration_ts_proto",
"//proto:empty_ts_proto",
"//proto:encryption_go_proto",
"//proto:encryption_ts_proto",
"//proto:eventlog_go_proto",
"//proto:eventlog_ts_proto",
"//proto:execution_graph_ts_proto",
"//proto:execution_stats_go_proto",
"//proto:execution_stats_ts_proto",
"//proto:failure_details_go_proto",
"//proto:failure_details_ts_proto",
"//proto:field_mask_ts_proto",
"//proto:firecracker_go_proto",
"//proto:firecracker_ts_proto",
"//proto:gcp_go_proto",
"//proto:gcp_ts_proto",
"//proto:git_go_proto",
"//proto:git_ts_proto",
"//proto:github_go_proto",
"//proto:github_ts_proto",
"//proto:google_api_annotations_ts_proto",
"//proto:google_longrunning_ts_proto",
"//proto:group_go_proto",
"//proto:group_ts_proto",
"//proto:grpc_code_ts_proto",
"//proto:grpc_error_details_ts_proto",
"//proto:grpc_status_ts_proto",
"//proto:index_go_proto",
"//proto:invocation_go_proto",
"//proto:invocation_policy_go_proto",
"//proto:invocation_policy_ts_proto",
"//proto:invocation_status_go_proto",
"//proto:invocation_status_ts_proto",
"//proto:invocation_ts_proto",
"//proto:iprules_go_proto",
"//proto:iprules_ts_proto",
"//proto:kythe_common_ts_proto",
"//proto:kythe_filetree_ts_proto",
"//proto:kythe_graph_ts_proto",
"//proto:kythe_identifier_ts_proto",
"//proto:kythe_service_go_proto",
"//proto:kythe_xref_ts_proto",
"//proto:metrics_go_proto",
"//proto:option_filters_go_proto",
"//proto:option_filters_ts_proto",
"//proto:package_load_metrics_go_proto",
"//proto:package_load_metrics_ts_proto",
"//proto:pagination_go_proto",
"//proto:ping_service_go_proto",
"//proto:prometheus_client_go_proto",
"//proto:publish_build_event_go_proto",
"//proto:quota_go_proto",
"//proto:quota_ts_proto",
"//proto:raft_go_proto",
"//proto:raft_service_go_proto",
"//proto:registry_go_proto",
"//proto:remote_asset_go_proto",
"//proto:remote_execution_go_proto",
"//proto:remote_execution_log_go_proto",
"//proto:remote_execution_ts_proto",
"//proto:repo_go_proto",
"//proto:repo_ts_proto",
"//proto:resource_go_proto",
"//proto:resource_ts_proto",
"//proto:runner_go_proto",
"//proto:runner_ts_proto",
"//proto:scheduler_go_proto",
"//proto:scheduler_ts_proto",
"//proto:search_go_proto",
"//proto:search_ts_proto",
"//proto:secrets_go_proto",
"//proto:secrets_ts_proto",
"//proto:semver_go_proto",
"//proto:semver_ts_proto",
"//proto:server_notification_go_proto",
"//proto:server_notification_ts_proto",
"//proto:sidecar_go_proto",
"//proto:soci_go_proto",
"//proto:spawn_diff_go_proto",
"//proto:spawn_go_proto",
"//proto:spawn_ts_proto",
"//proto:stat_filter_go_proto",
"//proto:stat_filter_ts_proto",
"//proto:stats_go_proto",
"//proto:stats_ts_proto",
"//proto:stored_invocation_go_proto",
"//proto:strategy_policy_go_proto",
"//proto:strategy_policy_ts_proto",
"//proto:suggestion_go_proto",
"//proto:suggestion_ts_proto",
"//proto:target_go_proto",
"//proto:target_pagination_go_proto",
"//proto:target_ts_proto",
"//proto:telemetry_go_proto",
"//proto:timestamp_ts_proto",
"//proto:trace_go_proto",
"//proto:trace_ts_proto",
"//proto:usage_go_proto",
"//proto:usage_ts_proto",
"//proto:user_go_proto",
"//proto:user_id_go_proto",
"//proto:user_id_ts_proto",
"//proto:user_ts_proto",
"//proto:vfs_go_proto",
"//proto:vmexec_go_proto",
"//proto:vmvfs_go_proto",
"//proto:vtproto_ts_proto",
"//proto:worker_go_proto",
"//proto:workflow_go_proto",
"//proto:workflow_ts_proto",
"//proto:workspace_go_proto",
"//proto:workspace_ts_proto",
"//proto:wrappers_ts_proto",
"//proto:zip_go_proto",
"//proto:zip_ts_proto",
],
outs = ["sync.sh"],
cmd = """cat > $@ <<'EOF'
#!/bin/bash -e
(
cd $$BUILD_WORKSPACE_DIRECTORY
$(location @com_github_buildbuddy_io_pbsync//:pbsync)
)
""",
executable = True,
)

go_proto_compiler(
name = "vtprotobuf_compiler",
# marshal depends on size. Pool only generates code for messages with the
Expand Down
3 changes: 3 additions & 0 deletions tools/deps/deps.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ import (

// Used by cli/explain/compactgraph/testdata/generate to generate test data.
_ "github.com/otiai10/copy"

// Used to sync proto codegen to current workspace for development
_ "github.com/buildbuddy-io/pbsync"
)
Loading