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

Don't deploy UI Plugin resources if the manifests are missing #1165

Merged
merged 1 commit into from
Apr 10, 2023

Conversation

orenc1
Copy link
Contributor

@orenc1 orenc1 commented Apr 4, 2023

Is this a BUG FIX or a FEATURE ?:

Uncomment only one, leave it on its own line:

/kind bug

/kind enhancement

What this PR does / why we need it:
If for whatever reason the UI manifests does not exist in the operator's filesystem, we don't want the operator to deploy UI-related resources, resulting in an error log.
Special notes for your reviewer:

Release note:

Don't deploy UI Plugin resources if the manifests are missing

Signed-off-by: Oren Cohen <ocohen@redhat.com>
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Apr 4, 2023
@kubevirt-bot kubevirt-bot requested a review from phoracek April 4, 2023 14:36
@kubevirt-bot kubevirt-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 4, 2023
@kubevirt-bot kubevirt-bot requested a review from RamLavi April 4, 2023 14:36
@kubevirt-bot
Copy link
Collaborator

Hi @orenc1. Thanks for your PR.

I'm waiting for a nmstate 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.

@orenc1
Copy link
Contributor Author

orenc1 commented Apr 4, 2023

/ok-to-test

@kubevirt-bot
Copy link
Collaborator

@orenc1: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/ok-to-test

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.

@@ -147,7 +147,8 @@ func (r *NMStateReconciler) applyManifests(instance *nmstatev1.NMState, ctx cont
}

isOpenShift, err := cluster.IsOpenShift(r.APIClient)
if err == nil && isOpenShift {
_, errUIPluginPathExists := os.Stat(filepath.Join("openshift", "ui-plugin"))
if err == nil && isOpenShift && errUIPluginPathExists == nil {
Copy link
Contributor

@dougsland dougsland Apr 4, 2023

Choose a reason for hiding this comment

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

just a small question: should we notify users via log that ui-plugin is not installed ?

Example:

if "NMState version supports ui-plugin" && "messageNotDisplayedYet" && errUIPluginPathExists != nil {
    r.Log.Info("NMState ui-plugin is not set, to enable this feature, please consult NMState documentation");
}

Copy link
Contributor

Choose a reason for hiding this comment

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

@orenc1 BTW, Thanks for the patch !!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'm not sure, because if at this point the manifests of the ui plugin are missing from the operator container, the users can't do much in order to deploy the ui plugin at this point, since the operator is expecting the manifests to be included in the container.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks! I will let others in the group review and approve :)

@qinqon
Copy link
Member

qinqon commented Apr 5, 2023

/lgtm
/approve

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 5, 2023
@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qinqon

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 Apr 5, 2023
@qinqon
Copy link
Member

qinqon commented Apr 5, 2023

/retest

@qinqon
Copy link
Member

qinqon commented Apr 5, 2023

/ok-to-test
/retest

There is something bad at centos 9 stream

@kubevirt-bot kubevirt-bot 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 Apr 5, 2023
@dougsland
Copy link
Contributor

The error doesn't seem related to the patch:

 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Public key for scl-utils-2.0.3-4.el9.x86_64.rpm is not installed. Failing package is: scl-utils-1:2.0.3-4.el9.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: GPG check FAILED
Error: building at STEP "RUN dnf install -y golang-$(sed -En 's/^go +(.*+)$/\1/p' go.mod).*": while running runtime: exit status 1

@dougsland
Copy link
Contributor

/retest-required

@cybertron
Copy link
Collaborator

There's a problem with the centos 9 repos. A workaround is proposed here #1168 so that will need to merge before this will pass.

@qinqon
Copy link
Member

qinqon commented Apr 10, 2023

/retest

The centos 9 stream RPM issue has being fixed upstream, but looks like we have e2e test issue at main

@qinqon
Copy link
Member

qinqon commented Apr 10, 2023

/retest

@kubevirt-bot kubevirt-bot merged commit 6de5e7e into nmstate:main Apr 10, 2023
@orenc1 orenc1 deleted the ui_plugin_apply_condition branch April 14, 2023 11:48
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. kind/bug lgtm 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants