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: konnect cli flags getting considered for online validation. #1424

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

Prashansa-K
Copy link
Contributor

Earlier, if konnect control plane information was passed via cli flags, online validation for Konnect was failing. This change fixes the issue.

Earlier, if konnect control plane information was passed via
cli flags, online validation for Konnect was failing. This
change fixes the issue.
@Prashansa-K Prashansa-K requested review from samugi and GGabriele and removed request for GGabriele October 22, 2024 06:57
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.

I don't have much background knowledge about the change but it looks good to me. I left a small comment.

var errs []error

if targetContent.Workspace != "" {
errs = append(errs, errors.New(errWorkspace))
}

if targetContent.Konnect == nil {
if targetContent.Konnect == nil && dumpConfig.KonnectControlPlane == "" {
Copy link
Member

Choose a reason for hiding this comment

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

is it always going to be "" or could it also be nil?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a string value. So, always "".

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 27.51%. Comparing base (da3d70e) to head (24da885).

Files with missing lines Patch % Lines
cmd/gateway_validate.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1424   +/-   ##
=======================================
  Coverage   27.51%   27.51%           
=======================================
  Files          61       61           
  Lines        6272     6272           
=======================================
  Hits         1726     1726           
  Misses       4423     4423           
  Partials      123      123           

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

@Prashansa-K Prashansa-K merged commit 947e349 into main Oct 22, 2024
19 checks passed
@Prashansa-K Prashansa-K deleted the fix/konnect-cli-flag branch October 22, 2024 07:19
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.

3 participants