Skip to content

Conversation

@pramchan
Copy link
Contributor

@pramchan pramchan commented Aug 6, 2020


What this PR does / why we need it:
To correct the previous #594swapping ifs precedence for error check after
https://github.com/pramchan/cluster-api-provider-openstack/blob/master/controllers/openstackcluster_controller.go#L300
to...
if err != nil {
return errors.Errorf("failed to find network: %v", err)
}
if len(networkList) == 0 {
return errors.Errorf("failed to find any network: %v", err)
}
if len(networkList) > 1 {
return errors.Errorf("failed to find only one network (result: %v): %v", networkList, err)
}
openStackCluster.Status.Network = &infrav1.Network{
ID: networkList[0].ID,
Name: networkList[0].Name,
}
Which issue(s) this PR fixes *:
Fixes #590 , #594

Special notes for your reviewer:
the way I did it is
git log --oneline
c528add (HEAD -> my594) revised #590 #594 wrong parameter for a user provider network
...
edited and added the controllers/openstackclsuater-controllers.go
...
git branch my594 c528add
git checkout my594
git push --repo https://github.com/pramchan/cluster-api-provider-openstack
remote: Create a pull request for 'my594' on GitHub by visiting:
remote: https://github.com/pramchan/cluster-api-provider-openstack/pull/new/my594
remote:
To https://github.com/pramchan/cluster-api-provider-openstack

  • [new branch] my594 -> my594
    Not sure if this will do the trick. If not will close open a fresh pull as this certainly turned to be challenging with so may in between parallel updates
    .

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 6, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @pramchan. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 6, 2020
@hidekazuna
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 6, 2020
@theopenlab-ci
Copy link

theopenlab-ci bot commented Aug 6, 2020

Build succeeded.

@hidekazuna
Copy link
Contributor

@pramchan Code itself is good to me. You can make the title and PR comment better.

This PR is to fix a bug so that 🐛 should be added instead of ✨ at the beginning of the title.
Title is summarize this PR does for example: 🐛 Return error correctly If wrong network name was given

What this PR does / why we need it:

You do not need to write code itself here. Please summarize for example:
If wrong network name was given, the container crashes. This PR fixes to return error correctly.

Which issue(s) this PR fixes *:
Fixes #590 , #594

Only issue is needed so that #590 is enough.

Special notes for your reviewer:

You do not need to write how to create your PR here.
If you want to address #594, Say like "This replace #594 "

@hidekazuna
Copy link
Contributor

@jichenjc Code itself is good to me. So,could you update PR comment? Maintainer can update PR comment.

@jichenjc
Copy link
Contributor

@hidekazuna I think it would be better to ask @pramchan to update if he likes :)

@hidekazuna
Copy link
Contributor

I want to merge this PR.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 21, 2020
@jichenjc
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jichenjc, pramchan

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 21, 2020
@k8s-ci-robot k8s-ci-robot merged commit 1ead086 into kubernetes-sigs:master Oct 21, 2020
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong parameter for a user provided network crashes the controller

4 participants