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

fix(upstream) proper primary_key in kong schema #2404

Merged
merged 2 commits into from
Apr 25, 2017

Conversation

p0pr0ck5
Copy link
Contributor

Summary

DELETE against upstream objects is currently broken when using cassandra because the schema defines the primary key as {id, name} but both postgres and cassandra schemas actually define their PK with id. this causes failures because cassandra tries to delete against a non PK column.

Full changelog

  • correctly enumerate daos in upstream integration tests
  • make Kong and DB schemas consistent

Issues resolved

Fix #2358

@p0pr0ck5 p0pr0ck5 changed the title Fix/upstream schema fix(upstream) kong schema Apr 18, 2017
@p0pr0ck5 p0pr0ck5 force-pushed the fix/upstream-schema branch 2 times, most recently from 2b08ae9 to 72e5657 Compare April 18, 2017 00:49
@p0pr0ck5 p0pr0ck5 changed the title fix(upstream) kong schema fix(upstream) proper primary_key in kong schema Apr 19, 2017
This uncovers the bug detailed in #2358. This commit does not fix
this bug, it merely fixes the test behaviors to use both cassandra
and postgres.
@p0pr0ck5 p0pr0ck5 force-pushed the fix/upstream-schema branch from 72e5657 to 88c7e14 Compare April 24, 2017 16:31
@thibaultcha thibaultcha added this to the 0.10.2 milestone Apr 25, 2017
@@ -37,25 +38,26 @@ dao_helpers.for_each_dao(function(kong_config)
describe("Admin API", function()
local client
local config_db
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this variable becomes unused now, and I am curious why the CI failed to catch that, if so.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(was it unused? and if so, did the linter caught it locally?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is unused, not sure why the linter didn't catch it. Didn't catch it locally either

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok... Good to know. WE might want to double-check the luacheck settings under the spec folder then... 🤔

Neither cassandra nor postgres' primary key values were a compound
of id and name, so the kong schema's needn't be, either.
@p0pr0ck5 p0pr0ck5 force-pushed the fix/upstream-schema branch from 88c7e14 to 13167c3 Compare April 25, 2017 19:20
@thibaultcha thibaultcha merged commit c00b142 into master Apr 25, 2017
@thibaultcha thibaultcha deleted the fix/upstream-schema branch April 25, 2017 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot delete upstreams on Kong 0.10.1
3 participants