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): flatten and report validation error #14262

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

chobits
Copy link
Contributor

@chobits chobits commented Feb 12, 2025

Summary

  1. flatten validation error for sync deltas
  2. call RPC notify to API kong.sync.v2.notify_validation_error (spec: https://github.com/Kong/openrpc_specfiles/pull/18/)
  3. fix bug that CP will crash if DP calls a non-existent RPC notify: KAG-6381

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-6351 KAG-5898 KAG-6381

@chobits chobits requested review from flrgh and chronolaw and removed request for flrgh February 12, 2025 03:28
@github-actions github-actions bot added core/clustering core/db cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Feb 12, 2025
@chobits chobits requested a review from flrgh February 12, 2025 03:29
kong/clustering/services/sync/rpc.lua Outdated Show resolved Hide resolved
kong/clustering/services/sync/validate.lua Outdated Show resolved Hide resolved
@chronolaw
Copy link
Contributor

We should open a same PR in CE.

@chobits
Copy link
Contributor Author

chobits commented Feb 12, 2025

We should open a same PR in CE.

this is a CE pr now

kong/clustering/services/sync/rpc.lua Show resolved Hide resolved
if not ok then
notify_error(ns_delta.lastest_version, err_t)
Copy link
Contributor

Choose a reason for hiding this comment

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

Which version should we use? dp's current version or delta's version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this lastest_version will be introduced by this rpc spec: https://github.com/Kong/openrpc_specfiles/pull/18

Copy link
Contributor Author

@chobits chobits Feb 12, 2025

Choose a reason for hiding this comment

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

https://github.com/Kong/kong-ee/pull/11238 introduces this new field

Copy link
Contributor

Choose a reason for hiding this comment

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

if no this field, could we use deltas[#deltas].version?

kong/clustering/services/sync/validate.lua Show resolved Hide resolved
@chobits
Copy link
Contributor Author

chobits commented Feb 12, 2025

For pre-running ee test cases, see this pr: https://github.com/Kong/kong-ee/pull/11363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee core/clustering core/db size/L skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants