-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Improve error messages for deploy.kubeContext
error cases
#2993
Improve error messages for deploy.kubeContext
error cases
#2993
Conversation
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Also, fix config version of the profiles example. Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Before, the error did not specify which profiles were activated and what is the initial or effective kube-context. Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
cc @balopat as you raised this in #2510 (review). |
Codecov Report
|
} | ||
|
||
func activatedProfiles(profiles []latest.Profile, opts cfg.SkaffoldOptions) ([]string, bool, error) { | ||
func activatedProfiles(profiles []latest.Profile, opts cfg.SkaffoldOptions) ([]string, []string, error) { |
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.
this now returns a list of profiles and activated profile?
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.
Not quite. It returns a list of activated profiles and a list of activated profiles that are kube-context specific. I added a godoc to clarify this.
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
@tejal29 Thanks taking the time to look at this! At your convenience please take another look. |
Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
Relates to #2510 (review)
Description
Improve error logging for two error cases which may happen when configuring the kube-context via
skaffold.yaml
In addition, include the newly added
example/profiles
in integration tests (I assumed that all examples are automatically tested, but this is not the case).User facing changes
after When changing
deploy.kubeContext
of a running Skaffold process, a warn-level log message is printed, sayingbefore When trying to activate conflicting Skaffold profiles, there used to be an error with the message
after This log message was improved to include some more information about the initial and resulting kube-context, and what are the context-specific profiles which got activated by the initial kube-context, e.g.:
Next PRs.
n/a
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Reviewer Notes