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(correlation-id): auto-complete config.generator when constructing if it is null in database #13439

Merged
merged 6 commits into from
Aug 7, 2024

Conversation

liverpool8056
Copy link
Contributor

@liverpool8056 liverpool8056 commented Aug 1, 2024

Summary

Some fields in the request body to admin api occasionally are specified as json.null.
In this PR, we add required=true to the schema of the field so that it can be auto-completed with the default when construction if it is null in database. It will become a mandatory field in KM.

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

FTI-6134

@github-actions github-actions bot added core/db schema-change-noteworthy cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Aug 1, 2024
@liverpool8056 liverpool8056 force-pushed the fix-correlationID-generator-null branch 2 times, most recently from d0452be to 740a9c9 Compare August 1, 2024 03:36
Copy link
Contributor

@ms2008 ms2008 left a comment

Choose a reason for hiding this comment

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

null means "don't use the default" in Kong

This is a feature, not a bug. See #9466 (comment) for details.

@liverpool8056 liverpool8056 marked this pull request as draft August 1, 2024 06:43
@liverpool8056 liverpool8056 force-pushed the fix-correlationID-generator-null branch from 740a9c9 to e3356d9 Compare August 1, 2024 13:28
@liverpool8056 liverpool8056 changed the title fix(db.schema): auto-complete fields which are specified as json.null fix(correlation-id): auto-complete config.generator when constructing if it is null in database Aug 1, 2024
@liverpool8056 liverpool8056 marked this pull request as ready for review August 1, 2024 13:35
@ms2008 ms2008 merged commit 166f465 into master Aug 7, 2024
27 checks passed
@ms2008 ms2008 deleted the fix-correlationID-generator-null branch August 7, 2024 03:25
@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

oowl pushed a commit that referenced this pull request Aug 15, 2024
… if it is `null` in database (#9886)

* fix(correlation-id): make `generator` a required field to prevent it from being set to `null` (#13439)

Some fields in the request body to admin api occasionally are specified as `json.null`.

In this PR, we add `required=true` to the schema of the field so that it can be auto-completed with the default when construction if it is `null` in database. It will become a mandatory field in KM.

(cherry picked from commit 166f465)

* add copyright header

---------

Co-authored-by: Robin Xiang <liverpool8056@163.com>
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