-
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
feat(entities): add updated_at
column for entities
#10400
Conversation
0295079
to
5b60f5c
Compare
712f503
to
46b8c34
Compare
What about workspaces.lua, clustering_data_planes.lua? |
@hbagdi |
3fd4266
to
eafa35f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we need not to deal with version compatibility problem, I think this PR is OK.
The workspace schema is under the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good overall.
I'm not sure if adding a new field for these core entities would break DP-CP version compatibility.
The entity definition for it is right here: https://github.com/Kong/kong/blob/master/kong/db/schema/entities/workspaces.lua
The entity is user-facing and we expose a read-only endpoint for it: https://github.com/Kong/kong/blob/master/kong/api/routes/clustering.lua#L22. |
@hbagdi The last_seen field in clustering_data_plane seems have the same semantic with updated_at? If so, do we still have to add it? |
updated_at
column for entities
I recommend doing so for consistency than anything else. I see the point that it doesn't provide additional value. |
9718c8b
to
584bf2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one fix is still needed.
f03d4b5
to
b758f57
Compare
@liverpool8056 are the migration tests broken (because of something outside this PR)? |
…ompat and fixes spec
b758f57
to
86d5299
Compare
After taking another look, there is something that should be adjusted. Have synced with @liverpool8056 offline. 1/ missing kong/kong/clustering/compat/init.lua Line 375 in 66895f6
(Should add nil check before setting x.updated = nil 2/ Should add a test case against the new-added compatibility logic in spec/01-unit/19-hybrid/03-compat_spec.lua |
that forgetting to set the `has_updated` flag
Summary
add updated_at column for entities
Checklist
Full changelog
Issue reference