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: use replaced_with to check for deprecated fields #472

Merged
merged 3 commits into from
Oct 22, 2024

Conversation

Prashansa-K
Copy link
Collaborator

@Prashansa-K Prashansa-K commented Oct 17, 2024

In schemas, shorthand_fields that are deprecated
will use "replaced_with" going forward to convey the new fields that would be used in place of the old ones. Earlier, "translate_backwards" was used for the same.

This change ensures that both of the above mentioned fields can be used to find the new path that leads to the new values for comparison purposes. This will help tools like deck to show diff between syncs.

Fixes deck #1440
Corresponding PR: Kong/kong#13768

In schemas, shorthand_fields that are deprecated
will use "replaced_with" going forward to convey the
new fields that would be used in place of the old ones.
Earlier, "translate_backwards" was used for the same.

This change ensures that both of the above mentioned fields
can be used to find the new path that leads to the new values
for comparison purposes. This will help tools like deck
to show diff between syncs.
@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 54.04%. Comparing base (bda51cd) to head (42908e9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
kong/utils.go 0.00% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #472      +/-   ##
==========================================
- Coverage   54.14%   54.04%   -0.10%     
==========================================
  Files          71       71              
  Lines        5589     5599      +10     
==========================================
  Hits         3026     3026              
- Misses       1944     1954      +10     
  Partials      619      619              
Flag Coverage Δ
2.1 33.54% <0.00%> (-0.07%) ⬇️
2.2 44.18% <0.00%> (-0.08%) ⬇️
2.3 44.75% <0.00%> (-0.09%) ⬇️
2.4 44.82% <0.00%> (-0.09%) ⬇️
2.5 44.82% <0.00%> (-0.09%) ⬇️
2.6 44.82% <0.00%> (-0.09%) ⬇️
2.7 46.32% <0.00%> (-0.09%) ⬇️
2.8 46.32% <0.00%> (-0.09%) ⬇️
3.0 49.93% <0.00%> (-0.09%) ⬇️
3.1 51.29% <0.00%> (-0.10%) ⬇️
3.2 51.29% <0.00%> (-0.10%) ⬇️
3.3 51.29% <0.00%> (-0.10%) ⬇️
3.4 53.34% <0.00%> (-0.10%) ⬇️
3.5 51.47% <0.00%> (-0.10%) ⬇️
3.6 51.47% <0.00%> (-0.10%) ⬇️
community 40.34% <0.00%> (-0.08%) ⬇️
enterprise 52.61% <0.00%> (-0.10%) ⬇️
integration 54.04% <0.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@samugi samugi left a comment

Choose a reason for hiding this comment

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

LGTM, left a comment.

kong/utils.go Outdated Show resolved Hide resolved
@Prashansa-K
Copy link
Collaborator Author

@pmalek Could you help with an approval here please? We need one from code-owners to merge this PR. Sam has done the code review for this.

@Prashansa-K Prashansa-K merged commit 82f0eb1 into main Oct 22, 2024
79 checks passed
@Prashansa-K Prashansa-K deleted the fix/shorthand-fields-deprecation branch October 22, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deck diff shows a diff for shorthand fields
4 participants