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

feat(clustering/sync): validate deltas when syncing #14127

Merged
merged 42 commits into from
Jan 22, 2025

Conversation

chobits
Copy link
Contributor

@chobits chobits commented Jan 10, 2025

Summary

  1. validate entity schema
    • call kong.db[entity].validate(entity) over all the entities from deltas
  2. validate entity's references (foreign references)
  3. TODO: report error if deleting delta operation could not find its associated entity in LMDB and deltas: https://konghq.atlassian.net/browse/KAG-6238

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix KAG-5897

@chronolaw chronolaw changed the title feat(sync): validate deltas feat(clustering/sync): validate deltas Jan 10, 2025
kong/clustering/services/sync/validate.lua Outdated Show resolved Hide resolved
kong/clustering/services/sync/validate.lua Outdated Show resolved Hide resolved
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
@github-actions github-actions bot added core/clustering core/db schema-change-noteworthy cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Jan 13, 2025
@chobits chobits force-pushed the feat/sync_validate_deltas branch from 888f1a4 to 281683a Compare January 13, 2025 08:06
spec/fixtures/dc_blueprints.lua Show resolved Hide resolved
spec/internal/db.lua Show resolved Hide resolved
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
@chobits chobits force-pushed the feat/sync_validate_deltas branch from 1311558 to 34a04dd Compare January 14, 2025 02:14
@chronolaw chronolaw requested a review from Water-Melon January 14, 2025 02:22
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
kong/db/declarative/init.lua Outdated Show resolved Hide resolved
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
kong/init.lua Outdated Show resolved Hide resolved
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
kong/db/schema/others/declarative_config.lua Outdated Show resolved Hide resolved
kong/init.lua Outdated Show resolved Hide resolved
spec/fixtures/dc_blueprints.lua Show resolved Hide resolved
@chronolaw chronolaw changed the title feat(clustering/sync): validate deltas feat(clustering/sync): validate deltas when syncing Jan 17, 2025
@chronolaw chronolaw marked this pull request as draft January 20, 2025 01:57
@chobits chobits marked this pull request as ready for review January 20, 2025 10:26
Copy link
Contributor

@chronolaw chronolaw left a comment

Choose a reason for hiding this comment

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

Approved, leaving some small changes to do.

@ADD-SP ADD-SP merged commit c85bc75 into master Jan 22, 2025
34 checks passed
@ADD-SP ADD-SP deleted the feat/sync_validate_deltas branch January 22, 2025 05:15
@ADD-SP ADD-SP added incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention and removed incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants