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: do not set instance_name of plugin if Kong version is below 3.2.0 #5250

Merged
merged 6 commits into from
Nov 29, 2023

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented Nov 29, 2023

What this PR does / why we need it:

Kong added instance_name field first in 3.2.0: https://docs.konghq.com/gateway/3.2.x/admin-api/#plugin-object. If Kong version is below 3.2.0, we should not set instance_name field to prevent "unknown field" error.

Which issue this PR fixes:

Fixes #5241

Special notes for your reviewer:

Added KongVersion in KongState structure. This requires setting KongVersion every where when KongState is used because this field cannot be left empty. Please check if there are any missing places. reverted the change after update.
PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR
    REVIEW: I did not see CHANGELOG of 2.12.1/2.12.2 in the release/2.12.x branch. When do we update the changelog?

@randmonkey randmonkey requested a review from a team as a code owner November 29, 2023 05:34
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (release/2.12.x@b218821). Click here to learn what that means.

Additional details and impacted files
@@               Coverage Diff                @@
##             release/2.12.x   #5250   +/-   ##
================================================
  Coverage                  ?   68.0%           
================================================
  Files                     ?     165           
  Lines                     ?   19343           
  Branches                  ?       0           
================================================
  Hits                      ?   13160           
  Misses                    ?    5397           
  Partials                  ?     786           

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

@randmonkey randmonkey self-assigned this Nov 29, 2023
internal/dataplane/kongstate/kongstate.go Outdated Show resolved Hide resolved
internal/dataplane/kongstate/util.go Outdated Show resolved Hide resolved
@randmonkey randmonkey added this to the KIC v2.12.x milestone Nov 29, 2023
@randmonkey randmonkey force-pushed the fix/instance_plugin_name branch from f85aa74 to c46d93e Compare November 29, 2023 10:17
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.

3 participants