Revert "Enable GRPC_ERROR_IS_ABSEIL_STATUS (#29869)" (#30031)

This reverts commit c6058b5e6b.
pull/30033/head
Esun Kim 3 years ago committed by GitHub
parent ab1a23e64e
commit 2d0d1775a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      BUILD
  2. 2
      bazel/grpc_build_system.bzl
  3. 7
      include/grpc/impl/codegen/port_platform.h
  4. 2
      src/core/ext/filters/client_channel/backup_poller.cc
  5. 2
      src/core/ext/filters/client_channel/dynamic_filters.cc
  6. 1
      src/core/ext/filters/deadline/deadline_filter.cc
  7. 1
      src/core/ext/filters/http/message_compress/message_compress_filter.cc
  8. 1
      src/core/ext/filters/http/message_compress/message_decompress_filter.cc
  9. 1
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc
  10. 2
      src/core/ext/transport/chttp2/transport/flow_control.h
  11. 1
      src/core/ext/transport/chttp2/transport/frame_data.cc
  12. 1
      src/core/ext/transport/chttp2/transport/hpack_parser.cc
  13. 1
      src/core/ext/transport/chttp2/transport/parsing.cc
  14. 1
      src/core/ext/transport/cronet/transport/cronet_transport.cc
  15. 1
      src/core/lib/surface/completion_queue.cc
  16. 2
      src/core/lib/transport/byte_stream.cc
  17. 8
      src/core/lib/transport/error_utils.cc
  18. 2
      src/cpp/client/secure_credentials.cc
  19. 6
      src/python/grpcio_tests/tests/unit/_rpc_part_1_test.py
  20. 2
      src/ruby/lib/grpc/errors.rb
  21. 10
      test/cpp/server/server_request_call_test.cc
  22. 2
      tools/internal_ci/linux/grpc_bazel_build_in_docker.sh

15
BUILD

@ -144,8 +144,8 @@ config_setting(
)
config_setting(
name = "disable_use_abseil_status",
values = {"define": "use_abseil_status=false"},
name = "use_abseil_status",
values = {"define": "use_abseil_status=true"},
)
python_config_settings()
@ -2716,7 +2716,6 @@ grpc_cc_library(
"slice_buffer",
"slice_refcount",
"sockaddr_utils",
"status_helper",
"table",
"thread_quota",
"time",
@ -3269,10 +3268,7 @@ grpc_cc_library(
hdrs = [
"src/core/ext/filters/deadline/deadline_filter.h",
],
external_deps = [
"absl/status",
"absl/types:optional",
],
external_deps = ["absl/types:optional"],
language = "c++",
tags = ["grpc-autodeps"],
deps = [
@ -4724,7 +4720,6 @@ grpc_cc_library(
],
external_deps = [
"absl/memory",
"absl/status",
"absl/status:statusor",
"absl/strings",
],
@ -6062,7 +6057,6 @@ grpc_cc_library(
"resource_quota_trace",
"slice",
"slice_refcount",
"status_helper",
"time",
"uri_parser",
"useful",
@ -6286,7 +6280,6 @@ grpc_cc_library(
hdrs = GRPCXX_HDRS,
external_deps = [
"absl/base:core_headers",
"absl/status",
"absl/strings",
"absl/synchronization",
"absl/memory",
@ -6330,7 +6323,6 @@ grpc_cc_library(
hdrs = GRPCXX_HDRS,
external_deps = [
"absl/base:core_headers",
"absl/status",
"absl/strings",
"absl/synchronization",
"absl/memory",
@ -6588,7 +6580,6 @@ grpc_cc_library(
],
external_deps = [
"absl/base:core_headers",
"absl/status",
"absl/time",
"absl/types:optional",
"upb_lib",

@ -178,7 +178,7 @@ def grpc_cc_library(
"//conditions:default": [],
}) +
select({
"//:disable_use_abseil_status": ["GRPC_ERROR_IS_NOT_ABSEIL_STATUS=1"],
"//:use_abseil_status": ["GRPC_ERROR_IS_ABSEIL_STATUS=1"],
"//conditions:default": [],
}),
hdrs = hdrs + public_hdrs,

@ -49,11 +49,10 @@
#endif // GPR_ABSEIL_SYNC
/*
* Defines GRPC_ERROR_IS_NOT_ABSEIL_STATUS to not use absl::Status for
* grpc_error_handle. This is a temporary knob for migration process.
* Defines GRPC_ERROR_IS_ABSEIL_STATUS to use absl::Status for grpc_error_handle
*/
#ifndef GRPC_ERROR_IS_NOT_ABSEIL_STATUS
#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) */

@ -22,8 +22,6 @@
#include <inttypes.h>
#include "absl/status/status.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>

@ -24,8 +24,6 @@
#include <string>
#include <utility>
#include "absl/status/status.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>

@ -20,7 +20,6 @@
#include <new>
#include "absl/status/status.h"
#include "absl/types/optional.h"
#include <grpc/status.h>

@ -28,7 +28,6 @@
#include <type_traits>
#include "absl/meta/type_traits.h"
#include "absl/status/status.h"
#include "absl/types/optional.h"
#include <grpc/compression.h>

@ -27,7 +27,6 @@
#include <new>
#include <type_traits>
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/types/optional.h"

@ -65,7 +65,6 @@
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/status_helper.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/combiner.h"

@ -26,8 +26,6 @@
#include <algorithm>
#include "absl/status/status.h"
#include "src/core/ext/transport/chttp2/transport/http2_settings.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/time.h"

@ -23,7 +23,6 @@
#include <string.h>
#include "absl/base/attributes.h"
#include "absl/status/status.h"
#include "absl/strings/str_format.h"
#include <grpc/slice_buffer.h>

@ -31,7 +31,6 @@
#include <utility>
#include "absl/base/attributes.h"
#include "absl/status/status.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"

@ -24,7 +24,6 @@
#include <string>
#include "absl/base/attributes.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"

@ -29,7 +29,6 @@
#include <string>
#include <utility>
#include "absl/status/status.h"
#include "absl/strings/match.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"

@ -29,7 +29,6 @@
#include <utility>
#include <vector>
#include "absl/status/status.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"

@ -23,8 +23,6 @@
#include <memory>
#include <utility>
#include "absl/status/status.h"
#include <grpc/slice_buffer.h>
#include <grpc/support/log.h>

@ -22,18 +22,12 @@
#include <stdint.h>
#include <vector>
#include "absl/strings/string_view.h"
#include <grpc/support/string_util.h>
#include "src/core/lib/gprpp/status_helper.h"
#include "src/core/lib/transport/status_conversion.h"
#ifndef GRPC_ERROR_IS_ABSEIL_STATUS
#include "src/core/lib/iomgr/error_internal.h"
#endif
#include "src/core/lib/transport/status_conversion.h"
static grpc_error_handle recursively_find_error_with_field(
grpc_error_handle error, grpc_error_ints which) {

@ -39,7 +39,7 @@
#include <grpcpp/support/channel_arguments.h>
#include <grpcpp/support/slice.h>
#include <grpcpp/support/status.h>
// TODO(yashykt): We shouldn't be including "src/core" headers.
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"

@ -114,8 +114,10 @@ class RPCPart1Test(BaseRPCTest, unittest.TestCase):
# sanity checks on to make sure returned string contains default members
# of the error
debug_error_string = exception_context.exception.debug_error_string()
self.assertIn('grpc_status', debug_error_string)
self.assertIn('grpc_message', debug_error_string)
self.assertIn('created', 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):
request = b'\x37\x17'

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

@ -135,15 +135,7 @@ TEST(ServerRequestCallTest, ShortDeadlineDoesNotCauseOkayFalse) {
ctx.set_deadline(std::chrono::system_clock::now() +
std::chrono::milliseconds(1));
grpc::Status status = stub->Echo(&ctx, request, &response);
if (i == 0 && status.error_code() == grpc::OK) {
// This first call may take more time to trigger a deadline excceded
// because code needs various initiations so it can get OK instead of
// DEADLINE_EXCEEDED. Server-side delay isn't affected so a call
// would be complete before the client-side deadline timer is fired.
// To prevent this case, OK is also accepted for the first call only.
} else {
EXPECT_EQ(StatusCode::DEADLINE_EXCEEDED, status.error_code());
}
EXPECT_EQ(StatusCode::DEADLINE_EXCEEDED, status.error_code());
gpr_log(GPR_INFO, "Success.");
}
gpr_log(GPR_INFO, "Done sending RPCs.");

@ -35,7 +35,7 @@ python3 tools/run_tests/python_utils/bazel_report_helper.py --report_path bazel_
bazel_build_with_abseil_status/bazel_wrapper \
--bazelrc=tools/remote_build/include/test_locally_with_resultstore_results.bazelrc \
build \
--define=use_strict_warning=true --define=use_abseil_status=false \
--define=use_strict_warning=true --define=use_abseil_status=true \
-- \
//src/core/... \
//src/compiler/... \

Loading…
Cancel
Save