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

Creating a no exceptions build for Envoy Mobile. #29840

Merged
merged 3 commits into from
Oct 19, 2023

Conversation

alyssawilk
Copy link
Contributor

@alyssawilk alyssawilk commented Sep 27, 2023

The initial passes of this were over 100 files of workarounds to build

bazel build --config=remote --define=admin_html=disabled --define=admin_functionality=disabled --define envoy_exceptions=disabled --define envoy_mobile_listener=disabled --define=envoy_yaml=disabled //test/performance:test_binary_size --copt=-fno-unwind-tables --copt=-fno-exceptions

Now we're in the low 70 files, but there's still work todo (see TODO). Landing now as E-M already panics on bad config, and we want to see what the binary size impact is for our E-M usage.

I will continue working on envoyproxy/envoy-mobile#176 to do proper error handling with the end goal of removing this macro.

Risk Level: low
Testing: n/a
Docs Changes:
Release Notes:
envoyproxy/envoy-mobile#176

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #29840 was opened by alyssawilk.

see: more, trace.

@alyssawilk alyssawilk force-pushed the no_exceptions_build branch 7 times, most recently from 1412fbd to ab7c117 Compare October 4, 2023 18:01
@alyssawilk alyssawilk force-pushed the no_exceptions_build branch 2 times, most recently from 5d7f22b to 4ab63d8 Compare October 5, 2023 12:58
@alyssawilk alyssawilk force-pushed the no_exceptions_build branch 10 times, most recently from 63ffdc1 to 6021f9b Compare October 12, 2023 14:34
The initial passes of this were over 100 files of workarounds to build

bazel build --config=remote --define=admin_html=disabled --define=admin_functionality=disabled --define envoy_exceptions=disabled --define envoy_mobile_listener=disabled  --define=envoy_yaml=disabled  //test/performance:test_binary_size --copt=-fno-unwind-tables --copt=-fno-exceptions

Now we're in the low 70 files, but there's still work todo (see TODO).
Landing now as E-M already panics on bad config, and we want to see what
the binary size impact is for our E-M usage.

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
@alyssawilk alyssawilk marked this pull request as ready for review October 16, 2023 17:44
Copy link
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

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

Wow, looks great. Mostly mechanical. Woo hoo

#ifdef ENVOY_DISABLE_EXCEPTIONS
PANIC(error);
#else
throw SocketBindException(error, result.errno_);
Copy link
Contributor

Choose a reason for hiding this comment

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

This can't use throwExceptionOrPanic() because this exception type's constructor is special?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I tried to normalize the constructor like I did elsewhere but it turns out we use the errno in tests to keep listening on random ports until we get one that works so it's non-trivial

@alyssawilk
Copy link
Contributor Author

Also tagging a !google !EM reviewer :-)

@alyssawilk
Copy link
Contributor Author

/retest

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Copy link
Member

@zuercher zuercher left a comment

Choose a reason for hiding this comment

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

lgtm

@alyssawilk alyssawilk merged commit 63499de into envoyproxy:main Oct 19, 2023
99 of 103 checks passed
@alyssawilk alyssawilk deleted the no_exceptions_build branch March 19, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants