Commit Graph

655 Commits

Author SHA1 Message Date
Mark D. Roth 0611f7c9b3
Revert "centralize handling of channel's default authority (#27544)" (#27616)
This reverts commit f0a0628795.
2021-10-06 07:26:24 -07:00
Mark D. Roth f0a0628795
centralize handling of channel's default authority (#27544)
* centralize handling of channel's default authority

* clang-format

* fix backup poller bug
2021-10-05 11:57:47 -07:00
Denny C. Dai 251274022c
Revert "Revert "[objc] Turn on error exit in cocoapod pre-install (#27474)" (#27497)" (#27500)
This reverts commit 044253e5bd.
2021-09-29 14:12:28 -07:00
Craig Tiller 91a2db9bc2
Make deadline the first metadata trait (#27468) 2021-09-28 10:09:04 -07:00
Denny C. Dai 044253e5bd
Revert "[objc] Turn on error exit in cocoapod pre-install (#27474)" (#27497)
This reverts commit c3759da7cc.
2021-09-27 18:12:36 -07:00
Craig Tiller 9b41852a5e
channel_init --> core configuration system (#27347)
* channel_init --> core configuration system

* Automated change: Fix sanity tests

* fixes

* Automated change: Fix sanity tests

* fixes

* fixes

* eliminate grpc_base_c

* fixes

* fix merge

* fix

* update visibility

* fixes

* feedback

* fix comment

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-27 15:51:39 -07:00
Denny C. Dai c3759da7cc
[objc] Turn on error exit in cocoapod pre-install (#27474)
This enforces entire script to exit with error if any of the
pre-install command fails. The error exit marks the pod install
as failure and therefore prompting user's immediate attention.

Previoulsy pre-install script might siliently fail partially and
left corrupted cocoapod cahce which causes a number of build issues
during version upgrade
2021-09-27 15:15:16 -07:00
Craig Tiller c5172a134e
Fix build splitup for slices. (#27452)
* slice fix

* fix properlike

* Automated change: Fix sanity tests

* actually delete the code that should have been

* fixes

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-23 16:36:43 -07:00
Craig Tiller d4407b7e59
Revert "Remove dead code (#27445)" (#27461)
This reverts commit 693f36f91c.
2021-09-23 12:56:40 -07:00
Craig Tiller 693f36f91c
Remove dead code (#27445)
* Remove dead code

* Automated change: Fix sanity tests

* build

* remove benchmark

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-22 19:31:00 -07:00
Craig Tiller 66ae0d5c08
Separate slices from mdelems for static data (#27372)
* separate slice into internal and refcount, with refcount being the minimal base

* python3-ize

* Separate slices from mdelems for static data

Allows us to separate a small build target with just some slice basics
from the rest, which will help simplify the build system longer term.

Additionally exposed an opportunity to eliminate an init function.

Should also help in a month or so when it's time to jettison interned
metadata and slices entirely.

* fix compilation

* Automated change: Fix sanity tests

* fixes

* fixfixfix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-21 17:27:54 -07:00
donnadionne b9a997be11
Bump version to v1.41.0 (#27370)
* Bump version to v1.41.x

* Regenerate projects
2021-09-16 16:32:34 -07:00
Craig Tiller 999e36fb31
Rebuild HPACK encoder table as C++ (#27192)
* Rebuild HPACK encoder table as C++

* move comment

* incguards

* build

* Automated change: Fix sanity tests

* c++ initialization ftw

* Automated change: Fix sanity tests

* Add missing header

* Add missing header

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-09-02 14:55:33 -07:00
AJ Heller 2d16865693
Delete libuv-iomgr implementation and GRPC_UV build option (#27188)
This has been unmaintained for years, last supported in gRPC-core v1.24.
2021-08-31 13:26:43 -07:00
Craig Tiller f2f60f7716
Revert "Implement TraceFlag::Log (#26954)" (#27145)
This reverts commit 4d2b979b75.
2021-08-26 09:18:45 -07:00
Ashitha Santhosh 1ff1f8fd83
SDK authorization filter. (#26468)
* SDK authorization filter.
2021-08-25 21:00:35 -07:00
AJ Heller 4d2b979b75
Implement TraceFlag::Log (#26954)
Motivation: In debug builds, `DebugOnlyTraceFlag`s are hard-coded to be
disabled. This results in unreachable code paths that the compiler can
detect, which prevent us from enabling `-Wunreachable-code-aggressive`
on the builds.

This work aims to reduce the number of places that switch on
`trace_flag.enabled`.
2021-08-24 09:42:09 -07:00
Nicolas 'Pixel' Noble 69661fb82e Regenerate projects 2021-08-21 02:04:00 -07:00
Craig Tiller 59da7bc42a
Eliminate grpc_core::Atomic (#27025)
* Eliminate grpc_core::Atomic

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests

* initialize things

* fix include order

* fix

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: Mark D. Roth <roth@google.com>
2021-08-19 20:54:55 -07:00
Craig Tiller 4c8a0d91c6
Call into plugin registry from config code (#27041)
* Call into plugin registry from config code

* Automated change: Fix sanity tests

* Remove unused name

* Remove unused name

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-18 08:39:08 -07:00
Craig Tiller 5dc93179eb
modernize % encoding routines (#27018)
* modernize % encoding routines

* Automated change: Fix sanity tests

* use bitset

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-16 11:16:18 -07:00
Craig Tiller 152b79144c
Extract HPACK Encoder Hash Map to a separate file (#26973)
* comments

* Extract hash map from hpack encoder

* Automated change: Fix sanity tests

* x

* x

* Automated change: Fix sanity tests

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-13 13:08:24 -07:00
Craig Tiller bbea27de46
Reland HPACK parsing changes (#26997)
* Revert "Revert "HPACK Table --> C++ (#26851)" (#26995)"

This reverts commit 840bcce9c4.

* fix bad parsing of trailing === in binary metadata
2021-08-13 10:57:42 -07:00
Craig Tiller 840bcce9c4
Revert "HPACK Table --> C++ (#26851)" (#26995)
This reverts commit 83bcb0cf2e.
2021-08-12 11:20:19 -07:00
Tamir Duberstein 00c03c55ff
Implement type safety for TLS (#26942)
* Implement type safety for TLS

This is mostly free when compiler support is available, but requires
careful templating when implemented using pthread.

Significantly slimmed the tls.h interface; it now only defines the "TLS
keyword" for each supported compiler, delegating enforcement of correct
usage (i.e. must be static) to the compiler itself.

Implemented implicit conversion for the pthread wrapper so it can be
used (mostly) the same as native support. Notable exception to this is
that static_cast<void*> is needed when printing a pointer stored in TLS
as %p.

* Use GPR_THREAD_LOCAL macros consistently
2021-08-11 13:24:26 -07:00
Craig Tiller 83bcb0cf2e
HPACK Table --> C++ (#26851)
* Buffer HPACK parsing until the end of a header boundary

HTTP2 headers are sent in (potentially) many frames, but all must be
sent sequentially with no traffic intervening.

This was not clear when I wrote the HPACK parser, and still indeed quite
contentious on the HTTP2 mailing lists.

Now that matter is well settled (years ago!) take advantage of the fact
by delaying parsing until all bytes are available.

A future change will leverage this to avoid having to store and verify
partial parse state, completely eliminating indirect calls within the
parser.

* maybe fixes

* xx

* fix boundary detection

* clang-format

* Revert "xx"

This reverts commit 258d712ed3.

* fix tests

* add missed check

* fixes

* fix

* update tests

* fix benchmark

* properly unref

* optimize final slice refcounting

* cleanup bm_chttp2_hpack

* start

* new parser progress

* refinement

* get it compiling

* bug-fix

* build files

* clang-tidy

* fixes

* fixes

* fixes

* fix-leaks

* clang-tidy

* comments

* fix merge error

* Revert "Buffer HPACK parsing until the end of a header boundary (#26700)"

This reverts commit 8bab3e4bf4.

* streaming hpack parser start

* streaming parser

* clang-format

* Rework HPackTable into C++

* clang-tidy

* fix merge

* actually set the size of the entries array

* better
2021-08-09 16:07:41 -07:00
Craig Tiller 58d3161aac
Split the filter popularity counting into a separate module (#26884)
* split hpack encoder filter into a separate class

* chores

* fix

* Automated change: Fix sanity tests

* include guards

* add suppressions

* Update popularity_count_test.cc

Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2021-08-09 10:16:46 -07:00
Craig Tiller cee1bf8532
Add construct/destruct helper functions (#26906)
* Add construct/destruct helper functions

Will be used in upcoming promise implementation

* sanitized
2021-08-06 10:35:50 -07:00
Esun Kim 7ccb55ea73
Upb upgrade to the lastest (#26869)
* Squashed 'third_party/upb/' changes from 60607da72e..2de300726a

2de300726a Merge pull request #401 from philwo/patch-1
0010bd88ff Merge pull request #403 from haberman/google-wyhash
3f7ecfe315 A few fixes in the 32-bit fallback.
2c14e2788d Added #include for Windows instrinsic.
9e618009ec Removed some extraneous whitespace.
c4744c0b21 Updated generated files.
039975556d Merge branch 'master' into google-wyhash
ff9d011f12 Merge pull request #402 from haberman/update-ads-benchmark
c2f2e93990 Fix Bazel at 4.1.0
41bfbca375 Updated ads benchmark to v7 as v5 no longer exists upstream.
91d506ac32 Ported ABSL's wyhash to C.
3328f06117 Remove ubuntu1604 from presubmit.yml
f925acf5f0 Merge pull request #400 from haberman/extreg
897bd2500a Fixed compile error.
6e53de4a03 Addressed PR comments.
cdd6434a31 Introduced upb_extreg and plumbed it into decoder.
69f186bd75 Merge pull request #399 from haberman/msg-extrep
3f8aa6ef20 Define the extension representation in messages and mini-tables.
4ccfab154b Merge pull request #398 from haberman/field-mode
58e158c6fa Changed mini-table to use a custom "mode" instead of descriptor's "label."
7596fa740f Merge pull request #397 from haberman/codegen-refactor
fa4dfc2baa Addressed PR comments.
0fb61eaeb5 Refactored the codegen into smaller functions, in anticipation of extensions.
52be845c39 Merge pull request #396 from haberman/pre-ext-opt
807e7fe9e2 Fixed dense_below logic to be order-independent and consistent between def.c and codegen.
2e8a122fc0 Changed dense_below calculation to use UINT8_MAX as the constant.
6394894b6e Addressed PR comments.
65d7b8ab0c Optimized decoder and paved the way for parsing extensions.
3e035cb553 Merge pull request #395 from haberman/locale
e8ba2a1899 Added a fix for locales that output ',' as decimal separator.
7010a73828 Merge pull request #394 from haberman/file-uniqueness
9482957425 Enforce that filenames are unique when loaded into symtab.
aaad7801bf Merge pull request #393 from haberman/has-attribute
7887dc0c76 Fixed the __has_attribute() check for old versions of Clang.
01e7436ed3 Merge pull request #390 from haberman/musttail
4132034634 Addressed PR comment.
ed708fcd5d Addressed PR comments.
876abae2db Removed some debug printing and simplified checktag slightly.
286441afa7 Fixed a size regression due to inlining UTF-8 verification.
75df4cdaa3 Loosened the check for fasttable to match what we did before.
e84793dd73 Cleaned up debugging artifacts.
a4b35aa388 Everything passes except 4 conformance tests.
6e10b5789d Removed redundant license from port_def in amalgmation.
4f1e48ecc6 Updated amalgamator to avoid duplicating license blocks.
0723bfa700 Merge pull request #387 from haberman/json-null
dda5416569 Update bazel-skylib main branch name.
2fa52e6951 Merge branch 'master' into json-null
a3126b7c7e Merge pull request #388 from haberman/fix-macos
b344a6c582 Fixed the macOS build for XCode 11.3.
a778f2639a Only perform multiple oneof check for non-null fields.
42bdfcb849 Fix BUILD file.
75d6dab37a Merge pull request #384 from haberman/internal
3881393907 Renamed .int.h to _internal.h, for greater clarity.
5084cbe646 Merge pull request #383 from fowles/master
da4b75b979 Fix build rules for more restrive deps checks
a8f9cf54cf Merge pull request #382 from haberman/license-headers
1ba446ccfe Updated Google, Inc. to Google LLC.
823eb09694 Update all 2011 dates to 2021.
ff89277ef0 Merge pull request #380 from fowles/master
5f74d43cf9 Re-add some comment text that was accidentally removed.
0f27b0450a Merge branch 'master' into license-headers
e59d2c8fa7 Added license headers to all files.
be4f64b926 Merge pull request #381 from haberman/mv-msg-public
1674f28dd7 Put public message interface into msg.h and moved internal functions to msg.int.h.
6481f6319e Spell out deps explicitly
f104225a1e Merge pull request #376 from haberman/fix-quadratic-mem
3c3799498d Merge pull request #379 from fowles/master
2e83d5c98f Remove unused file test_util.h
b053fa6991 Merge pull request #378 from fowles/master
7876639e50 remove unused macro
5b97df91dd Restrict fuse to matching block_alloc
e74d6c23de Small renames and use uintptr_t instead of void*
d9a0c58108 Allow arena fuse to fail
53f5d9f69b Merge pull request #377 from haberman/json-parse-null
8370818143 Switch to a macro to avoid signed/const mismatches.
63ad3db980 Fixed "NULL + 0" UB in JSON encoder and decoder.
add9b12f18 Fixed quadratic memory usage in upb_array_append().
97e2aeb7ee Merge pull request #375 from haberman/cleanups
83c0edbd2a A few minor cleanups.
baa7fe7473 Merge pull request #374 from haberman/update-deps
900bd5c426 Merge pull request #355 from haberman/aarch64
89df647460 Updated versions of ABSL and protobuf deps.
e4343f0fa3 Update comment for ARM64.
103d51f102 Merge branch 'master' into aarch64
1b9cc09f0e Removed extraneous copybara directive.
bbd817fdb6 Merge pull request #373 from haberman/table-cleanup
c358829c76 Now that handlers are gone, cleaned up table to use arenas exclusively.
ed5b4108e0 Merge pull request #363 from haberman/delete-handlers
bfa528f0ae Merge pull request #372 from haberman/errmsg-fix
ec9ba3f893 Fixed error message buffer overflow.
eb0fdda14b Merge pull request #371 from haberman/json-any
e58f7a0284 Fix for Any messages with no fields.
7541ba0f38 Merge pull request #364 from catenacyber/cifuzz
81829bacc3 Removed quote chars from error message.
88ed8f5d3b Changed JSON decoding error message to be more clear.
f41c0ec261 Added an internal API to get arena from symtab, for Ruby's use.
b080659eee Merge pull request #367 from haberman/timestamp-minute-offset
f7ed1f27a3 Support non-zero minutes in the timestamp offset for JSON.
451dcbbb9a Adds CIFuzz
f5d2d55007 Deleted the legacy "Handlers" APIs. upb can finally be deserving of its name.
0f40d59258 Merge pull request #362 from haberman/rb-warnings
c7787cbaa1 Fixed a bunch of Clang warnings.
5e53b5bb3d Merge pull request #360 from haberman/default-msgval
7a6e647be1 Merge branch 'master' into default-msgval
edb0a9a2d9 Merge pull request #361 from haberman/arena-bugfix
9175989431 Bugfix for arena cleanup list when passing to upb_decode().
5e550e88f8 Added API for getting fielddef default as a upb_msgval.
de76b31f9c Merge pull request #359 from veblush/fix-upbdefs
3cab8a38fc Fixed upbdefs error
48bb3e5662 Merge pull request #357 from veblush/string-opt
4c67b2086b Merge pull request #358 from veblush/clang-tidy-fix
38b4beed6b Fix clang-tidy function 'upb_encode_ex' has a definition with different parameter names
9b020d8f65 Optimize calls to std::string::find() and friends for a single char.
3c9ae7837a The fasttable parser works on ARM64!

git-subtree-dir: third_party/upb
git-subtree-split: 2de300726a1ba2de9a468468dc5ff9ed17a3215f

* Updated upb for bazel

* Regen upb files

* Updated src/upb/gen_build_yaml.py
2021-08-06 10:30:53 -07:00
Tamir Duberstein ccad567e0b
Disallow implicit fallthrough (#26874)
Most instances were already explicit through comments, so it's clear
that the author cared about being explicit; use the compiler to ensure
this is always the case.
2021-08-04 21:34:27 -07:00
Lidi Zheng 826da6136c
Update Envoy API to the latest version (2021-07-30) (#26848)
* Bump Envoy and related submodules to latest

* Update googleapis

* Update scripts for newer submodules

* Update udpa

* Add opentelemetry

* Python changes for opentelemetry

* Update udpa in check_submodules

* Add opentelemetry to check submodules

* Regenerate upb files

* Add new proto dependency to upb-gen and Bazel

* Regenerate project
2021-08-03 09:12:42 -07:00
Yash Tibrewal c645be488e
Remove gpr_arena (#26799) 2021-07-28 17:11:02 -07:00
AJ Heller a10a5bf655
Changes from feedback on gRFC L82: gRPC Core EventEngine API (#26733) 2021-07-21 13:27:04 -07:00
Yash Tibrewal dc250d1c68
Add internal API to help trace retries and collect metrics (#26673)
* Add internal API to help trace retries and collect metrics

* Add headers

* Reviewer comments

* Revert changes for grpc_metadata_batch

* Regenerate projects

* Reviewer comments

* Reviewer comments

* Reviewer comments

* reviewer comments

* Fix sanity
2021-07-20 07:05:59 -07:00
apolcyn 0e6c888574
Bump version to 1.40.0-dev (#26600)
* Bump version to 1.40.0

* Regenerate projects

* Tweak version.cc.template to satisfy formatter

* Regenerate projects
2021-07-02 14:33:34 -07:00
Craig Tiller 6d96a2221d
Enable layering checks in the Bazel build (#26591)
* Enable layering checks

* fix dep

* update projects

* fix clang-tidy
2021-07-01 15:10:51 -07:00
AJ Heller 25d91e3091
New iomgr implementation backed by the EventEngine API (#26026)
This code adds an iomgr implementation that's backed by an EventEngine. This uses the EventEngine API alone, and separate work will introduce an EventEngine prototype to plug into it.

See also drfloob#1: @nicolasnoble has a pull request against this branch, implementing the libuv-based EventEngine. One goal here is to implement the iomgr code such that it can be merged independently without affecting normal builds.

This implementation can be built using bazel build --cxxopt='-DGRPC_USE_EVENT_ENGINE' :all

Some shortcuts are being taken to get a working, testable version of the engine. EventEngines are not pluggable, for example.
2021-06-18 12:30:09 -07:00
Jan Tattermusch 451127740d
Revert "Replace in-house rand with absl::Random for backoff (#26463)" (#26476)
This reverts commit b5191d0930.
2021-06-14 21:56:35 -07:00
Esun Kim b5191d0930
Replace in-house rand with absl::Random for backoff (#26463)
* Replace in-house rand with absl::Random for backoff

* Run sanity

* Added bscrypt dependency
2021-06-11 16:29:45 -07:00
Ashitha Santhosh b9a643a817
Static policy provider implementation. (#26134) 2021-06-03 23:18:08 -07:00
Yash Tibrewal a989179ace
Bump master to v1.39.0 (#26207)
* Bump version to v1.39.0

* Regenerate projects

* Buildifier format
2021-05-11 06:49:10 -07:00
Mark D. Roth 4c40ee3f78
move parse_address and sockaddr_utils out of iomgr directory (#26077)
* move parse_address and sockaddr_utils out of iomgr directory

* clang-format

* fix python

* fix for import

* fix build file for import
2021-04-30 08:21:58 -07:00
Esun Kim 2d8936b097
Added status_helper (#25901)
Added status_util
2021-04-22 11:54:19 -07:00
AJ Heller 4c59b17d40
Remove eventmanager_libuv code (#25811)
Reintroduces this code removal after a failed import. This needed special handling via cherry pick.
2021-04-08 13:32:53 -07:00
Mark D. Roth 3f19333ced
Move retry code into its own filter in the DynamicFilter stack (#25820)
* rename ChannelData to ClientChannel

* make ClientChannel class definition public

* move retry code to its own filter

* move LB call factory method to ClientChannel class

* move dynamic termination filter out of ClientChannel class

* update comments

* remove retry parsing from client channel service config parser

* fix clang-tidy

* fix service_config_test

* clang-format
2021-03-31 15:39:14 -07:00
Richard Belleville 9964ae875b
Bump master version to 1.38 (#25838)
* Bump version to 1.38

* Regenerate projects
2021-03-30 13:57:13 -07:00
Esun Kim 37eecd3ce3
Updated Abseil to LTS 20210324.0 (#25835)
* Updated abseil-cpp to 20210324.0
* UBSAN with -fsanitize-link-c++-runtime
2021-03-30 09:22:05 -07:00
AJ Heller 1694984846
Revert "Remove unused eventmanager_libuv code (#25796)" (#25807)
This caused problems internally. The interface deletion needs a cherrypick, but I will do an overnight test first, before I reintroduce. CC @nicolasnoble
2021-03-24 17:17:42 -07:00
AJ Heller 077f627aef
Remove unused eventmanager_libuv code (#25796) 2021-03-24 11:21:05 -07:00
Lidi Zheng 1040fbdb9f
Re-introduce "CSDS Implementation" (#25762)
* Revert "Revert "CSDS Implementation (#25038)" (#25745)"

This reverts commit 98fd4e1e36.

* Add xDS special Bazel build rules

* Add 2 todos to remove the added rules
2021-03-22 13:14:19 -07:00