Skip to content
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
926 changes: 525 additions & 401 deletions actions/gcp/setup/requirements.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
module(
name = "grpc-httpjson-transcoding",
version = "0.0.0-20250507-a6e226f.envoy",
compatibility_level = 1,
)

bazel_dep(
name = "abseil-cpp",
version = "20240116.2",
repo_name = "com_google_absl",
)
bazel_dep(
name = "googletest",
version = "1.14.0.bcr.1",
repo_name = "com_google_googletest",
dev_dependency = True,
)
bazel_dep(
name = "google_benchmark",
version = "1.8.3",
repo_name = "com_google_benchmark",
dev_dependency = True,
)
bazel_dep(
name = "nlohmann_json",
version = "3.11.3",
repo_name = "com_github_nlohmann_json",
)
bazel_dep(
name = "proto-converter",
version = "0.0.0-20230607-d77ff30",
repo_name = "com_google_protoconverter",
)
bazel_dep(
name = "protobuf",
version = "26.0.bcr.1",
repo_name = "com_google_protobuf",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
bazel_dep(
name = "rules_fuzzing",
version = "0.5.2",
dev_dependency = True,
)
bazel_dep(
name = "rules_proto",
version = "5.3.0-21.7",
)
bazel_dep(
name = "zlib",
version = "1.2.13",
)

# -- bazel_dep definitions -- #

non_module_deps = use_extension("//:extensions.bzl", "non_module_deps")
use_repo(non_module_deps, "com_google_googleapis")

googleapis_ext = use_extension("//:googleapis_ext.bzl", "googleapis_ext")
use_repo(googleapis_ext, "com_google_googleapis_imports")
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
diff --git a/extensions.bzl b/extensions.bzl
new file mode 100644
index 0000000..8d8228e
--- /dev/null
+++ b/extensions.bzl
@@ -0,0 +1,11 @@
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+def _non_module_deps_impl(_ctx):
+ http_archive(
+ name = "com_google_googleapis",
+ url = "https://github.com/googleapis/googleapis/archive/1d5522ad1056f16a6d593b8f3038d831e64daeea.tar.gz",
+ sha256 = "cd13e547cffaad217c942084fd5ae0985a293d0cce3e788c20796e5e2ea54758",
+ strip_prefix = "googleapis-1d5522ad1056f16a6d593b8f3038d831e64daeea",
+ )
+
+non_module_deps = module_extension(implementation = _non_module_deps_impl)
diff --git a/googleapis_ext.bzl b/googleapis_ext.bzl
new file mode 100644
index 0000000..f3c1e15
--- /dev/null
+++ b/googleapis_ext.bzl
@@ -0,0 +1,6 @@
+load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
+
+googleapis_ext = module_extension(implementation = lambda x: switched_rules_by_language(
+ name = "com_google_googleapis_imports",
+ cc = True,
+))
diff --git a/src/message_reader.cc b/src/message_reader.cc
index 9284551..c8e1d9e 100644
--- a/src/message_reader.cc
+++ b/src/message_reader.cc
@@ -86,7 +86,7 @@ std::unique_ptr<pbio::ZeroCopyInputStream> MessageReader::NextMessage() {
// Check if we have the current message size. If not try to read it.
if (!have_current_message_size_) {
if (in_->BytesAvailable() <
- static_cast<pb::int64>(kGrpcDelimiterByteSize)) {
+ static_cast<int64_t>(kGrpcDelimiterByteSize)) {
// We don't have 5 bytes available to read the length of the message.
// Find out whether the stream is finished and return false.
finished_ = in_->Finished();
@@ -115,7 +115,7 @@ std::unique_ptr<pbio::ZeroCopyInputStream> MessageReader::NextMessage() {
have_current_message_size_ = true;
}

- if (in_->BytesAvailable() < static_cast<pb::int64>(current_message_size_)) {
+ if (in_->BytesAvailable() < static_cast<int64_t>(current_message_size_)) {
if (in_->Finished()) {
status_ = absl::Status(
absl::StatusCode::kInternal,
diff --git a/src/request_stream_translator.cc b/src/request_stream_translator.cc
index ab679cc..176f2d3 100644
--- a/src/request_stream_translator.cc
+++ b/src/request_stream_translator.cc
@@ -172,7 +172,7 @@ RequestStreamTranslator* RequestStreamTranslator::RenderUint32(
}

RequestStreamTranslator* RequestStreamTranslator::RenderInt64(
- absl::string_view name, pb::int64 value) {
+ absl::string_view name, int64_t value) {
RenderData(name, [this, name, value]() {
translator_->Input().RenderInt64(name, value);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
--- a/MODULE.bazel
+++ a/MODULE.bazel
@@ -0,0 +1,63 @@
+module(
+ name = "grpc-httpjson-transcoding",
+ version = "0.0.0-20250507-a6e226f.envoy",
+ compatibility_level = 1,
+)
+
+bazel_dep(
+ name = "abseil-cpp",
+ version = "20240116.2",
+ repo_name = "com_google_absl",
+)
+bazel_dep(
+ name = "googletest",
+ version = "1.14.0.bcr.1",
+ repo_name = "com_google_googletest",
+ dev_dependency = True,
+)
+bazel_dep(
+ name = "google_benchmark",
+ version = "1.8.3",
+ repo_name = "com_google_benchmark",
+ dev_dependency = True,
+)
+bazel_dep(
+ name = "nlohmann_json",
+ version = "3.11.3",
+ repo_name = "com_github_nlohmann_json",
+)
+bazel_dep(
+ name = "proto-converter",
+ version = "0.0.0-20230607-d77ff30",
+ repo_name = "com_google_protoconverter",
+)
+bazel_dep(
+ name = "protobuf",
+ version = "26.0.bcr.1",
+ repo_name = "com_google_protobuf",
+)
+bazel_dep(
+ name = "rules_cc",
+ version = "0.0.9",
+)
+bazel_dep(
+ name = "rules_fuzzing",
+ version = "0.5.2",
+ dev_dependency = True,
+)
+bazel_dep(
+ name = "rules_proto",
+ version = "5.3.0-21.7",
+)
+bazel_dep(
+ name = "zlib",
+ version = "1.2.13",
+)
+
+# -- bazel_dep definitions -- #
+
+non_module_deps = use_extension("//:extensions.bzl", "non_module_deps")
+use_repo(non_module_deps, "com_google_googleapis")
+
+googleapis_ext = use_extension("//:googleapis_ext.bzl", "googleapis_ext")
+use_repo(googleapis_ext, "com_google_googleapis_imports")
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
bazel:
- 7.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- '@grpc-httpjson-transcoding//src/...'
verify_windows_targets:
name: Verify build targets
platform: windows
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=/std:c++17'
- '--host_cxxopt=/std:c++17'
build_targets:
- '@grpc-httpjson-transcoding//src/...'
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/grpc-ecosystem/grpc-httpjson-transcoding/archive/a6e226f9a2e656a973df3ad48f0ee5efacce1a28.tar.gz",
"integrity": "sha256-RdwaYw9RjfIbTgROMrJ8ewKud+9AG0iiDl/94PBwET8=",
"strip_prefix": "grpc-httpjson-transcoding-a6e226f9a2e656a973df3ad48f0ee5efacce1a28",
"patch_strip": 1,
"patches": {
"grpc-httpjson-transcoding.patch": "sha256-Q2uIePDJDjVjiJ3/fUN1YPamsezqOKVtXscHoiOY6So=",
"module_dot_bazel.patch": "sha256-/q6F+0k80j6V3HjWXeLawHaTDeDEPQRYQpsBqYssluo="
}
}
11 changes: 11 additions & 0 deletions bazel-registry/modules/grpc-httpjson-transcoding/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"homepage": "https://github.com/grpc-ecosystem/grpc-httpjson-transcoding",
"maintainers": [],
"repository": [
"github:grpc-ecosystem/grpc-httpjson-transcoding"
],
"versions": [
"0.0.0-20250507-a6e226f.envoy"
],
"yanked_versions": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module(
name = "proto-converter",
version = "0.0.0-20240625-1db7653.envoy",
compatibility_level = 1,
)

bazel_dep(
name = "abseil-cpp",
version = "20240116.2",
repo_name = "com_google_absl",
)
bazel_dep(
name = "bazel_skylib",
version = "1.3.0",
)
bazel_dep(
name = "googletest",
version = "1.13.0",
repo_name = "com_google_googletest",
dev_dependency = True,
)
bazel_dep(
name = "platforms",
version = "0.0.9",
)
bazel_dep(
name = "protobuf",
version = "26.0.bcr.1",
repo_name = "com_google_protobuf",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
bazel_dep(
name = "rules_pkg",
version = "0.7.0",
dev_dependency = True,
)
bazel_dep(
name = "rules_proto",
version = "5.3.0-21.7",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
--- a/MODULE.bazel
+++ a/MODULE.bazel
@@ -0,0 +1,41 @@
+module(
+ name = "proto-converter",
+ version = "0.0.0-20240625-1db7653.envoy",
+ compatibility_level = 1,
+)
+
+bazel_dep(
+ name = "abseil-cpp",
+ version = "20240116.2",
+ repo_name = "com_google_absl",
+)
+bazel_dep(
+ name = "bazel_skylib",
+ version = "1.3.0",
+)
+bazel_dep(
+ name = "googletest",
+ version = "1.13.0",
+ repo_name = "com_google_googletest",
+)
+bazel_dep(
+ name = "platforms",
+ version = "0.0.9",
+)
+bazel_dep(
+ name = "protobuf",
+ version = "26.0.bcr.1",
+ repo_name = "com_google_protobuf",
+)
+bazel_dep(
+ name = "rules_cc",
+ version = "0.0.9",
+)
+bazel_dep(
+ name = "rules_pkg",
+ version = "0.7.0",
+)
+bazel_dep(
+ name = "rules_proto",
+ version = "5.3.0-21.7",
+)
Loading
Loading