Skip to content

refactor registry command to Complete-Validate-Run - #9236

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
pweil-:registry-cmd-refactor
Jun 15, 2016
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
pweil-:registry-cmd-refactor

Conversation

@pweil-

@pweil- pweil- commented Jun 8, 2016 •

Copy link
Copy Markdown

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

Fixes #8390

@pweil-

pweil- commented Jun 8, 2016

Copy link
Copy Markdown
Author

[test]

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

pweil- commented Jun 9, 2016

Copy link
Copy Markdown
Author

re[test]

Comment thread pkg/cmd/admin/registry/registry.go Outdated
kcmdutil.CheckErr(cfg.Complete(f, cmd, out, args))
kcmdutil.CheckErr(cfg.Validate(cmd, args))

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

@soltysh soltysh Jun 9, 2016 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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-

pweil- commented Jun 9, 2016

Copy link
Copy Markdown
Author

updated for feedback

Comment thread pkg/cmd/admin/registry/registry.go Outdated
nodeSelector map[string]string
ports []kapi.ContainerPort
namespace string
kClient *kclient.Client

Copy link
Copy Markdown
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
Copy Markdown
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-

pweil- commented Jun 15, 2016

Copy link
Copy Markdown
Author

@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
Comment thread pkg/cmd/admin/registry/registry.go Outdated
image := cfg.ImageTemplate.ExpandOrDie(cfg.Type)
if ports, err := app.ContainerPortsFromString(opts.Config.Ports); err != nil {
return err
} else {

Copy link
Copy Markdown
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

soltysh commented Jun 15, 2016

Copy link
Copy Markdown
Contributor

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-

pweil- commented Jun 15, 2016

Copy link
Copy Markdown
Author

nits fixed

@soltysh

soltysh commented Jun 15, 2016

Copy link
Copy Markdown
Contributor

@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

csrwng commented Jun 15, 2016

Copy link
Copy Markdown
Contributor

LGTM [merge]

@openshift-bot

openshift-bot commented Jun 15, 2016 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Evaluated for origin merge up to 611214a

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 611214a

@openshift-bot

Copy link
Copy Markdown
Contributor

@soltysh

soltysh commented Jun 15, 2016

Copy link
Copy Markdown
Contributor

yum flake #9203

[merge]

@openshift-bot
openshift-bot merged commit 7e6e3df into openshift:master Jun 15, 2016
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