kong icon indicating copy to clipboard operation
kong copied to clipboard

fix(proxy-cache): changes age param

Open joelact opened this issue 3 months ago • 8 comments

Summary

The age parameter on the schema was in lower case which caused the header Age to appear only when the kong debug option was enabled. This commit changes the schema parameter from age to Age.

Checklist

  • [x] The Pull Request has tests
  • [X] 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 #12787

joelact avatar Mar 29 '24 17:03 joelact

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 29 '24 17:03 CLAassistant

Thanks for your contribution @joelact. While a headers are case-insensitive according to the RFC it's a contention to have them Title-cased.

Your change includes a schema change, which requires additional steps to ensure backwards compatibility with older Kong versions. If you choose to follow-up on those, I'm happy to assist you in doing so. Alternatively, we'll pick up the PR and continue from here. Up to you @joelact

jschmid1 avatar Apr 08 '24 12:04 jschmid1

Hey @jschmid1. Thanks for taking a look at this. I want to continue working on this PR so can you tell me the next steps to get this going?

joelact avatar Apr 08 '24 21:04 joelact

Sure @joelact, Your change qualifies as a "rename" of a field. To ensure compatibility to older versions when running Kong in hybrid-mode you have to teach the Kong how to manipulate the plugin config so that older versions still understand it.

You can take a look at the compatibility checkers here -> https://github.com/Kong/kong/blob/master/kong/clustering/compat/checkers.lua

and for testing check this file -> https://github.com/Kong/kong/blob/master/spec/02-integration/09-hybrid_mode/09-config-compat_spec.lua

jschmid1 avatar Apr 11 '24 09:04 jschmid1

Hey @jschmid1! Sorry for the delay in completing the mentioned actions. When possible can you review this again?

joelact avatar Apr 30 '24 15:04 joelact