fix: add admin schema to control_plane config#8809
Conversation
spacewander
left a comment
There was a problem hiding this comment.
Can you add a test to validate the admin schema in https://github.com/apache/apisix/blob/master/t/cli/test_deployment_control_plane.sh?
So we won't miss schema next time.
5964f9e to
e4e5a27
Compare
I added test case for this pr. I wanted to through |
spacewander
left a comment
There was a problem hiding this comment.
You can provide an incorrect type in
Line 338 in e021266
The basic rule: try your best to avoid touching the functional code when you write test
4b90878 to
b1eb207
Compare
|
@spacewander I can't reproduce the failed CI, could you guide me how to fix it? |
|
@jiangfucheng You can make an empty commit and push it to re-run the CI. This might be some error that does not occur consistently. |
| ' > conf/config.yaml | ||
|
|
||
| out=$(make init 2>&1 || true) | ||
| if ! echo "$out" | grep 'expect: number, but got: string'; then |
There was a problem hiding this comment.
The err is from there:
Line 180 in 0bc65ea
It is detected before the schema check.
We should find another way to validate the schema check.
There was a problem hiding this comment.
I changed a special field, it can be merged, but can't pass config validation, although this way is not perfect。🤣
| }, | ||
| }, | ||
| required = {"etcd", "role_control_plane"} | ||
| required = {"etcd", "admin", "role_control_plane"} |
There was a problem hiding this comment.
The admin is not required as we always have a default value.
b1eb207 to
05a480e
Compare
| cert: t/certs/mtls_server.crt | ||
| cert_key: t/certs/mtls_server.key | ||
| admin: | ||
| https_admin: "abc" |
There was a problem hiding this comment.
| https_admin: "abc" | |
| https_admin: "abc" |
* upstream/master: fix: limit count plugin conf parameter undefined error (apache#8902) chore: remove duplicate kubernetes test case (apache#8882) feat: add 'range_id' algorithm for 'request-id' plugin (apache#8790) chore(error-log-logger): add kafka meta_refresh_interval (apache#8821) chore(deps): bump golang.org/x/net from 0.2.0 to 0.7.0 in /t/grpc_server_example (apache#8881) docs: Update getting-started.md (apache#8763) fix(admin): fix wrong http code for patch method (apache#8855) feat: stream subsystem support tars service discovery (apache#8826) feat(ci): implement image caching to reduce ci build time. (apache#8735) feat(admin): add head method support to /apisix/admin (apache#8752) feat: opentelemetry plugin config collector.address support specify https scheme (apache#8823) fix: add admin schema to control_plane config (apache#8809)
Description
Fixes #8804
Maybe just add the schema of admin to conrol_plane config definition is enough?
Checklist