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

Check if --konnect-addr is set #1385

Open
2 tasks
mheap opened this issue Aug 28, 2024 · 0 comments · May be fixed by #1398
Open
2 tasks

Check if --konnect-addr is set #1385

mheap opened this issue Aug 28, 2024 · 0 comments · May be fixed by #1398
Assignees

Comments

@mheap
Copy link
Member

mheap commented Aug 28, 2024

Using the command

deck ping --konnect-addr https://us.api.konghq.com

returns the error message

Error: reading Kong version: making HTTP request: Get "http://localhost:8001/": dial tcp [::1]:8001: connect: connection refused

In the above use case, the user is trying to ping konnect, however, the error message appears to be responding to the default --kong-addr value which is a self-managed setup ( and a completely different URL )

Analysis

The problem in this case is that decK has no way to determine whether the user wanted to ping Konnect or Kong: the https://us.api.konghq.com value passed via the --konnect-addr is the default one decK uses for Konnect, so the command the customer ran is actually equivalent to just deck ping.

Acceptance Criteria

  • Detect the presence of --konnect-addr using viper.isSet and change the error message as needed
  • All commands detect --konnect-addr being provided, not just deck ping
@mheap mheap changed the title Check if --konnect-addr is set in deck ping Check if --konnect-addr is set Sep 6, 2024
Prashansa-K added a commit that referenced this issue Sep 11, 2024
Previously, if a deck command was issued with --konnect-addr flag
but with the default konnectUrl https://us.api.konghq.com, the
flag value was getting ignored as deck could not figure out
if it was passed by flag or not. This change ensures that if the
flag is set, deck commands are issued against Konnect.

Fixes: #1385
@Prashansa-K Prashansa-K self-assigned this Sep 23, 2024
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 a pull request may close this issue.

2 participants