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

own up to the attrocities commited in set #19348

Merged
merged 2 commits into from
Apr 16, 2018

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Apr 13, 2018

demonstrates what a mess we have.

We should never add flags again. This is needed to stop having a fake factory.

/assign @mfojtik

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 13, 2018
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 13, 2018
@deads2k
Copy link
Contributor Author

deads2k commented Apr 13, 2018

@mfojtik do we have any tests on this? I'm surprised I got green out of the gate.

@deads2k
Copy link
Contributor Author

deads2k commented Apr 14, 2018

/hold

Needs tidying before merge

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 14, 2018
@deads2k deads2k removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 16, 2018
@deads2k
Copy link
Contributor Author

deads2k commented Apr 16, 2018

tidying completed. Ready for review

@mfojtik
Copy link
Contributor

mfojtik commented Apr 16, 2018

@deads2k can we just get rid of ResolveImage altogether and just call the patched resolve image? The factory function is exclusively used only by 'set' command.

@deads2k
Copy link
Contributor Author

deads2k commented Apr 16, 2018

@deads2k can we just get rid of ResolveImage altogether and just call the patched resolve image? The factory function is exclusively used only by 'set' command.

I don't think we should do that in this patch. I think that removing methods like that should be done upstream first. Otherwise we just end up carrying debt.

@@ -117,7 +122,7 @@ func (o *ImageOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []st
o.ChangeCause = f.Command(cmd, false)
o.DryRun = cmdutil.GetDryRunFlag(cmd)
o.Output = cmdutil.GetFlagString(cmd, "output")
o.ResolveImage = f.ResolveImage
o.ResolveImage = resolveImageFactory(f, cmd)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we get rid of this field for set image and just call the function directly in Run() ? Also remove it from upstream factory as it is not used anywhere else.

@mfojtik
Copy link
Contributor

mfojtik commented Apr 16, 2018

@deads2k i'm fine with follow up (I can do it after this merges)... that shim was introduced by us by trying to plug our image resolution into upstream kubectl.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, mfojtik

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2018
@deads2k deads2k added the lgtm Indicates that a PR is ready to be merged. label Apr 16, 2018
@openshift-merge-robot openshift-merge-robot merged commit 51a314b into openshift:master Apr 16, 2018
@deads2k deads2k deleted the cli-30-set branch July 3, 2018 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants