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

Ensure we can specify different CDI CR name. #1383

Merged
merged 1 commit into from Sep 21, 2020

Conversation

awels
Copy link
Member

@awels awels commented Sep 21, 2020

Fix bug where the CR name was hard coded to CDI and it failed in HCO.

Signed-off-by: Alexander Wels awels@redhat.com

What this PR does / why we need it:
HCO names the CDI CR a different name than CDI, and we had hard coded a lookup of the CDI CR as cdi, and it failed when deployed with HCO. This PR fixes that issue, and adds some code so we can specify a CI lane that has a different cr name so we can guard against this happening again.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Release note:

NONE

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/S labels Sep 21, 2020

return &cr.Spec.Workloads, nil
if len(crList.Items) != 1 {
return nil, fmt.Errorf("Number of CDI CRs != 0")
Copy link
Member

Choose a reason for hiding this comment

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

!= 1 should be the message

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup fixed.

Fix bug where the CR name was hard coded to CDI and it failed in HCO.

Signed-off-by: Alexander Wels <awels@redhat.com>
@awels
Copy link
Member Author

awels commented Sep 21, 2020

/cherrypick release-v1.23

@kubevirt-bot
Copy link
Contributor

@awels: once the present PR merges, I will cherry-pick it on top of release-v1.23 in a new PR and assign it to you.

In response to this:

/cherrypick release-v1.23

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.

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 21, 2020
@aglitke
Copy link
Member

aglitke commented Sep 21, 2020

/lgtm

@awels
Copy link
Member Author

awels commented Sep 21, 2020

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awels

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 21, 2020
@coveralls
Copy link

coveralls commented Sep 21, 2020

Coverage Status

Coverage increased (+0.005%) to 74.825% when pulling f530583 on awels:lookup-cdi-cr into 98c4edc on kubevirt:master.

@kubevirt-bot kubevirt-bot merged commit d2da27b into kubevirt:master Sep 21, 2020
@kubevirt-bot
Copy link
Contributor

@awels: #1383 failed to apply on top of branch "release-v1.23":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	Makefile
M	pkg/controller/util.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/controller/util.go
CONFLICT (content): Merge conflict in pkg/controller/util.go
Auto-merging Makefile
Patch failed at 0001 Ensure we can specify different CDI CR name. Fix bug where the CR name was hard coded to CDI and it failed in HCO.

In response to this:

/cherrypick release-v1.23

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.

awels added a commit to awels/containerized-data-importer that referenced this pull request Sep 21, 2020
Fix bug where the CR name was hard coded to CDI and it failed in HCO.

Signed-off-by: Alexander Wels <awels@redhat.com>
awels added a commit to awels/containerized-data-importer that referenced this pull request Sep 22, 2020
Fix bug where the CR name was hard coded to CDI and it failed in HCO.

Signed-off-by: Alexander Wels <awels@redhat.com>
awels added a commit that referenced this pull request Sep 22, 2020
Fix bug where the CR name was hard coded to CDI and it failed in HCO.

Signed-off-by: Alexander Wels <awels@redhat.com>
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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants