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(clustering/sync): insert default values to delta entities before validation #14216

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

Conversation

chobits
Copy link
Contributor

@chobits chobits commented Jan 23, 2025

Summary

Try to align with sync v1 logic, v1 will ignore required fields error because

dc:validate(input)
....
  -> field_schema:process_auto_fields(value, "insert")
  -> route:validate

So when recursively calling the validate() function, it will call process_auto_fields before validating a specific entity inside for sync v1.

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-6249

@github-actions github-actions bot added core/clustering cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Jan 23, 2025
@chobits chobits requested review from ADD-SP and chronolaw January 23, 2025 09:35
@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 23, 2025
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 size/M skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants