-
Notifications
You must be signed in to change notification settings - Fork 19
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
Resolve correct CEL types consistently for all field types #80
Conversation
@@ -114,7 +114,7 @@ func (c *Cache) prepareEnvironment( | |||
) (*cel.Env, error) { | |||
env, err := env.Extend( | |||
cel.Types(rules.Interface()), | |||
cel.Variable("this", c.getCELType(fieldDesc, forItems)), | |||
cel.Variable("this", expression.ProtoFieldToCELType(fieldDesc, true, forItems)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my own knowledge, why is generic set to true here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are compiling the standard constraint expressions the first time we see them, and we use a concrete field it's attached to as the basis for type information. repeated
and map
fields are generic over their elements, so when we build (say) the unique
expression for RepeatedRules
, we cannot assume that the element type of the list is always going to be that of the field we're using since another repeated field of a different type might also specify unique.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for doing this! Is it possible to also export the expression
package so that the CLI can reuse it for linting CEL expressions?
I'm sure we could! |
[![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/bufbuild/protovalidate-go](https://togithub.com/bufbuild/protovalidate-go) | require | patch | `v0.4.0` -> `v0.4.2` | | [github.com/cerbos/cerbos/api/genpb](https://togithub.com/cerbos/cerbos) | require | digest | `f2ff20d` -> `7dd5d0c` | | [github.com/lestrrat-go/jwx/v2](https://togithub.com/lestrrat-go/jwx) | require | patch | `v2.0.16` -> `v2.0.17` | --- ### Release Notes <details> <summary>bufbuild/protovalidate-go (github.com/bufbuild/protovalidate-go)</summary> ### [`v0.4.2`](https://togithub.com/bufbuild/protovalidate-go/releases/tag/v0.4.2) [Compare Source](https://togithub.com/bufbuild/protovalidate-go/compare/v0.4.1...v0.4.2) #### What's Changed - Resolve correct CEL types consistently for all field types by [@​rodaine](https://togithub.com/rodaine) in [https://github.com/bufbuild/protovalidate-go/pull/80](https://togithub.com/bufbuild/protovalidate-go/pull/80) **Full Changelog**: bufbuild/protovalidate-go@v0.4.1...v0.4.2 ### [`v0.4.1`](https://togithub.com/bufbuild/protovalidate-go/releases/tag/v0.4.1) [Compare Source](https://togithub.com/bufbuild/protovalidate-go/compare/v0.4.0...v0.4.1) #### What's Changed - Update required/ignore constraint behavior by [@​rodaine](https://togithub.com/rodaine) in [https://github.com/bufbuild/protovalidate-go/pull/76](https://togithub.com/bufbuild/protovalidate-go/pull/76) - Update protovalidate tests to ignore lint warnings by [@​pkwarren](https://togithub.com/pkwarren) in [https://github.com/bufbuild/protovalidate-go/pull/79](https://togithub.com/bufbuild/protovalidate-go/pull/79) #### New Contributors - [@​pkwarren](https://togithub.com/pkwarren) made their first contribution in [https://github.com/bufbuild/protovalidate-go/pull/79](https://togithub.com/bufbuild/protovalidate-go/pull/79) **Full Changelog**: bufbuild/protovalidate-go@v0.4.0...v0.4.1 </details> <details> <summary>lestrrat-go/jwx (github.com/lestrrat-go/jwx/v2)</summary> ### [`v2.0.17`](https://togithub.com/lestrrat-go/jwx/releases/tag/v2.0.17) [Compare Source](https://togithub.com/lestrrat-go/jwx/compare/v2.0.16...v2.0.17) v2.0.17 20 Nov 2023 [Bug Fixes] * [jws] Previously, `jws.UnregisterSigner` did not remove the previous signer instance when the signer was registered and unregistered multiple times (#​1016). This has been fixed. [New Features] * [jwe] (EXPERIMENTAL) `jwe.WithCEK` has been added to extract the content encryption key (CEK) from the Decrypt operation. * [jwe] (EXPERIMENTAL) `jwe.EncryptStatic` has been added to encrypt content using a static CEK. Using static CEKs has serious security implications, and you should not use this unless you completely understand the risks involved. </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://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/cerbos/cerbos-sdk-go). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/aws/aws-sdk-go](https://togithub.com/aws/aws-sdk-go) | require | minor | `v1.47.9` -> `v1.48.0` | | [github.com/bufbuild/buf](https://togithub.com/bufbuild/buf) | require | patch | `v1.28.0` -> `v1.28.1` | | [github.com/bufbuild/protovalidate-go](https://togithub.com/bufbuild/protovalidate-go) | require | patch | `v0.4.0` -> `v0.4.2` | | [github.com/cerbos/cerbos-sdk-go](https://togithub.com/cerbos/cerbos-sdk-go) | require | patch | `v0.2.0` -> `v0.2.1` | | [github.com/cerbos/cerbos/api/genpb](https://togithub.com/cerbos/cerbos) | require | digest | `fd30cac` -> `7dd5d0c` | | [github.com/lestrrat-go/jwx/v2](https://togithub.com/lestrrat-go/jwx) | require | patch | `v2.0.16` -> `v2.0.17` | | [github.com/rivo/tview](https://togithub.com/rivo/tview) | require | digest | `05d0194` -> `7c9e464` | | [github.com/vektra/mockery/v2](https://togithub.com/vektra/mockery) | require | minor | `v2.36.1` -> `v2.37.1` | | [go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | require | patch | `v0.46.0` -> `v0.46.1` | | [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | require | patch | `v0.46.0` -> `v0.46.1` | | [go.opentelemetry.io/contrib/propagators/autoprop](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | require | patch | `v0.46.0` -> `v0.46.1` | | [go.opentelemetry.io/contrib/propagators/b3](https://togithub.com/open-telemetry/opentelemetry-go-contrib) | require | patch | `v1.21.0` -> `v1.21.1` | | [go.opentelemetry.io/otel](https://togithub.com/open-telemetry/opentelemetry-go) | require | minor | `v1.20.0` -> `v1.21.0` | | [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://togithub.com/open-telemetry/opentelemetry-go) | require | minor | `v1.20.0` -> `v1.21.0` | | [go.opentelemetry.io/otel/sdk](https://togithub.com/open-telemetry/opentelemetry-go) | require | minor | `v1.20.0` -> `v1.21.0` | | [go.opentelemetry.io/otel/trace](https://togithub.com/open-telemetry/opentelemetry-go) | require | minor | `v1.20.0` -> `v1.21.0` | | [google.golang.org/protobuf](https://togithub.com/protocolbuffers/protobuf-go) | require | digest | `f4a6c1f` -> `a8317fb` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>aws/aws-sdk-go (github.com/aws/aws-sdk-go)</summary> ### [`v1.48.0`](https://togithub.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v1480-2023-11-17) [Compare Source](https://togithub.com/aws/aws-sdk-go/compare/v1.47.13...v1.48.0) \=== ##### Service Client Updates - `service/appmesh`: Updates service API and documentation - `service/athena`: Updates service API and documentation - Adding SerivicePreProcessing time metric - `service/cloud9`: Updates service documentation and examples - A minor doc only update related to changing the date of an API change. - `service/cloudformation`: Updates service API and documentation - This release adds a new flag ImportExistingResources to CreateChangeSet. Specify this parameter on a CREATE- or UPDATE-type change set to import existing resources with custom names instead of recreating them. - `service/codepipeline`: Updates service API and documentation - CodePipeline now supports overriding source revisions to achieve manual re-deploy of a past revision - `service/codestar-connections`: Updates service API, documentation, and paginators - `service/connect`: Updates service API - `service/dlm`: Updates service documentation - `service/ec2`: Updates service API and documentation - This release adds new features for Amazon VPC IP Address Manager (IPAM) Allowing a choice between Free and Advanced Tiers, viewing public IP address insights across regions and in Amazon Cloudwatch, use IPAM to plan your subnet IPs within a VPC and bring your own autonomous system number to IPAM. - `service/ecr`: Updates service API and documentation - Documentation and operational updates for Amazon ECR, adding support for pull through cache rules for upstream registries that require authentication. - `service/elasticmapreduce`: Updates service API and documentation - Launch support for IAM Identity Center Trusted Identity Propagation and workspace storage encryption using AWS KMS in EMR Studio - `service/eventbridge`: Updates service API and documentation - `service/internetmonitor`: Updates service API, documentation, and paginators - `service/ivs`: Updates service API - `service/ivschat`: Updates service API - `service/kinesisvideo`: Updates service documentation - Docs only build to bring up-to-date with public docs. - `service/location`: Updates service API - `service/medialive`: Updates service API and documentation - MediaLive has now added support for per-output static image overlay. - `service/mgn`: Updates service API - `service/osis`: Updates service API and documentation - `service/pipes`: Updates service API - `service/rds`: Updates service API, documentation, waiters, paginators, and examples - This release adds support for option groups and replica enhancements to Amazon RDS Custom. - `service/redshift`: Updates service API, documentation, and paginators - Updated SDK for Amazon Redshift, which you can use to configure a connection with IAM Identity Center to manage access to databases. With these, you can create a connection through a managed application. You can also change a managed application, delete it, or get information about an existing one. - `service/redshift-serverless`: Updates service API and documentation - `service/s3`: Updates service API, documentation, and examples - Removes all default 0 values for numbers and false values for booleans - `service/sso-admin`: Updates service API and documentation - `service/sso-oidc`: Updates service API, documentation, and examples - `service/sts`: Updates service documentation - API updates for the AWS Security Token Service - `service/trustedadvisor`: Adds new service - `service/verifiedpermissions`: Updates service API and documentation - `service/wisdom`: Updates service API, documentation, and paginators ##### SDK Features - `service/macie`: Deprecate Macie - This change removes the macie service, since it is deprecated. ### [`v1.47.13`](https://togithub.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v14713-2023-11-16) [Compare Source](https://togithub.com/aws/aws-sdk-go/compare/v1.47.12...v1.47.13) \=== ##### Service Client Updates - `service/dlm`: Updates service API and documentation - `service/ec2`: Updates service API and documentation - Enable use of tenant-specific PublicSigningKeyUrl from device trust providers and onboard jumpcloud as a new device trust provider. - `service/fsx`: Updates service API and documentation - `service/glue`: Updates service API, documentation, and paginators - Introduces new column statistics APIs to support statistics generation for tables within the Glue Data Catalog. - `service/imagebuilder`: Updates service API, documentation, and paginators - `service/iot`: Updates service API and documentation - GA release the ability to index and search devices based on their GeoLocation data. With GeoQueries you can narrow your search to retrieve devices located in the desired geographic boundary. - `service/ivs-realtime`: Updates service API, documentation, and paginators - `service/kafka`: Updates service API and documentation - `service/lambda`: Updates service API and documentation - Adds support for logging configuration in Lambda Functions. Customers will have more control how their function logs are captured and to which cloud watch log group they are delivered also. - `service/macie2`: Updates service API and documentation - `service/mediapackage`: Updates service API and documentation - DRM_TOP_LEVEL_COMPACT allows placing content protection elements at the MPD level and referenced at the AdaptationSet level - `service/pinpoint-sms-voice-v2`: Updates service API, documentation, and paginators - `service/polly`: Updates service API and documentation - Add new engine - long-form - dedicated for longer content, such as news articles, training materials, or marketing videos. - `service/quicksight`: Updates service API, documentation, and paginators - Custom permission support for QuickSight roles; Three new datasources STARBURST, TRINO, BIGQUERY; Lenient mode changes the default behavior to allow for exporting and importing with certain UI allowed errors, Support for permissions and tags export and import. - `service/sagemaker`: Updates service API and documentation - Amazon SageMaker Studio now supports Trainium instance types - trn1.2xlarge, trn1.32xlarge, trn1n.32xlarge. - `service/ssm`: Updates service API and documentation - This release introduces the ability to filter automation execution steps which have parent steps. In addition, runbook variable information is returned by GetAutomationExecution and parent step information is returned by the DescribeAutomationStepExecutions API. - `service/ssm-incidents`: Updates service API, documentation, and paginators - `service/sso-admin`: Updates service API, documentation, and paginators - `service/transfer`: Updates service API and documentation - Introduced S3StorageOptions for servers to enable directory listing optimizations and added Type fields to logical directory mappings. ### [`v1.47.12`](https://togithub.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v14712-2023-11-15) [Compare Source](https://togithub.com/aws/aws-sdk-go/compare/v1.47.11...v1.47.12) \=== ##### Service Client Updates - `service/autoscaling`: Updates service API, documentation, and examples - This release introduces Instance Maintenance Policy, a new EC2 Auto Scaling capability that allows customers to define whether instances are launched before or after existing instances are terminated during instance replacement operations. - `service/cloudtrail`: Updates service API and documentation - The Lake Repricing feature lets customers configure a BillingMode for an event data store. The BillingMode determines the cost for ingesting and storing events and the default and maximum retention period for the event data store. - `service/ec2`: Updates service API and documentation - AWS EBS now supports Snapshot Lock, giving users the ability to lock an EBS Snapshot to prohibit deletion of the snapshot. This release introduces the LockSnapshot, UnlockSnapshot & DescribeLockedSnapshots APIs to manage lock configuration for snapshots. The release also includes the dl2q\_24xlarge. - `service/finspace`: Updates service API - `service/finspace-data`: Updates service API - `service/lambda`: Updates service API - Add Java 21 (java21) support to AWS Lambda - `service/mwaa`: Updates service API and documentation - `service/rds`: Updates service API, documentation, waiters, paginators, and examples - Updates Amazon RDS documentation for support for upgrading RDS for MySQL snapshots from version 5.7 to version 8.0. - `service/redshift`: Updates service API and documentation - The custom domain name SDK for Amazon Redshift provisioned clusters is updated with additional required parameters for modify and delete operations. Additionally, users can provide domain names with longer top-level domains. - `service/s3control`: Updates service API, documentation, and paginators - Add 5 APIs to create, update, get, list, delete S3 Storage Lens group(eg. CreateStorageLensGroup), 3 APIs for tagging(TagResource,UntagResource,ListTagsForResource), and update to StorageLensConfiguration to allow metrics to be aggregated on Storage Lens groups. - `service/ssm-sap`: Updates service API ##### SDK Bugs - Don't generate cloudwatchlogs event streams tests for now. - The test harness does not handle event stream APIs with a host prefix at this time. ### [`v1.47.11`](https://togithub.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v14711-2023-11-14) [Compare Source](https://togithub.com/aws/aws-sdk-go/compare/v1.47.10...v1.47.11) \=== ##### Service Client Updates - `service/backup`: Updates service API, documentation, and paginators - `service/cleanrooms`: Updates service API and documentation - `service/connect`: Updates service API and documentation - `service/glue`: Updates service API, documentation, and paginators - Introduces new storage optimization APIs to support automatic compaction of Apache Iceberg tables. - `service/iot`: Updates service API and documentation - This release introduces new attributes in API CreateSecurityProfile, UpdateSecurityProfile and DescribeSecurityProfile to support management of Metrics Export for AWS IoT Device Defender Detect. - `service/lambda`: Updates service API - Add Python 3.12 (python3.12) support to AWS Lambda - `service/mediatailor`: Updates service API - `service/pipes`: Updates service API and documentation - `service/resource-explorer-2`: Updates service API, documentation, and paginators - `service/sagemaker`: Updates service API and documentation - This release makes Model Registry Inference Specification fields as not required. - `service/signer`: Updates service documentation - Documentation updates for AWS Signer - `service/states`: Updates service API and documentation - This release adds support to redrive executions in AWS Step Functions with a new RedriveExecution operation. ##### SDK Bugs - `aws/defaults`: Feature updates to endpoint credentials provider. - Add support for dynamic auth token from file and EKS container host in configured URI. ### [`v1.47.10`](https://togithub.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v14710-2023-11-13) [Compare Source](https://togithub.com/aws/aws-sdk-go/compare/v1.47.9...v1.47.10) \=== ##### Service Client Updates - `service/dataexchange`: Updates service API - `service/dms`: Updates service API and documentation - Added new Db2 LUW Target endpoint with related endpoint settings. New executeTimeout endpoint setting for mysql endpoint. New ReplicationDeprovisionTime field for serverless describe-replications. - `service/ec2`: Updates service API, documentation, and paginators - Adds the new EC2 DescribeInstanceTopology API, which you can use to retrieve the network topology of your running instances on select platform types to determine their relative proximity to each other. - `service/ecs`: Updates service API and documentation - Adds a Client Token parameter to the ECS RunTask API. The Client Token parameter allows for idempotent RunTask requests. - `service/elasticmapreduce`: Updates service API - Updated GetClusterSessionCredentials API to allow Amazon SageMaker Studio to connect to EMR on EC2 clusters to support IdentityCenter/PEZ integration. - `service/servicecatalog-appregistry`: Updates service API and documentation - `service/transcribe-streaming`: Updates service API and documentation </details> <details> <summary>bufbuild/buf (github.com/bufbuild/buf)</summary> ### [`v1.28.1`](https://togithub.com/bufbuild/buf/blob/HEAD/CHANGELOG.md#v1281---2023-11-15) [Compare Source](https://togithub.com/bufbuild/buf/compare/v1.28.0...v1.28.1) - The `buf curl` command has been updated to support the use of multiple schemas. This allows users to specify multiple `--schema` flags and/or to use both `--schema` and `--reflect` flags at the same time. The result is that additional sources can be consulted to resolve an element. This can be useful when the result of an RPC contains extensions or values in `google.protobuf.Any` messages that are not defined in the same schema that defines the RPC service. - Fix issue where `buf lint` incorrectly reports error when `(buf.validate.field).required` is set for an optional field in proto3. </details> <details> <summary>bufbuild/protovalidate-go (github.com/bufbuild/protovalidate-go)</summary> ### [`v0.4.2`](https://togithub.com/bufbuild/protovalidate-go/releases/tag/v0.4.2) [Compare Source](https://togithub.com/bufbuild/protovalidate-go/compare/v0.4.1...v0.4.2) #### What's Changed - Resolve correct CEL types consistently for all field types by [@​rodaine](https://togithub.com/rodaine) in [https://github.com/bufbuild/protovalidate-go/pull/80](https://togithub.com/bufbuild/protovalidate-go/pull/80) **Full Changelog**: bufbuild/protovalidate-go@v0.4.1...v0.4.2 ### [`v0.4.1`](https://togithub.com/bufbuild/protovalidate-go/releases/tag/v0.4.1) [Compare Source](https://togithub.com/bufbuild/protovalidate-go/compare/v0.4.0...v0.4.1) #### What's Changed - Update required/ignore constraint behavior by [@​rodaine](https://togithub.com/rodaine) in [https://github.com/bufbuild/protovalidate-go/pull/76](https://togithub.com/bufbuild/protovalidate-go/pull/76) - Update protovalidate tests to ignore lint warnings by [@​pkwarren](https://togithub.com/pkwarren) in [https://github.com/bufbuild/protovalidate-go/pull/79](https://togithub.com/bufbuild/protovalidate-go/pull/79) #### New Contributors - [@​pkwarren](https://togithub.com/pkwarren) made their first contribution in [https://github.com/bufbuild/protovalidate-go/pull/79](https://togithub.com/bufbuild/protovalidate-go/pull/79) **Full Changelog**: bufbuild/protovalidate-go@v0.4.0...v0.4.1 </details> <details> <summary>cerbos/cerbos-sdk-go (github.com/cerbos/cerbos-sdk-go)</summary> ### [`v0.2.1`](https://togithub.com/cerbos/cerbos-sdk-go/compare/v0.2.0...v0.2.1) [Compare Source](https://togithub.com/cerbos/cerbos-sdk-go/compare/v0.2.0...v0.2.1) </details> <details> <summary>lestrrat-go/jwx (github.com/lestrrat-go/jwx/v2)</summary> ### [`v2.0.17`](https://togithub.com/lestrrat-go/jwx/releases/tag/v2.0.17) [Compare Source](https://togithub.com/lestrrat-go/jwx/compare/v2.0.16...v2.0.17) v2.0.17 20 Nov 2023 [Bug Fixes] * [jws] Previously, `jws.UnregisterSigner` did not remove the previous signer instance when the signer was registered and unregistered multiple times (#​1016). This has been fixed. [New Features] * [jwe] (EXPERIMENTAL) `jwe.WithCEK` has been added to extract the content encryption key (CEK) from the Decrypt operation. * [jwe] (EXPERIMENTAL) `jwe.EncryptStatic` has been added to encrypt content using a static CEK. Using static CEKs has serious security implications, and you should not use this unless you completely understand the risks involved. </details> <details> <summary>vektra/mockery (github.com/vektra/mockery/v2)</summary> ### [`v2.37.1`](https://togithub.com/vektra/mockery/releases/tag/v2.37.1) [Compare Source](https://togithub.com/vektra/mockery/compare/v2.37.0...v2.37.1) #### Changelog - [`c7a65e2`](https://togithub.com/vektra/mockery/commit/c7a65e2) Merge pull request [#​734](https://togithub.com/vektra/mockery/issues/734) from vektra/revert-731-walk-skips-modules - [`fa5b6cb`](https://togithub.com/vektra/mockery/commit/fa5b6cb) Revert "Don't recurse into submodules" ### [`v2.37.0`](https://togithub.com/vektra/mockery/releases/tag/v2.37.0) [Compare Source](https://togithub.com/vektra/mockery/compare/v2.36.1...v2.37.0) #### Changelog - [`fc10b9c`](https://togithub.com/vektra/mockery/commit/fc10b9c) Don't recurse into submodule - [`0e27e93`](https://togithub.com/vektra/mockery/commit/0e27e93) Merge pull request [#​731](https://togithub.com/vektra/mockery/issues/731) from devnev/walk-skips-modules - [`0c5b6a4`](https://togithub.com/vektra/mockery/commit/0c5b6a4) add note in docs about go.mod skipping </details> <details> <summary>open-telemetry/opentelemetry-go-contrib (go.opentelemetry.io/contrib/propagators/b3)</summary> ### [`v1.21.1`](https://togithub.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.21.1): /v0.46.1/v0.15.1/v0.1.1 [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go-contrib/compare/v1.21.0...v1.21.1) ##### Changed - Upgrade dependencies of OpenTelemetry Go to use the new [`v1.21.0`/`v0.44.0` release](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0). ([#​4582](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4582)) ##### Fixed - Fix `StreamClientInterceptor` in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` to end the spans synchronously. ([#​4537](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4537)) - Fix data race in stats handlers when processing messages received and sent metrics in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc`. ([#​4577](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4577)) - The stats handlers `NewClientHandler`, `NewServerHandler` in `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` now record RPC durations in `ms` instead of `ns`. ([#​4548](https://togithub.com/open-telemetry/opentelemetry-go-contrib/issues/4548)) </details> <details> <summary>open-telemetry/opentelemetry-go (go.opentelemetry.io/otel)</summary> ### [`v1.21.0`](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0): /v0.44.0 [Compare Source](https://togithub.com/open-telemetry/opentelemetry-go/compare/v1.20.0...v1.21.0) ##### Removed - Remove the deprecated `go.opentelemetry.io/otel/bridge/opencensus.NewTracer`. ([#​4706](https://togithub.com/open-telemetry/opentelemetry-go/issues/4706)) - Remove the deprecated `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` module. ([#​4707](https://togithub.com/open-telemetry/opentelemetry-go/issues/4707)) - Remove the deprecated `go.opentelemetry.io/otel/example/view` module. ([#​4708](https://togithub.com/open-telemetry/opentelemetry-go/issues/4708)) - Remove the deprecated `go.opentelemetry.io/otel/example/fib` module. ([#​4723](https://togithub.com/open-telemetry/opentelemetry-go/issues/4723)) ##### Fixed - Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. ([#​4719](https://togithub.com/open-telemetry/opentelemetry-go/issues/4719)) - Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. ([#​4719](https://togithub.com/open-telemetry/opentelemetry-go/issues/4719)) </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://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/cerbos/cerbos). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Oğuzhan Durgun <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Oğuzhan Durgun <[email protected]>
A new release of `protovalidate-go` that incorporates bufbuild/protovalidate-go#83 and bufbuild/protovalidate-go#80 allows to remove duplicated code for handling repeated fields.
The way we were resolving the CEL types for type-checking expressions was inconsistent between custom and standard constraints. Resulting in compilation errors (particularly around repeated fields). Logic shared between the two (mostly lookups) was moved into the
expression
internal package and used uniformly for both environments.This also improves on a previously discovered bug around the Any WKT where custom expressions against such a field would fail with a runtime error if its underlying type was not known to CEL (CEL treats Any's as the underlying type, instead of the Any message itself). The standard constraints on Any do not have this limitation. We are populating the root CEL environment with
protoregistry.GlobalFiles
for now, but will likely make this configurable in the long-run.Context: bufbuild/protovalidate#92 (comment) (h/t @matthewpi)