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

print master config error if it exists #12832

Conversation

juanvallejo
Copy link
Contributor

Related bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1419472

Although a MasterConfig load error is stored globally, it is only printed the first time that it is encountered during a diagnostics check.

This patch ensures that, even if the error has already been encountered once, its message gets printed in subsequent diagnostic checks.

@openshift/cli-review @sosiouxme

@juanvallejo
Copy link
Contributor Author

[test]

@juanvallejo juanvallejo force-pushed the jvallejo/always-print-master-config-load-error branch from e1971c5 to 7fa03f5 Compare February 6, 2017 19:58
} else {
r.Debug("DH0003", fmt.Sprintf("Found a master config file: %[1]s", masterConfigFile))
}
return masterConfig, masterConfigLoadError
}

func printMasterConfigLoadError(r types.DiagnosticResult, masterConfigFile string) {
if masterConfigLoadError != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not opposed to having a helper method if there's good reason. Though I'd recommend just printing the error and assume the caller has handled the error checking.

@brenton
Copy link
Contributor

brenton commented Feb 7, 2017

@jcantrill, Would you mind taking a look at this PR?

@jcantrill
Copy link
Contributor

LGTM. You may wish to alter your commit message per the guidelines here: https://mojo.redhat.com/docs/DOC-1093603

print master config error if it exists
@juanvallejo juanvallejo force-pushed the jvallejo/always-print-master-config-load-error branch from 7fa03f5 to 72c6f26 Compare February 7, 2017 14:40
@juanvallejo
Copy link
Contributor Author

@brenton @jcantrill
Thanks for the feedback! Review comments have been addressed

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 72c6f26

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13659/) (Base Commit: 861c5fb)

@jwforres
Copy link
Member

jwforres commented Feb 8, 2017

@jcantrill ok to merge this now?

@jcantrill
Copy link
Contributor

LGTM [merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 72c6f26

@openshift-bot
Copy link
Contributor

openshift-bot commented Feb 9, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13659/) (Base Commit: 863f435) (Image: devenv-rhel7_5882)

@openshift-bot openshift-bot merged commit 893fd81 into openshift:master Feb 9, 2017
@juanvallejo juanvallejo deleted the jvallejo/always-print-master-config-load-error branch February 9, 2017 14:42
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.

None yet

5 participants