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

Apply unsupported feature annotations #1028

Merged
merged 4 commits into from Jan 11, 2021

Conversation

nunnatsa
Copy link
Collaborator

HCO now support 3 new annotation on the HyperConverged CR, in jsonPatch format, in order to set/update fields in the KV, CDI or CNA CRs, that are not formally supported and are not part of the HhyperConverged API.

Signed-off-by: Nahshon Unna-Tsameret nunnatsa@redhat.com

Release note:

HCO now support 3 new annotation on the HyperConverged CR, in jsonPatch format, in order to set/update fields in the KV, CDI or CNA CRs, that are not formally supported and are not part of the HhyperConverged API.

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/XXL labels Dec 29, 2020
@hco-bot
Copy link
Collaborator

hco-bot commented Dec 29, 2020

hco-e2e-upgrade-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-azure
hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-azure, ci/prow/hco-e2e-upgrade-azure

In response to this:

hco-e2e-upgrade-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-azure
hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-azure

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Dec 30, 2020

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-gcp

In response to this:

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-gcp

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.

@nunnatsa
Copy link
Collaborator Author

/test hco-e2e-upgrade-prev-aws

@kubevirt-bot
Copy link
Contributor

@nunnatsa: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-hyperconverged-cluster-operator-e2e-k8s-1.17

Use /test all to run all jobs.

In response to this:

/test hco-e2e-upgrade-prev-aws

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Dec 30, 2020

hco-e2e-upgrade-prev-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-prev-azure

In response to this:

hco-e2e-upgrade-prev-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-azure

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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 1, 2021
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 2, 2021
@hco-bot
Copy link
Collaborator

hco-bot commented Jan 2, 2021

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-azure

In response to this:

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-azure

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Jan 2, 2021

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-gcp

In response to this:

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-gcp

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.

@nunnatsa
Copy link
Collaborator Author

nunnatsa commented Jan 3, 2021

/test hco-e2e-upgrade-prev-aws

@kubevirt-bot
Copy link
Contributor

@nunnatsa: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-hyperconverged-cluster-operator-e2e-k8s-1.17

Use /test all to run all jobs.

In response to this:

/test hco-e2e-upgrade-prev-aws

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Jan 3, 2021

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-azure
hco-e2e-upgrade-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-azure, ci/prow/hco-e2e-upgrade-azure

In response to this:

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-azure
hco-e2e-upgrade-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-azure

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.

@nunnatsa
Copy link
Collaborator Author

nunnatsa commented Jan 3, 2021

/test hco-e2e-upgrade-prev-aws

@kubevirt-bot
Copy link
Contributor

@nunnatsa: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-hyperconverged-cluster-operator-e2e-k8s-1.17

Use /test all to run all jobs.

In response to this:

/test hco-e2e-upgrade-prev-aws

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Jan 3, 2021

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-prev-azure

In response to this:

hco-e2e-upgrade-prev-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-azure

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Jan 6, 2021

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-azure

In response to this:

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-azure

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.

@nunnatsa
Copy link
Collaborator Author

nunnatsa commented Jan 6, 2021

/test hco-e2e-upgrade-aws
/test hco-e2e-upgrade-prev-aws

@kubevirt-bot
Copy link
Contributor

@nunnatsa: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-hyperconverged-cluster-operator-e2e-k8s-1.17

Use /test all to run all jobs.

In response to this:

/test hco-e2e-upgrade-aws
/test hco-e2e-upgrade-prev-aws

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.

@hco-bot
Copy link
Collaborator

hco-bot commented Jan 6, 2021

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-gcp

In response to this:

hco-e2e-image-index-aws lane succeeded.
/override ci/prow/hco-e2e-image-index-gcp

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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 7, 2021
Copy link
Contributor

@zcahana zcahana left a comment

Choose a reason for hiding this comment

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

Also need to consider what's the plan for applying validation to the value of the json patches.. whether this will be included in this PR, in a different one, in the same/next release, etc...

pkg/controller/operands/operand.go Outdated Show resolved Hide resolved
pkg/controller/operands/operand.go Outdated Show resolved Hide resolved
pkg/controller/operands/operand.go Outdated Show resolved Hide resolved

func applyPatchToSpec(hc *hcov1beta1.HyperConverged, annotationName string, spec interface{}) error {
if cnaoUnsupportedAnnotation, ok := hc.Annotations[annotationName]; ok {
if err := applyAnnotationPatch(&spec, cnaoUnsupportedAnnotation); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I get a bit confused by the exact semantics of "pointer to an interface{}"... is this assuming that all invocations pass spec by value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I get this comment, but the alternative is to write it 3-4 times for each operand spec. So this method actually apply a json path on any object, but as the usage (now) is only for specs, I think it's ok. I can change the name to obj.

pkg/controller/operands/operand.go Outdated Show resolved Hide resolved
pkg/controller/operands/cdi.go Show resolved Hide resolved
Expect(err).To(HaveOccurred())
})

It("Ensure func should create CDI object with changes from the annotation", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the significant distinction between the "Ensure func...) test cases and these the directly invoke NewCDI()?
Is it worth the almost-duplicated test cases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are unit test. One checks the NewCDI func and one checks the ensure func. Not sure I get the comment. We need to make sure that NewCDI works and that the ensure uses it corrctlly.

pkg/controller/operands/cdi_test.go Outdated Show resolved Hide resolved
HCO now support 3 new annotation on the HyperConverged CR, in jsonPatch format, in order to set/update fields in the KV, CDI or CNA CRs, that are not formally supported and are not part of the HhyperConverged API.

Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2021
Signed-off-by: Nahshon Unna-Tsameret <nunnatsa@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Jan 11, 2021

@nunnatsa: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/hco-e2e-image-index-gcp 455338ba0b53d1ccdfbb66cd4ea86673e77622a2 link /test hco-e2e-image-index-gcp
ci/prow/hco-e2e-upgrade-prev-azure d89f61a link /test hco-e2e-upgrade-prev-azure
ci/prow/hco-e2e-upgrade-azure d89f61a link /test hco-e2e-upgrade-azure

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@hco-bot
Copy link
Collaborator

hco-bot commented Jan 11, 2021

hco-e2e-upgrade-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-azure
hco-e2e-upgrade-prev-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-azure

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-upgrade-azure, ci/prow/hco-e2e-upgrade-prev-azure

In response to this:

hco-e2e-upgrade-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-azure
hco-e2e-upgrade-prev-aws lane succeeded.
/override ci/prow/hco-e2e-upgrade-prev-azure

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.

@zcahana
Copy link
Contributor

zcahana commented Jan 11, 2021

/lgtm
/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 11, 2021
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zcahana

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 Jan 11, 2021
@zcahana
Copy link
Contributor

zcahana commented Jan 11, 2021

/override-bot

@hco-bot
Copy link
Collaborator

hco-bot commented Jan 11, 2021

hco-e2e-image-index-azure, hco-e2e-image-index-aws lanes succeeded.
/override ci/prow/hco-e2e-image-index-gcp

@kubevirt-bot
Copy link
Contributor

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-image-index-gcp

In response to this:

hco-e2e-image-index-azure, hco-e2e-image-index-aws lanes succeeded.
/override ci/prow/hco-e2e-image-index-gcp

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 merged commit 47a4141 into kubevirt:master Jan 11, 2021
@nunnatsa nunnatsa deleted the apply-annotation branch January 11, 2021 14:08
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 Denotes a PR that will be considered when it comes time to generate release notes. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants