Skip to content

Commit

Permalink
Purge CEL Conformance gRPC server (#401)
Browse files Browse the repository at this point in the history
* Remove conformance gRPC server implementation
* Update bazel build to skip tests since there are none
  • Loading branch information
TristonianJones authored Oct 21, 2024
1 parent ede9ed3 commit cce8ebf
Show file tree
Hide file tree
Showing 25 changed files with 12 additions and 4,117 deletions.
4 changes: 2 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
steps:
- name: 'gcr.io/cloud-builders/bazel:6.4.0'
entrypoint: bazel
args: ['test', '--test_output=errors', '...']
id: bazel-test
args: ['build', '...']
id: bazel-build
waitFor: ['-']
timeout: 15m
options:
Expand Down
8 changes: 1 addition & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@ go 1.21.1
toolchain go1.23.0

require (
github.com/bazelbuild/rules_go v0.49.0
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
)

require (
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
)
require github.com/google/go-cmp v0.6.0 // indirect
10 changes: 0 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
github.com/bazelbuild/rules_go v0.49.0 h1:5vCbuvy8Q11g41lseGJDc5vxhDjJtfxr6nM/IC4VmqM=
github.com/bazelbuild/rules_go v0.49.0/go.mod h1:Dhcz716Kqg1RHNWos+N6MlXNkjNP2EwZQ0LukRKJfMs=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
6 changes: 1 addition & 5 deletions tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@ package(

licenses(["notice"]) # Apache 2.0

exports_files([
"LICENSE",
"conftest.sh",
"conftest-nofail.sh",
])
exports_files(["LICENSE"])
56 changes: 8 additions & 48 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,18 @@
# CEL Conformance Tests

The CEL conformance test suites provide a complementary specification
of the CEL language in the form of executable software. All CEL
of the CEL language in the form of executable software. All CEL
implementations which pass the conformance tests should give valid CEL
expressions the same meaning.

A language-independent gRPC protocol allows the tests to run against CEL
components in any language which implement a server for the protocol.
As much as possible, the tests are driven by data files. Implementations
are expected to read the `tests/simple/testdata` files as inputs to the
parse, check, and evaluation behaviors of a given implementation. Reference
implementations may be found in the following locations:

As much as possible, the tests are driven by data files. Implementations
which do not provide a ConformanceService server are welcome to write
their own drivers which read the same `testdata` files.

## Test Suites

We currently have the following test suites:
- *[simple](simple)* The _simple_ tests check the end-to-end
parse-(check)-eval pipeline for fully-specified expressions,
inputs, and output without parse or check failures.
- *[envcheck](envcheck)* The _envcheck_ suite confirms that the checker and
runtime support a set of functions and overloads (though we don't check
the behavior of these functions in this suite).
- Test suites more suitable for other kinds of validation may be introduced
later.

## Integrating with the Tests

Implementations should write a gRPC server for the
[`ConformanceService`
API](https://github.com/googleapis/googleapis/blob/master/google/api/expr/v1alpha1/conformance_service.proto)
See [the cel-go server](https://github.com/google/cel-go/tree/master/server)
as an example.

The server should be available as an executable file. When invoked without
without arguments, the server should listen on an arbitrary available TCP
port on the local loopback address (`127.0.0.1` or `::1`), then write its
address on `stdout` in the format

> `Listening on `_address_`:`_port_
See the [celrpc
library](https://github.com/google/cel-spec/tree/master/tools/celrpc) for an
example of implementing this protocol.

An implementation with only a subset of the execution phases (particularly
runtime-only implementations without a parser or checker) is free to
support only the corresponding API methods. The test suite driver can be
instructed to use a different implementation for the unsupported methods.

Each conformance test suite will contain specific integration instructions.

Implementations which use the [bazel](https://bazel.build) build system
should copy the relevant entries out of the `WORKSPACE` file at the root
of this repository.
* (cel-go conformance)[https://github.com/google/cel-go/tree/master/conformance]
* (cel-cpp conformance)[https://github.com/google/cel-cpp/tree/master/conformance]
* (cel-java conformance)[https://github.com/google/cel-java/tree/main/conformance/src/test/java/dev/cel/conformance]

Each CEL implementation should also have its own unit tests and benchmarks
for testing subcomponents, its API, and other implementation-dependent
Expand Down
8 changes: 0 additions & 8 deletions tests/conftest-nofail.sh

This file was deleted.

2 changes: 0 additions & 2 deletions tests/conftest.sh

This file was deleted.

46 changes: 0 additions & 46 deletions tests/envcheck/BUILD.bazel

This file was deleted.

47 changes: 0 additions & 47 deletions tests/envcheck/README.md

This file was deleted.

Loading

0 comments on commit cce8ebf

Please sign in to comment.