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: Make logging on unmatched selectors less verbose #217

Merged

Conversation

mumoshu
Copy link
Collaborator

@mumoshu mumoshu commented Aug 22, 2018

Fixes #200
Depends on #216 because this feature requires zap.SuggeredLogger to be passed to HelmState, which is done as part of #200

@mumoshu mumoshu force-pushed the less-verbose-unmatched-selector-logging branch from d2322a5 to ba030ae Compare August 22, 2018 09:58
@mumoshu mumoshu force-pushed the less-verbose-unmatched-selector-logging branch from ba030ae to fcb75fa Compare August 23, 2018 00:24
@mumoshu mumoshu merged commit c402759 into roboll:master Aug 23, 2018
@mumoshu mumoshu deleted the less-verbose-unmatched-selector-logging branch August 23, 2018 00:27
@osterman
Copy link
Contributor

Thanks @mumoshu !

mumoshu added a commit to mumoshu/helmfile that referenced this pull request Aug 24, 2018
Along with the fix for the bug introduced via roboll#217

Resolves roboll#219
@@ -607,7 +607,8 @@ func (state *HelmState) FilterReleases(labels []string) error {
filteredReleases = append(filteredReleases, r)
}
if len(filteredReleases) == 0 {
return fmt.Errorf("specified selector did not match any releases in %s\n", state.file)
state.logger.Debugf("specified selector did not match any releases in %s\n", state.file)
return nil
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This broke helmfile's ability to filter the unmatched releases. Returning nil here means that you filter nothing.

#225 includes the fix for it.

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.

2 participants