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

Volume strategic merge #11062

Merged
merged 1 commit into from
Oct 8, 2016

Conversation

gnufied
Copy link
Member

@gnufied gnufied commented Sep 23, 2016

Implement volume request using strategic merge patch. Fixes #4351

@fabianofranz
Copy link
Member

@openshift/cli-review @deads2k

@fabianofranz
Copy link
Member

@liggitt

@fabianofranz
Copy link
Member

[test]

@fabianofranz
Copy link
Member

Needs tests.

@fabianofranz
Copy link
Member

@smarterclayton

@gnufied
Copy link
Member Author

gnufied commented Sep 27, 2016

@fabianofranz okay I am going to add some unit tests. Or did you mean some e2e tests too?

@gnufied
Copy link
Member Author

gnufied commented Sep 27, 2016

please hold on from merging this until I add some more tests.

@fabianofranz
Copy link
Member

@gnufied unit and if possible something in test/cmd/volumes.sh. Thanks!

@gnufied
Copy link
Member Author

gnufied commented Sep 28, 2016

@fabianofranz PTAL, I have added unit tests for this. I do not think it is easily doable to further test this via test/cmd/volume.sh externally since nothing changes from end user perspective. cc @childsb

Copy link
Contributor

@jsafrane jsafrane left a comment

Choose a reason for hiding this comment

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

LGTM, however I am not expert on oc commands.

return fakeMapping
}

func TestVolumeRunWithPatch(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would appreciate a test both for add and remove, this one does remove only.

Copy link
Member Author

Choose a reason for hiding this comment

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

okay, will add. But partly It was intentional, the add path requires mocked objects which are rather complicated to fake/mock. :(

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a test for the scenario when volume is added as well.

@fabianofranz
Copy link
Member

@deads2k could you give this one a pass?

if v.List {
listingErrors := v.printVolumes(infos)
if len(listingErrors) > 0 {
return cmdutil.ErrExit
Copy link
Contributor

Choose a reason for hiding this comment

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

why aren't errors reported here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I could move error printing to here but since v.printVolumes already prints the errors, I did not bother.

@deads2k
Copy link
Contributor

deads2k commented Oct 3, 2016

I didn't go super deep, but it looks reasonable.

@gnufied
Copy link
Member Author

gnufied commented Oct 4, 2016

@jsafrane Added a test case for add volume scenario as well. PTAL.

@deads2k
Copy link
Contributor

deads2k commented Oct 4, 2016

Could use a squash.

@fabianofranz
Copy link
Member

Could use a squash.

Right, holding merge until it gets squashed.

@gnufied gnufied force-pushed the volume-strategic-merge branch 2 times, most recently from a7650c3 to 9e00dd4 Compare October 4, 2016 17:57
@gnufied
Copy link
Member Author

gnufied commented Oct 4, 2016

@fabianofranz @deads2k Okay, I have squashed the commits.

@fabianofranz
Copy link
Member

LGTM [merge]

@gnufied
Copy link
Member Author

gnufied commented Oct 5, 2016

[test]

@gnufied
Copy link
Member Author

gnufied commented Oct 5, 2016

The error here looks like a flake.

This adds support for using PATCH method when adding or
removing a volume from openshift asset (deployment configuration).

Doing so will help prevent future race conditions and brings
volume command on par with other similar command that use PATCH.
@gnufied gnufied force-pushed the volume-strategic-merge branch from 9e00dd4 to f513896 Compare October 5, 2016 16:15
@openshift-bot
Copy link
Contributor

Evaluated for origin test up to f513896

@fabianofranz
Copy link
Member

Flaked on #11094
re[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to f513896

@openshift-bot
Copy link
Contributor

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

1 similar comment
@openshift-bot
Copy link
Contributor

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

@gnufied
Copy link
Member Author

gnufied commented Oct 6, 2016

@fabianofranz @childsb while I am looking at #11094 do we want to block this PR from getting merged?

@fabianofranz
Copy link
Member

@gnufied no, that's a flake unrelated to this PR. Working on it does not prevent this from getting merged.

@gnufied
Copy link
Member Author

gnufied commented Oct 7, 2016

#11094 [merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Oct 8, 2016

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

@openshift-bot openshift-bot merged commit 997ff87 into openshift:master Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants