-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Schema validation in db-less mode Kong 1.4 #5401
Comments
@altexy, thanks for reporting. Possibly a bug. |
@hishamhm, do you have an idea about this? |
### Summary ### Issues Resolved Fix #5401
### Summary This was reported with #5401. When I added DAO transformations, for some reason I ended up writing stupid code that just broke the whole schema validation on declarative. This commit is an attempt to fix that. Sorry for all the pain caused. While fixing this, I also found out that original validation didn't work correctly when you had entity validations that relied on values of foreign keys. This is now also corrected. ### Issues Resolved Fix #5401
### Summary This was reported with #5401. The changes for adding DAO transformations ended up breaking schema validation on declarative mode. This commit fixes that. While fixing this, I also found out that original validation didn't work correctly when you had entity validations that relied on values of foreign keys. This is now also corrected. ### Issues Resolved Fix #5401
Re-opening because https://discuss.konghq.com/t/kong-2-0-1-db-less-schema-validation-issue/6375 |
I can confirm that this only happens with E.g. start with: _format_version: "1.1"
services:
- name: sample_api
host: kong.test
port: 4000 KONG_DATABASE=off KONG_DECLARATIVE_CONFIG=b.yaml ./bin/kong start --vv And you have: {
"data": [
{
"client_certificate": null,
"connect_timeout": 60000,
"created_at": 1590998526,
"host": "kong.test",
"id": "f43346f0-16f5-55b3-b815-f4dfa7cdb1e8",
"name": "sample_api",
"path": null,
"port": 4000,
"protocol": "http",
"read_timeout": 60000,
"retries": 5,
"tags": null,
"updated_at": 1590998526,
"write_timeout": 60000
}
],
"next": null
} Then _format_version: "1.1"
services:
- name: sample_api
port: 4000
- name: sample_api2
host: another.test
port: 4000 KONG_DATABASE=off KONG_DECLARATIVE_CONFIG=b.yaml ./bin/kong reload --vv And you have:
Also:
So I think that perhaps the |
I think it is expected. |
I am closing this now. Please reopen if you have any further info, or need more guidance. |
Summary
Schema validation silently ignored when starting Kong in db-less mode.
Steps To Reproduce
Kong 1.3.x failed to start, the error log contains an appropriate message.
Kong 1.4.x silently start, no schema validation logs present.
Additional Details & Logs
The text was updated successfully, but these errors were encountered: