-
Notifications
You must be signed in to change notification settings - Fork 228
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
Add nil checking for wrapperspb's types #960
Conversation
@goccy could you give an example of the expressions and inputs where this is a problem? In general, the special-casing for |
For example, in a case where the input value is The example code is the following. // cond is bool type
// a and b are google.protobuf.Int64Value type
ast, iss := env.Compile("cond ? a : b")
if iss.Err() != nil { ... }
prg, err := env.Program(ast)
if err != nil { ... }
out, _, err := prg.ContextEval(ctx, map[string]any{
"cond": true,
"a": nil,
"b": &wrapperspb.Int64Value{Value: 1},
})
if err != nil { ... }
expected, err := out.ConvertToNative(reflect.TypeOf((*wrapperspb.Int64Value)(nil))))
if err != nil { ... }
// expected value is `nil` for `wrapperspb.Int64Value` type, but got `0` We cannot control |
/gcbrun |
@goccy Thanks for your patience. I just need to create conformance tests around this to make sure I understand how all the CEL implementations are handling this case. |
@goccy would you mind adding tests for this case? I think it's fine to support this way since |
@TristonianJones Thank you for your comment, I've added the test cases, please confirm it. |
@goccy Thank you again for all your patience. As a final request could you update the following file as well to include cases that validate the end to end behavior during cel-go/common/types/provider_test.go Lines 694 to 697 in 9e64eb7
I believe the following should work: expectNativeToValue(t, (*wrapperspb.BoolValue)(nil), NullValue) |
@TristonianJones Thank you for reviewing ! I've added the test cases ! |
/gcbrun |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `v1.55.3` -> `v1.55.5` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2faws%2faws-sdk-go/v1.55.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2faws%2faws-sdk-go/v1.55.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2faws%2faws-sdk-go/v1.55.3/v1.55.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2faws%2faws-sdk-go/v1.55.3/v1.55.5?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | patch | | [github.com/google/cel-go](https://github.com/google/cel-go) | `v0.20.1` -> `v0.21.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgoogle%2fcel-go/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgoogle%2fcel-go/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgoogle%2fcel-go/v0.20.1/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgoogle%2fcel-go/v0.20.1/v0.21.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | minor | | [github.com/tidwall/gjson](https://github.com/tidwall/gjson) | `v1.17.1` -> `v1.17.3` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2ftidwall%2fgjson/v1.17.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2ftidwall%2fgjson/v1.17.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2ftidwall%2fgjson/v1.17.1/v1.17.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2ftidwall%2fgjson/v1.17.1/v1.17.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | patch | | [github.com/twmb/franz-go](https://github.com/twmb/franz-go) | `v1.17.0` -> `v1.17.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2ftwmb%2ffranz-go/v1.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2ftwmb%2ffranz-go/v1.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2ftwmb%2ffranz-go/v1.17.0/v1.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2ftwmb%2ffranz-go/v1.17.0/v1.17.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | patch | | [github.com/twmb/franz-go/pkg/kadm](https://github.com/twmb/franz-go) | `v1.12.0` -> `v1.13.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2ftwmb%2ffranz-go%2fpkg%2fkadm/v1.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2ftwmb%2ffranz-go%2fpkg%2fkadm/v1.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2ftwmb%2ffranz-go%2fpkg%2fkadm/v1.12.0/v1.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2ftwmb%2ffranz-go%2fpkg%2fkadm/v1.12.0/v1.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | minor | | [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) | `v2.43.2` -> `v2.44.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fvektra%2fmockery%2fv2/v2.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fvektra%2fmockery%2fv2/v2.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fvektra%2fmockery%2fv2/v2.43.2/v2.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fvektra%2fmockery%2fv2/v2.43.2/v2.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | minor | | golang.org/x/sync | `v0.7.0` -> `v0.8.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fsync/v0.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fsync/v0.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fsync/v0.7.0/v0.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fsync/v0.7.0/v0.8.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | minor | | [google.golang.org/genproto/googleapis/api](https://github.com/googleapis/go-genproto) | `93522f1` -> `b1a4ccb` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgenproto%2fgoogleapis%2fapi/v0.0.0-20240730163845-b1a4ccb954bf?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgenproto%2fgoogleapis%2fapi/v0.0.0-20240730163845-b1a4ccb954bf?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgenproto%2fgoogleapis%2fapi/v0.0.0-20240725223205-93522f1f2a9f/v0.0.0-20240730163845-b1a4ccb954bf?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgenproto%2fgoogleapis%2fapi/v0.0.0-20240725223205-93522f1f2a9f/v0.0.0-20240730163845-b1a4ccb954bf?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | digest | | [google.golang.org/grpc/cmd/protoc-gen-go-grpc](https://github.com/grpc/grpc-go) | `v1.4.0` -> `v1.5.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgrpc%2fcmd%2fprotoc-gen-go-grpc/v1.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgrpc%2fcmd%2fprotoc-gen-go-grpc/v1.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgrpc%2fcmd%2fprotoc-gen-go-grpc/v1.4.0/v1.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgrpc%2fcmd%2fprotoc-gen-go-grpc/v1.4.0/v1.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | minor | --- ### Release Notes <details> <summary>aws/aws-sdk-go (github.com/aws/aws-sdk-go)</summary> ### [`v1.55.5`](https://github.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v1555-2024-07-30) [Compare Source](https://github.com/aws/aws-sdk-go/compare/v1.55.4...v1.55.5) \=== ##### Service Client Updates - `service/appstream`: Updates service API and documentation - Added support for Red Hat Enterprise Linux 8 on Amazon AppStream 2.0 - `service/autoscaling`: Updates service API and documentation - Increase the length limit for VPCZoneIdentifier from 2047 to 5000 - `service/codepipeline`: Updates service API, documentation, and paginators - AWS CodePipeline V2 type pipelines now support stage level conditions to enable development teams to safely release changes that meet quality and compliance requirements. - `service/elasticache`: Updates service documentation - Doc only update for changes to deletion API. - `service/elasticloadbalancing`: Updates service API - `service/eventbridge`: Updates service API - `service/logs`: Updates service API - Add v2 smoke tests and smithy smokeTests trait for SDK testing. - `service/models.lex.v2`: Updates service API and documentation - `service/rolesanywhere`: Updates service API and documentation - `service/tnb`: Updates service API and documentation - `service/workspaces`: Updates service documentation - Removing multi-session as it isn't supported for pools ### [`v1.55.4`](https://github.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v1554-2024-07-29) [Compare Source](https://github.com/aws/aws-sdk-go/compare/v1.55.3...v1.55.4) \=== ##### Service Client Updates - `service/elasticache`: Updates service documentation - Renaming full service name as it appears in developer documentation. - `service/memorydb`: Updates service API and documentation </details> <details> <summary>google/cel-go (github.com/google/cel-go)</summary> ### [`v0.21.0`](https://github.com/google/cel-go/releases/tag/v0.21.0) [Compare Source](https://github.com/google/cel-go/compare/v0.20.1...v0.21.0) #### Features - Math extensions update to include bitwise ops and floating point helpers \[[#​923](https://github.com/google/cel-go/issues/923)] - Better support custom types with custom type registries \[[#​931](https://github.com/google/cel-go/issues/931)] - repl: implement %parse \[[#​933](https://github.com/google/cel-go/issues/933)] - Fixed partial variables extended bug and split PartialVarsEnvExtended test into two \[[#​955](https://github.com/google/cel-go/issues/955)] - Added partial evaluations example \[[#​959](https://github.com/google/cel-go/issues/959)] - Enable conformance tests for extensions \[[#​930](https://github.com/google/cel-go/issues/930)] - Update cel-spec and enable optional_type conformance tests \[[#​919](https://github.com/google/cel-go/issues/919)] - Improve token representation in AST \[[#​932](https://github.com/google/cel-go/issues/932)] - Add function accessor to Env \[[#​978](https://github.com/google/cel-go/issues/978)] ##### CEL Policy Compiler Policies which use CEL often evolve to express complex logic using multiple statements and decision criteria. The CEL Policy Compiler provides an extensible format for parsing, compiling, and composing expression graphs. Below is a simple example which can easily be compiled to a single CEL expression. ```yaml name: "my-policy" rule: variables: - name: greeting expression: "'%s, %s!'" - name: people expression: > ['Tristan', 'Calla', 'Antoine', 'Jonathan', 'Sokwhan', 'Rebecca'] match: - condition: "request.user in variables.people" output: "variables.greeting.format(['hello', request.user])" - output: "variables.greeting.format(['goodbye', 'stranger'])" ``` - Simple Policy Compiler \[[#​924](https://github.com/google/cel-go/issues/924)] - Introduce protobuf message testing to policies \[[#​961](https://github.com/google/cel-go/issues/961)] - Generate policy explanations during compilation \[[#​977](https://github.com/google/cel-go/issues/977)] - Variable and nested rule limits \[[#​989](https://github.com/google/cel-go/issues/989)] - Improved support for nested rules [#​991](https://github.com/google/cel-go/issues/991)] #### Fixes - Delete dangling source info from macro expansion \[[#​934](https://github.com/google/cel-go/issues/934)] - Do not re-use ID twice in `exists_one` macro \[[#​935](https://github.com/google/cel-go/issues/935)] - Avoid iterating over the source multiple times during parse \[[#​936](https://github.com/google/cel-go/issues/936)] - Fix for working with byte arrays by \[[#​958](https://github.com/google/cel-go/issues/958)] - Stabilize macro id generation during optimization \[[#​962](https://github.com/google/cel-go/issues/962)] - String formatting panic fix for non-literal format strings \[[#​987](https://github.com/google/cel-go/issues/987)] - Add nil checking for wrapperspb's types \[[#​960](https://github.com/google/cel-go/issues/960)] - Prevent self-append for `Issues` \[[#​988](https://github.com/google/cel-go/issues/988)] - Use bytes interface value for zero native type struct fields instead of dynamic list \[[#​981](https://github.com/google/cel-go/issues/981)] ##### Presence Test Semantics The following two changes identified an issue where presence test was unexpectedly being performed over a scalar type and evaluating to `absent` rather than erroring. It is strongly advised to set the flag `cel.EnableErrorOnBadPresenceTest(true)` to avoid a logical correctness issue. - Fix presence test to produce an error when it's not a map or a message \[[#​922](https://github.com/google/cel-go/issues/922)] - Update the presence testing fix to be opt-out \[[#​939](https://github.com/google/cel-go/issues/939)] ##### Deprecation Cleanup - Remove the deprecated protobuf function and type declarations \[[#​921](https://github.com/google/cel-go/issues/921)] #### New Contributors - [@​testwill](https://github.com/testwill) made their first contribution in [https://github.com/google/cel-go/pull/911](https://github.com/google/cel-go/pull/911) - [@​patrickpichler](https://github.com/patrickpichler) made their first contribution in [https://github.com/google/cel-go/pull/941](https://github.com/google/cel-go/pull/941) - [@​seirl](https://github.com/seirl) made their first contribution in [https://github.com/google/cel-go/pull/948](https://github.com/google/cel-go/pull/948) - [@​jduraniglesias](https://github.com/jduraniglesias) made their first contribution in [https://github.com/google/cel-go/pull/955](https://github.com/google/cel-go/pull/955) - [@​goccy](https://github.com/goccy) made their first contribution in [https://github.com/google/cel-go/pull/960](https://github.com/google/cel-go/pull/960) **Full Changelog**: google/cel-go@v0.20.1...v0.21.0 </details> <details> <summary>tidwall/gjson (github.com/tidwall/gjson)</summary> ### [`v1.17.3`](https://github.com/tidwall/gjson/compare/v1.17.2...v1.17.3) [Compare Source](https://github.com/tidwall/gjson/compare/v1.17.2...v1.17.3) ### [`v1.17.2`](https://github.com/tidwall/gjson/compare/v1.17.1...v1.17.2) [Compare Source](https://github.com/tidwall/gjson/compare/v1.17.1...v1.17.2) </details> <details> <summary>twmb/franz-go (github.com/twmb/franz-go)</summary> ### [`v1.17.1`](https://github.com/twmb/franz-go/blob/HEAD/CHANGELOG.md#v1171) [Compare Source](https://github.com/twmb/franz-go/compare/v1.17.0...v1.17.1) \=== This patch release fixes four bugs (two are fixed in one commit), contains two internal improvements, and adds two other minor changes. #### Bug fixes - If you were using the `MaxBufferedBytes` option and ever hit the max, odds are likely that you would experience a deadlock eventually. That has been fixed. - If you ever produced a record with no topic field and without using `DefaultProduceTopic`, or if you produced a transactional record while not in a transaction, AND if the client was at the maximum buffered records, odds are you would eventually deadlock. This has been fixed. - It was previously not possible to set lz4 compression levels. - There was a data race on a boolean field if a produce request was being written at the same time a metadata update happened, *and* if the metadata update has an error on the topic or partition that is actively being written. Note that the race was unlikely and if you experienced it, you would have noticed an OutOfOrderSequenceNumber error. See [this comment](https://github.com/twmb/franz-go/pull/781#issuecomment-2248563542) for more details. #### Improvements - Canceling the context you pass to `Produce` now propagates in two more areas: the initial `InitProducerID` request that occurs the first time you produce, and if the client is internally backing off due to a produce request failure. Note that there is no guarantee on *which* context is used for cancelation if you produce many records, and the client does *not* allow canceling if it is currently unsafe to do so. However, this does mean that if your cluster is somewhat down such that `InitProducerID` is failing on your new client, you can now actually cause the `Produce` to quit. See [this comment](https://github.com/twmb/franz-go/issues/769#issuecomment-2235707417) for what it means for a record to be "safe" to fail. - The client now ignores aborted records while consuming only if you have configured `FetchIsolationLevel(ReadCommitted())`. Previously, the client relied entirely on the `FetchResponse` `AbortedTransactions` field, but it's possible that brokers could send aborted transactions even when not using read committed. Specifically, this was a behavior difference in Redpanda, and the KIP that introduced transactions and all relevant documents do not mention what the broker behavior actually should be here. Redpanda itself was also changed to not send aborted transactions when using read committed, but we may as well improve franz-go as well. - Decompression now better reuses buffers under the hood, reducing allocations. - Brokers that return preferred replicas to fetch from now causes an info level log in the client. #### Relevant commits - [`305d8dc`](https://github.com/twmb/franz-go/commit/305d8dc) kgo: allow record ctx cancelation to propagate a bit more - [`24fbb0f`](https://github.com/twmb/franz-go/commit/24fbb0f) **bugfix** kgo: fix deadlock in Produce when using MaxBufferedBytes - [`1827add`](https://github.com/twmb/franz-go/commit/1827add) **bugfix** kgo sink: fix read/write race for recBatch.canFailFromLoadErrs - [`d7ea2c3`](https://github.com/twmb/franz-go/commit/d7ea2c3) **bugfix** fix setting lz4 compression levels (thanks [@​asg0451](https://github.com/asg0451)!) - [`5809dec`](https://github.com/twmb/franz-go/commit/5809dec) optimise: use byteBuffer pool in decompression (thanks [@​kalbhor](https://github.com/kalbhor)!) - [`cda897d`](https://github.com/twmb/franz-go/commit/cda897d) kgo: add log for preferred replicas - [`e62b402`](https://github.com/twmb/franz-go/commit/e62b402) **improvement** kgo sink: do not back off on certain edge case - [`9e32bf9`](https://github.com/twmb/franz-go/commit/9e32bf9) kgo: ignore aborted txns if using `READ_UNCOMMITTED` </details> <details> <summary>vektra/mockery (github.com/vektra/mockery/v2)</summary> ### [`v2.44.1`](https://github.com/vektra/mockery/releases/tag/v2.44.1) [Compare Source](https://github.com/vektra/mockery/compare/v2.44.0...v2.44.1) ##### Changelog - [`c6d2a9e`](https://github.com/vektra/mockery/commit/c6d2a9e) Fix release workflow - Fixes [#​769](https://github.com/vektra/mockery/issues/769) : Mock files getting created in disk when dry-run is enabled by [@​snopan](https://github.com/snopan) in [https://github.com/vektra/mockery/pull/789](https://github.com/vektra/mockery/pull/789) - chore: fix typos and style by [@​ccoVeille](https://github.com/ccoVeille) in [https://github.com/vektra/mockery/pull/794](https://github.com/vektra/mockery/pull/794) - Allow types defined as instantiated generic interfaces to generate mocks by [@​LandonTClipp](https://github.com/LandonTClipp) in [https://github.com/vektra/mockery/pull/790](https://github.com/vektra/mockery/pull/790) ### [`v2.44.0`](https://github.com/vektra/mockery/compare/v2.43.2...v2.44.0) [Compare Source](https://github.com/vektra/mockery/compare/v2.43.2...v2.44.0) </details> <details> <summary>grpc/grpc-go (google.golang.org/grpc/cmd/protoc-gen-go-grpc)</summary> ### [`v1.5.1`](https://github.com/grpc/grpc-go/releases/tag/v1.5.1): Release 1.5.1 [Compare Source](https://github.com/grpc/grpc-go/compare/v1.5.0...v1.5.1) - Do not create new addrConn when connection error happens ([#​1369](https://github.com/grpc/grpc-go/issues/1369)) ### [`v1.5.0`](https://github.com/grpc/grpc-go/releases/tag/v1.5.0): Release 1.5.0 [Compare Source](https://github.com/grpc/grpc-go/compare/v1.4.0...v1.5.0) ### Performance - BDP estimation and window update. ([#​1310](https://github.com/grpc/grpc-go/issues/1310)) - Do not flush NewStream header on client side for unary RPCs and streaming RPCs with requests. ([#​1343](https://github.com/grpc/grpc-go/issues/1343)) - Change objects in recvBuffer queue from interface to concrete type to reduce allocs ([#​1029](https://github.com/grpc/grpc-go/issues/1029)) - Don't create new reader in recvMsg ([#​940](https://github.com/grpc/grpc-go/issues/940)) ### API change - Add support for grpc.SupportPackageIsVersion3 back ([#​1331](https://github.com/grpc/grpc-go/issues/1331)) - Add Severity and VerboseLevel to grpclog. ([#​922](https://github.com/grpc/grpc-go/issues/922)) ### Behavior change - Transport errors should be coded Unavailable instead of internal. ([#​1307](https://github.com/grpc/grpc-go/issues/1307)) - Catch invalid use of Server.RegisterService after Register.Serve ([#​828](https://github.com/grpc/grpc-go/issues/828)) ### Bug fixes - Fix deadlock of roundrobin balancer ([#​1353](https://github.com/grpc/grpc-go/issues/1353)) - Use log severity and verbosity level ([#​1340](https://github.com/grpc/grpc-go/issues/1340)) - Protect bytesSent and bytesReceived with mutex to avoid datarace ([#​1318](https://github.com/grpc/grpc-go/issues/1318)) - Support IPv6 addresses in grpclb ([#​1303](https://github.com/grpc/grpc-go/issues/1303)) - Return header in Stream.Header() if available ([#​1281](https://github.com/grpc/grpc-go/issues/1281)) - Fix error handling on Stream deletion ([#​1275](https://github.com/grpc/grpc-go/issues/1275)) ### Documentation - Add documentation to deprecate WithTimeout dial option ([#​1333](https://github.com/grpc/grpc-go/issues/1333)) - Specify characters allowed in metadata keys ([#​1299](https://github.com/grpc/grpc-go/issues/1299)) - Update LICENSE to Apache 2 ([#​1290](https://github.com/grpc/grpc-go/issues/1290)) - Update the path of guide ([#​950](https://github.com/grpc/grpc-go/issues/950)) ### Testing - latency: sleep in Write when BDP is exceeded to avoid buffer bloat ([#​1330](https://github.com/grpc/grpc-go/issues/1330)) - Replace 127.0.0.1 with localhost for ipv6 only environment ([#​1306](https://github.com/grpc/grpc-go/issues/1306)) - Create latency package for realistically simulating network latency ([#​1286](https://github.com/grpc/grpc-go/issues/1286)) - Use subtests for the benchmark_test and add it into the Makefile ([#​1278](https://github.com/grpc/grpc-go/issues/1278)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/cerbos/cerbos). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhcmVhL2RlcGVuZGVuY2llcyIsImJvdHMiLCJraW5kL2Nob3JlIl19--> --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Oğuzhan Durgun <oguzhandurgun95@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Oğuzhan Durgun <oguzhandurgun95@gmail.com>
We sometimes use types like
Int64Value
defined inwrapperspb
to distinguish betweennull
and default values. However, in the current implementation, specifyingnil
for*wrapperspb.Int64Value
results in0
(int
type ), and there is no way to distinguish if it isnull
. Therefore, we have adjusted it to returnnil
as intended when the value isnull
.If this change is acceptable, I will also add test case later.
Pull Requests Guidelines
See CONTRIBUTING.md for more details about when to create
a GitHub Pull Request and when other kinds of contributions or
consultation might be more desirable.
When creating a new pull request, please fork the repo and work within a
development branch.
Commit Messages
Reviews
Merging
they have write access. Otherwise, the change will be merged by a maintainer.
closes #<issue-num>: description
in the merge message,if applicable.