Revert "Enable GRPC_ERROR_IS_ABSEIL_STATUS (#28898)" (#28939)

This reverts commit f00e842609.
pull/28849/head
Craig Tiller 3 years ago committed by GitHub
parent 5a2422f42a
commit 33ec154cee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      BUILD
  2. 4
      bazel/grpc_build_system.bzl
  3. 4
      include/grpc/impl/codegen/port_platform.h
  4. 6
      src/python/grpcio_tests/tests/unit/_rpc_part_1_test.py
  5. 2
      src/ruby/lib/grpc/errors.rb
  6. 7
      tools/internal_ci/linux/grpc_bazel_build_in_docker.sh

@ -143,6 +143,11 @@ config_setting(
values = {"define": "use_strict_warning=true"}, values = {"define": "use_strict_warning=true"},
) )
config_setting(
name = "use_abseil_status",
values = {"define": "use_abseil_status=true"},
)
python_config_settings() python_config_settings()
# This should be updated along with build_handwritten.yaml # This should be updated along with build_handwritten.yaml

@ -177,6 +177,10 @@ def grpc_cc_library(
"//:grpc_allow_exceptions": ["GRPC_ALLOW_EXCEPTIONS=1"], "//:grpc_allow_exceptions": ["GRPC_ALLOW_EXCEPTIONS=1"],
"//:grpc_disallow_exceptions": ["GRPC_ALLOW_EXCEPTIONS=0"], "//:grpc_disallow_exceptions": ["GRPC_ALLOW_EXCEPTIONS=0"],
"//conditions:default": [], "//conditions:default": [],
}) +
select({
"//:use_abseil_status": ["GRPC_ERROR_IS_ABSEIL_STATUS=1"],
"//conditions:default": [],
}), }),
hdrs = hdrs + public_hdrs, hdrs = hdrs + public_hdrs,
deps = deps + _get_external_deps(external_deps), deps = deps + _get_external_deps(external_deps),

@ -51,7 +51,9 @@
/* /*
* Defines GRPC_ERROR_IS_ABSEIL_STATUS to use absl::Status for grpc_error_handle * Defines GRPC_ERROR_IS_ABSEIL_STATUS to use absl::Status for grpc_error_handle
*/ */
#define GRPC_ERROR_IS_ABSEIL_STATUS 1 #ifndef GRPC_ERROR_IS_ABSEIL_STATUS
// #define GRPC_ERROR_IS_ABSEIL_STATUS 1
#endif
/* Get windows.h included everywhere (we need it) */ /* Get windows.h included everywhere (we need it) */
#if defined(_WIN64) || defined(WIN64) || defined(_WIN32) || defined(WIN32) #if defined(_WIN64) || defined(WIN64) || defined(_WIN32) || defined(WIN32)

@ -114,8 +114,10 @@ class RPCPart1Test(BaseRPCTest, unittest.TestCase):
# sanity checks on to make sure returned string contains default members # sanity checks on to make sure returned string contains default members
# of the error # of the error
debug_error_string = exception_context.exception.debug_error_string() debug_error_string = exception_context.exception.debug_error_string()
self.assertIn('grpc_status', debug_error_string) self.assertIn('created', debug_error_string)
self.assertIn('grpc_message', debug_error_string) self.assertIn('description', debug_error_string)
self.assertIn('file', debug_error_string)
self.assertIn('file_line', debug_error_string)
def testFailedUnaryRequestFutureUnaryResponse(self): def testFailedUnaryRequestFutureUnaryResponse(self):
request = b'\x37\x17' request = b'\x37\x17'

@ -43,7 +43,7 @@ module GRPC
debug_error_string = nil) debug_error_string = nil)
exception_message = "#{code}:#{details}" exception_message = "#{code}:#{details}"
if debug_error_string if debug_error_string
exception_message += ". debug_error_string:{#{debug_error_string}}" exception_message += ". debug_error_string:#{debug_error_string}"
end end
super(exception_message) super(exception_message)
@code = code @code = code

@ -38,6 +38,13 @@ bazel build --define=use_strict_warning=true \
//examples/... \ //examples/... \
-//examples/android/binder/... -//examples/android/binder/...
# TODO(veblush): Remove this test after migration to abseil-status is done.
bazel build --define=use_strict_warning=true --define=use_abseil_status=true \
-- \
//src/core/... \
//src/compiler/... \
//test/...
# TODO(jtattersmusch): Adding a build here for --define=grpc_no_xds is not ideal # TODO(jtattersmusch): Adding a build here for --define=grpc_no_xds is not ideal
# and we should find a better place for this. Refer # and we should find a better place for this. Refer
# https://github.com/grpc/grpc/pull/24536#pullrequestreview-517466531 for more # https://github.com/grpc/grpc/pull/24536#pullrequestreview-517466531 for more

Loading…
Cancel
Save