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: validate configPatches for KongClusterPlugin #5208

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented Nov 21, 2023

What this PR does / why we need it:

  • Fix the validation of KongClusterPlugin to generate configuration using configPatches
  • Do not share code of ValidateKongPlugin in ValidateKongClusterPlugin

Which issue this PR fixes:

fixes the problem of validator for KongClusterPlugin in #5158.

Special notes for your reviewer:

REVIEW: how do we write changelog here? This is a fix on a not yet released feature.

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

@randmonkey randmonkey requested a review from a team as a code owner November 21, 2023 06:49
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (63253d7) 76.8% compared to head (e8880fe) 76.8%.
Report is 7 commits behind head on main.

Files Patch % Lines
internal/admission/validator.go 88.2% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main   #5208     +/-   ##
=======================================
- Coverage   76.8%   76.8%   -0.1%     
=======================================
  Files        170     170             
  Lines      19050   19056      +6     
=======================================
- Hits       14649   14648      -1     
- Misses      3575    3578      +3     
- Partials     826     830      +4     

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

internal/admission/validator_test.go Outdated Show resolved Hide resolved
internal/dataplane/kongstate/plugin.go Outdated Show resolved Hide resolved
internal/dataplane/kongstate/plugin.go Outdated Show resolved Hide resolved
internal/admission/validator_test.go Outdated Show resolved Hide resolved
internal/admission/validator.go Outdated Show resolved Hide resolved
internal/admission/validator.go Outdated Show resolved Hide resolved
internal/admission/validator.go Outdated Show resolved Hide resolved
internal/admission/validator_test.go Outdated Show resolved Hide resolved
@czeslavo
Copy link
Contributor

how do we write changelog here? This is a fix on a not yet released feature.

I'd say we just skip the changelog entry in such cases. 👍

@randmonkey
Copy link
Contributor Author

how do we write changelog here? This is a fix on a not yet released feature.

I'd say we just skip the changelog entry in such cases. 👍

How about adding a link to this PR under the original entry?

@czeslavo
Copy link
Contributor

How about adding a link to this PR under the original entry?

Yeah, it can work as well 👍

@randmonkey
Copy link
Contributor Author

Found that we did not include tests on validation webhook of plugins (TestValidationWebhook only contains tests for validating credentials/consumers). Should we add them? If so, I'll create another issue.

@czeslavo
Copy link
Contributor

Found that we did not include tests on validation webhook of plugins (TestValidationWebhook only contains tests for validating credentials/consumers). Should we add them? If so, I'll create another issue.

+1 for a separate issue.

@randmonkey randmonkey merged commit 862c621 into main Nov 22, 2023
37 checks passed
@randmonkey randmonkey deleted the fix/validate_kongclusterplugin_config_patches branch November 22, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants