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

envoy 1.33.0 #205269

Merged
merged 2 commits into from
Jan 28, 2025
Merged
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
54 changes: 38 additions & 16 deletions Formula/e/envoy.rb
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
class Envoy < Formula
desc "Cloud-native high-performance edge/middle/service proxy"
homepage "https://www.envoyproxy.io/index.html"
url "https://github.com/envoyproxy/envoy/archive/refs/tags/v1.31.0.tar.gz"
sha256 "39ba37aed81a9d4988a5736cf558243179f2bf1490843da25687d1aafd9d01c6"
license "Apache-2.0"
head "https://github.com/envoyproxy/envoy.git", branch: "main"

stable do
url "https://github.com/envoyproxy/envoy/archive/refs/tags/v1.33.0.tar.gz"
sha256 "fd726135761ea163f0312d49960c602c9b4fcb78ca3c36600975fed16e0787c4"

# Backport disabling libcurl docs to fix build. Remove in the next release.
patch do
url "https://github.com/envoyproxy/envoy/commit/ae6cb3254cbf98999993d0120d289a207a57f825.patch?full_index=1"
sha256 "a5c25bad6884f382909036ac9e8c812c5d3ba3104f2f1d24f5035acf705b0d74"
end
end

livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end

bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "eafef893f82016ef51251355c42413d7b8a53460793f44222d9845ab7bcfafd3"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "e91a2e11066c3a0c871fa0d94153fe260d71c12ba7db9ea175b19e960e09d002"
sha256 cellar: :any_skip_relocation, arm64_ventura: "cc2137c9981786830eb65cac9ed6807bfd6a8eebe7764d59a7f621eef4999b9c"
sha256 cellar: :any_skip_relocation, arm64_monterey: "af3de81847a5dc7704ac8d2e7e9b2a320653f362f7824e34aa631675ba1983a3"
sha256 cellar: :any_skip_relocation, sonoma: "878b3d9a46bba9394b6f2b9b910e83d28ea262bcae3cb5ef4eb6dfb29d7c3c5b"
sha256 cellar: :any_skip_relocation, ventura: "a14f5d3f5fef1b495018c639958ec1a5f1737de63f17034e097c92e3b3db9f7f"
sha256 cellar: :any_skip_relocation, monterey: "cd1124efc8af189735d10f2cc4d0a66230905ad5ba2d4c6b7ac02ea544e260be"
sha256 cellar: :any_skip_relocation, x86_64_linux: "3b255d9a8e2d3a99ca8049bac12ba2a094a5b21d7685f77b69b8435914f97ab4"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "691cd0a607d8d87f7dfa64976aedcd779d2061d94d0b88b2253f98cfdc898f33"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "494f6f9f2e19abfef167a8c16d6e37a2365046f3a11d798f35dcdc8d4f449760"
sha256 cellar: :any_skip_relocation, arm64_ventura: "ae500a19266c143b27ab88c463a923919692b2767d235bfad61c1f51a37e6a51"
sha256 cellar: :any_skip_relocation, sonoma: "9fc6ababc39170ab0e175cf542955f95e5f927bdcfc53098c1048467847bf388"
sha256 cellar: :any_skip_relocation, ventura: "6e134fd52fad3fdec6293dac2135003ba3e458f0b2737ad16d4a6e544d43eeef"
sha256 cellar: :any_skip_relocation, x86_64_linux: "b56276639ae42c6de00e30caf68e8c29d79565b0cee17a477b1f03ee680ec23d"
end

depends_on "automake" => :build
Expand All @@ -39,6 +46,10 @@ class Envoy < Formula
depends_on "coreutils" => :build
end

on_linux do
depends_on "lld" => :build
end

# https://github.com/envoyproxy/envoy/tree/main/bazel#supported-compiler-versions
# GCC/ld.gold had some issues while building envoy 1.29 so use clang/lld instead
fails_with :gcc
Expand All @@ -51,21 +62,32 @@ def install
--verbose_failures
--action_env=PATH=#{env_path}
--host_action_env=PATH=#{env_path}
--define=wasm=disabled
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this means wasm was totally disabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe @mathetake can clarify, but iirc before it wasn't built on Darwin and now (here in this formula) also in linux

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasm=v8 can be restored but Homebrew needs a backport of v8/v8@c814d86 (specifically we need -Wno-cast-function-type-mismatch for Clang 19) in a Bazel-applied patch file like https://github.com/envoyproxy/envoy/blob/main/bazel/v8.patch

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are currently working on updating llvm in envoy - current target is 18.x, but would be happy to review any fixes to make 19+ work

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Homebrew needs a backport

apologies i just read your comment properly

i think we would be less inclined to backport fixes for this to other branches in envoy - simply because there are a bunch of known issues that would need to be addressed to make earlier branches work with llvm > 14

Copy link
Member

@cho-m cho-m Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backport patch for v8 code base.

To be specific, it may be something like:

diff --git a/bazel/v8.patch b/bazel/v8.patch
index 2d7101db91..32de7740c6 100644
--- a/bazel/v8.patch
+++ b/bazel/v8.patch
@@ -103,3 +103,15 @@ index c3768b8..d4a1dda 100755
  import pdl

  try:
+diff --git a/bazel/defs.bzl b/bazel/defs.bzl
+index e957c0f..a5d142c 100644
+--- a/bazel/defs.bzl
++++ b/bazel/defs.bzl
+@@ -104,6 +104,7 @@ def _default_args():
+                 "-Werror",
+                 "-Wextra",
+                 "-Wno-unknown-warning-option",
++                "-Wno-cast-function-type-mismatch",
+                 "-Wno-bitwise-instead-of-logical",
+                 "-Wno-builtin-assume-aligned-alignment",
+                 "-Wno-unused-parameter",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for those following along, when you discuss possibility of restoring with some backport, etc. work, you are referring to restoring linux only, or also macOS?

]

# GCC/ld.gold had some issues while building envoy so use clang/lld instead
args << "--config=clang" if OS.linux?
if OS.linux?
# GCC/ld.gold had some issues while building envoy so use clang/lld instead
args << "--config=clang"

# clang 18 introduced stricter thread safety analysis. Remove once release that supports clang 18
# https://github.com/envoyproxy/envoy/issues/37911
args << "--copt=-Wno-thread-safety-reference-return"

# clang 18 introduced stricter thread safety analysis
# https://github.com/envoyproxy/envoy/issues/34233
args << "--copt=-Wno-thread-safety-reference-return" if DevelopmentTools.clang_version >= 18
# Workaround to build with Clang 19 until envoy uses newer tcmalloc
# https://github.com/google/tcmalloc/commit/a37da0243b83bd2a7b1b53c187efd4fbf46e6e38
args << "--copt=-Wno-unused-but-set-variable"

# Workaround to build with Clang 19 until envoy uses newer grpc
# https://github.com/grpc/grpc/commit/e55f69cedd0ef7344e0bcb64b5ec9205e6aa4f04
args << "--copt=-Wno-missing-template-arg-list-after-template-kw"
end

# Write the current version SOURCE_VERSION.
system "python3", "tools/github/write_current_source_version.py", "--skip_error_in_git"

system Formula["bazelisk"].opt_bin/"bazelisk", "build", *args, "//source/exe:envoy-static.stripped"
codefromthecrypt marked this conversation as resolved.
Show resolved Hide resolved
bin.install "bazel-bin/source/exe/envoy-static.stripped" => "envoy"
pkgshare.install "configs", "examples"
pkgshare.install "configs"
end

test do
Expand Down
Loading