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

all cli commands fail if config file doesn't exist already #1341

Closed
4 tasks done
christianh814 opened this issue Dec 28, 2023 · 3 comments · Fixed by #1345
Closed
4 tasks done

all cli commands fail if config file doesn't exist already #1341

christianh814 opened this issue Dec 28, 2023 · 3 comments · Fixed by #1345
Assignees
Milestone

Comments

@christianh814
Copy link
Member

Checklist

  • I've searched the issue queue to verify this is not a duplicate bug report.
  • I've included steps to reproduce the bug.
  • I've pasted the output of kargo version.
  • I've pasted logs, if applicable.

Description

Running kargo version when you're not logged in returns an error

Example

$ kargo version
Error: get version info from server: unavailable: unsupported protocol scheme ""

Steps to Reproduce

First:

rm -rf ~/.config/kargo

Then

kargo version

Expected behavior

There should be a --client flag that returns the version of the client when not logged into a Kargo server

Example:

kargo version --client
@christianh814 christianh814 added kind/bug area/cli help-wanted Community help on this would be appreciated labels Dec 28, 2023
@krancour
Copy link
Member

It's not just version. It's actually all commands that fail with this if you don't have an existing config file. Even login fails.

It appears to have been introduced in #1179

cc @devholic

@krancour krancour changed the title The kargo version command doesn't work when not logged in all cli commands fail if config file doesn't exist already Dec 29, 2023
@krancour krancour added priority/urgent Fix right away and removed help-wanted Community help on this would be appreciated needs/priority labels Dec 29, 2023
@krancour krancour added this to the v0.3.1 milestone Dec 29, 2023
@bygui86
Copy link

bygui86 commented Jan 1, 2024

Hi @krancour when do you plan/think to release kargo cli v0.3.1 to fix this issue?
It's quite critical as it's not possible to test the quickstart guide because not possible to create any project.
Is there an alternative way to create a Kargo Project? maybe YAML?

devholic pushed a commit that referenced this issue Jan 2, 2024
Fixes #1341

Currently, the CLI entrypoint and some commands assumes that the config
file exists in the home directory. So all commands and config-related
commands (e.g. `config set`, `config unset`) are failing if the config
file does not exist.

This commit fixes this issue by returning an default config if the
config file does not exists in the CLI entrypoint and creates the
config file if necessary in config-related commands.

Signed-off-by: Sunghoon Kang <hoon@akuity.io>
@krancour
Copy link
Member

krancour commented Jan 2, 2024

@bygui86 I expect v0.3.1 to be released today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants