-
Notifications
You must be signed in to change notification settings - Fork 129
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: improve errors when running against Konnect with workspace config #696
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #696 +/- ##
==========================================
- Coverage 39.82% 39.79% -0.04%
==========================================
Files 87 87
Lines 9875 9884 +9
==========================================
Hits 3933 3933
- Misses 5563 5572 +9
Partials 379 379 ☔ View full report in Codecov by Sentry. |
cmd/common.go
Outdated
@@ -101,6 +101,14 @@ func syncMain(ctx context.Context, filenames []string, dry bool, parallelism, | |||
var kongClient *kong.Client | |||
mode := getMode(targetContent) | |||
if mode == modeKonnect { | |||
if targetContent.Workspace != "" { | |||
return fmt.Errorf("_workspace set in config file.\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it need to be multi line error message (\n
)?
3e3e4f7
to
9ef8a61
Compare
Please rebase. |
9ef8a61
to
5810ada
Compare
done |
5810ada
to
5f184eb
Compare
5f184eb
to
de491a8
Compare
cmd/common.go
Outdated
if targetContent.Workspace != "" { | ||
return fmt.Errorf("_workspace set in config file.\n" + | ||
"Workspaces are not supported in Konnect. " + | ||
"Please remove '_workspace: foo' from your configuration and try again") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'foo' seems to be a copy-paste error. Could you please update the error message to include the workspace that the user has provided?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
$ ./deck sync --konnect-token $TOKEN_DEV
Error: _workspace set in config file.
Workspaces are not supported in Konnect. Please remove '_workspace: test' from your configuration and try again
de491a8
to
02f125d
Compare
02f125d
to
05f0bcd
Compare
No description provided.