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

Modernize golang dependencies like controller-runtime and k8s #1288

Merged
merged 3 commits into from
Feb 19, 2025

Conversation

qinqon
Copy link
Member

@qinqon qinqon commented Jan 23, 2025

Is this a BUG FIX or a FEATURE ?:

/kind enhancement

What this PR does / why we need it:
The golang dependencies are quite old and at unmaintained versions, this change bumps the bigs ones like controller-runtime and k8s to the new ones.

Modernize golang dependencies

@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jan 23, 2025
@qinqon qinqon force-pushed the make-snyk-happy branch 12 times, most recently from a3f01cb to badbab4 Compare January 23, 2025 16:27
@qinqon
Copy link
Member Author

qinqon commented Jan 24, 2025

/retest

@qinqon qinqon force-pushed the make-snyk-happy branch 3 times, most recently from 3515ab2 to ca49ffa Compare January 24, 2025 09:36
@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 24, 2025
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 27, 2025
@qinqon qinqon force-pushed the make-snyk-happy branch 2 times, most recently from 8318f73 to 6e6eb02 Compare January 29, 2025 10:55
@qinqon
Copy link
Member Author

qinqon commented Feb 6, 2025

/retest

@qinqon qinqon force-pushed the make-snyk-happy branch 2 times, most recently from 1b3a5f3 to 4a60a15 Compare February 6, 2025 09:41
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Feb 6, 2025
@qinqon qinqon changed the title security: Bump go.mod to make snyk happy Moderniza dependencies like controller-runtime and k8s Feb 6, 2025
@qinqon qinqon changed the title Moderniza dependencies like controller-runtime and k8s Moderniza golang dependencies like controller-runtime and k8s Feb 6, 2025
@qinqon qinqon changed the title Moderniza golang dependencies like controller-runtime and k8s Modernize golang dependencies like controller-runtime and k8s Feb 6, 2025
@mkowalski
Copy link
Member

/test pull-kubernetes-nmstate-e2e-handler-k8s

Some tests failed with an incorrect result

@qinqon
Copy link
Member Author

qinqon commented Feb 14, 2025

Somehow is not able to configure back the initial network state

 [FAILED] Timed out after 120.004s.
  Test didn't return to initial state on node node01
  Expected
      <string>: {
        "eth0": "up",
        "eth1": "up",
        "eth2": "up",
        "lo": "up"
      }
  to match JSON of
      <string>: {
        "eth0": "up",
        "eth1": "down",
        "eth2": "down",
        "lo": "up"
      }

  first mismatched key: "eth2"
  In [AfterEach] at: /tmp/knmstate/kubernetes-nmstate/test/e2e/handler/main_test.go:130 @ 02/13/25 16:38:11.122
  < Exit [AfterEach] TOP-LEVEL - /tmp/knmstate/kubernetes-nmstate/test/e2e/handler/main_test.go:123 @ 02/13/25 16:38:11.123 (2m0.012s)
  > Enter [ReportAfterEach] TOP-LEVEL - /tmp/knmstate/kubernetes-nmstate/test/e2e/handler/main_test.go:139 @ 02/13/25 16:38:11.123
  < Exit [ReportAfterEach] TOP-LEVEL - /tmp/knmstate/kubernetes-nmstate/test/e2e/handler/main_test.go:139 @ 02/13/25 16:38:16.405 (5.282s)
• [FAILED] [154.706 seconds]
TOP-LEVEL [AfterEach]
/tmp/knmstate/kubernetes-nmstate/test/e2e/handler/main_test.go:123
  [user-guide] Introduction
  /tmp/knmstate/kubernetes-nmstate/test/e2e/handler/user_guide_test.go:28
    Configuration tutorial
    /tmp/knmstate/kubernetes-nmstate/test/e2e/handler/user_guide_test.go:64
      should succeed executing all the commands
      /tmp/knmstate/kubernetes-nmstate/test/e2e/handler/user_guide_test.go:69

Looks like eth1 and eth2 initially are now down, but our test reset logic set them up, so there is a mismatch between initial state and final state between tests.

UPDATE1: Looks like something we did here end up deploying nmstate at control-plane too, ignoring the nodeSelector at NMstate CR.

UPDATE2: The new apply function at operator was overriding the new object with the old, now is fixed patchin it, I also found that we are missing the patching operation are coreos monitor resource.

@qinqon qinqon force-pushed the make-snyk-happy branch 6 times, most recently from c57363d to e7eb1d5 Compare February 18, 2025 11:39
@qinqon
Copy link
Member Author

qinqon commented Feb 18, 2025

/retest

Signed-off-by: Enrique Llorente <[email protected]>
Signed-off-by: Enrique Llorente <[email protected]>
@kubevirt-bot
Copy link
Collaborator

@qinqon: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-nmstate-e2e-handler-k8s-future 733b2c0 link false /test pull-kubernetes-nmstate-e2e-handler-k8s-future

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

@mkowalski
Copy link
Member

/lgtm

Passed downstream tests as openshift#565

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 19, 2025
@mkowalski
Copy link
Member

/approve

@kubevirt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mkowalski

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 Feb 19, 2025
@kubevirt-bot kubevirt-bot merged commit e17aa58 into nmstate:main Feb 19, 2025
7 of 9 checks passed
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.

3 participants