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

refactor registry command to Complete-Validate-Run #9236

Merged
merged 1 commit into from
Jun 15, 2016

Conversation

pweil-
Copy link

@pweil- pweil- commented Jun 8, 2016

@soltysh - for repayment of the Krowka candy you brought here is the refactoring I owed you.

Fixes #8390

@pweil-
Copy link
Author

pweil- commented Jun 8, 2016

[test]

@pweil- pweil- changed the title refactor to Complete-Validate-Run refactor registry command to Complete-Validate-Run Jun 8, 2016
@pweil-
Copy link
Author

pweil- commented Jun 9, 2016

re[test]

@@ -131,6 +141,9 @@ func NewCmdRegistry(f *clientcmd.Factory, parentName, name string, out io.Writer
Long: registryLong,
Example: fmt.Sprintf(registryExample, parentName, name),
Run: func(cmd *cobra.Command, args []string) {
kcmdutil.CheckErr(cfg.Complete(f, cmd, out, args))
kcmdutil.CheckErr(cfg.Validate(cmd, args))

err := RunCmdRegistry(f, cmd, out, cfg, args)
Copy link
Contributor

@soltysh soltysh Jun 9, 2016

Choose a reason for hiding this comment

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

This should be turned into kcmdutil.CheckErr(cfg.Run()) as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

The out here can be moved into RegistryConfig, args not needed at all.

Copy link
Author

Choose a reason for hiding this comment

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

I didn't change it because of the ErrExit handling below which would change the overall behavior. I can look at that portion more

@pweil- pweil- force-pushed the registry-cmd-refactor branch from f6de223 to 118f827 Compare June 9, 2016 21:15
@pweil-
Copy link
Author

pweil- commented Jun 9, 2016

updated for feedback

nodeSelector map[string]string
ports []kapi.ContainerPort
namespace string
kClient *kclient.Client
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a service namespacer?

Copy link
Author

Choose a reason for hiding this comment

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

yes

@pweil- pweil- force-pushed the registry-cmd-refactor branch 2 times, most recently from 799f9f3 to 6cac0cd Compare June 15, 2016 13:47
@pweil-
Copy link
Author

pweil- commented Jun 15, 2016

@soltysh @Kargakis - comments addressed

@csrwng PTAL since I had to adjust some of the cluster up command for the registry

@pweil- pweil- force-pushed the registry-cmd-refactor branch from 6cac0cd to abbf350 Compare June 15, 2016 14:01
image := cfg.ImageTemplate.ExpandOrDie(cfg.Type)
if ports, err := app.ContainerPortsFromString(opts.Config.Ports); err != nil {
return err
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

else not needed.

@soltysh
Copy link
Contributor

soltysh commented Jun 15, 2016

Nits, overall LGTM. Thank you!

@pweil- pweil- force-pushed the registry-cmd-refactor branch from abbf350 to 9b5fa12 Compare June 15, 2016 14:35
@pweil-
Copy link
Author

pweil- commented Jun 15, 2016

nits fixed

@soltysh
Copy link
Contributor

soltysh commented Jun 15, 2016

@csrwng merge is at your disposal

@pweil- pweil- force-pushed the registry-cmd-refactor branch from 9b5fa12 to 611214a Compare June 15, 2016 14:40
@csrwng
Copy link
Contributor

csrwng commented Jun 15, 2016

LGTM [merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 15, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4938/) (Image: devenv-rhel7_4383)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 611214a

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 611214a

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4907/)

@soltysh
Copy link
Contributor

soltysh commented Jun 15, 2016

yum flake #9203

[merge]

@openshift-bot openshift-bot merged commit 7e6e3df into openshift:master Jun 15, 2016
@0xmichalis
Copy link
Contributor

1280-beer-infographic_0

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.

5 participants