Skip to content
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

Error: proto: don't know how to compare [], CEL request matcher expects return type of bool #3529

Closed
noelforte opened this issue Jun 28, 2020 · 1 comment · Fixed by #3526
Assignees
Labels
bug 🐞 Something isn't working
Milestone

Comments

@noelforte
Copy link

Environment:

Ubuntu 18.04.4 LTS (Bionic Beaver)


Caddy Version:

2020/06/28 21:27:23 WARNING: proto: file "pb.proto" is already registered
A future release will panic on registration conflicts. See:
https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

v2.1.0 h1:MC4d65RCVaEKy1iOFjsD51mybOwS8qdEVBi7ESDhUfE=

Caddyfile used (as a reduced test case, error can still be replicated):

:443 {
  handle @v2 {
    root * /path/to/v2
  }
  handle {
    root * /path/to/v1
  }
  file_server

  @v2 { 
    expression {http.request.cookie.v2} == 'yes'
  }
}

Details

Steps to reproduce:

  1. Run caddy validate --config <path/to/caddyfile> on the Caddyfile above

Expected output:

Valid configuration.

Actual output:

[...]
proto: don't know how to compare []
[...]
...http.matchers.expression: CEL request matcher expects return type of bool, not primitive:BOOL

Full log:

$ caddy validate --config ./Caddyfile2
2020/06/28 21:31:12 WARNING: proto: file "pb.proto" is already registered
A future release will panic on registration conflicts. See:
https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

2020/06/28 21:31:12.253 INFO    using provided configuration    {"config_file": "./Caddyfile2", "config_adapter": ""}
2020/06/28 21:31:12 [INFO][cache:0xc0004a7a40] Started certificate maintenance routine
2020/06/28 21:31:12 proto: don't know how to compare []
2020/06/28 21:31:12 [INFO][cache:0xc0004a7a40] Stopped certificate maintenance routine
validate: loading http app module: provision http: server srv0: setting up route matchers: route 0: loading matcher modules: module name 'expression': provision http.matchers.expression: CEL request matcher expects return type of bool, not primitive:BOOL
@francislavoie
Copy link
Member

Unfortunately, this is a known regression. A fix is proposed in #3526, and some discussion in #3525 but it still needs to be evaluated.

You can use the CI artifact from that PR for the time being until we have a release that otherwise fixes it: https://github.com/caddyserver/caddy/actions/runs/149591246

@francislavoie francislavoie linked a pull request Jun 29, 2020 that will close this issue
@mholt mholt added this to the v2.1.1 milestone Jun 29, 2020
@mholt mholt added the bug 🐞 Something isn't working label Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants