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

🐛 Fixes issue with NCP versioning while using the semver package #2796

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

gab-satchi
Copy link
Member

@gab-satchi gab-satchi commented Mar 4, 2024

What this PR does / why we need it:
NSX releases can have more than 3 segments. They frequently have 4. This causes an issue when there's an attempt to parse it with the semver package.

In this PR, if a version with 4 segments is found, it will trim the last segment before parsing it as a semver. The codepath is only there to check that the version is >= 3.0.1 and < 3.1.0 so precision isn't lost by trimming down to 3 segments.

Copy link

linux-foundation-easycla bot commented Mar 4, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: gab-satchi / name: Gab Satchi (7828bdc)

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 4, 2024
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.22%. Comparing base (a80aacd) to head (7828bdc).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2796      +/-   ##
==========================================
+ Coverage   64.13%   64.22%   +0.09%     
==========================================
  Files         160      160              
  Lines        9360     9367       +7     
==========================================
+ Hits         6003     6016      +13     
+ Misses       2902     2898       -4     
+ Partials      455      453       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gab-satchi gab-satchi force-pushed the nsx-version-fix branch 2 times, most recently from e6316bb to 08039a6 Compare March 4, 2024 22:08
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 4, 2024
Copy link
Contributor

@zhanggbj zhanggbj left a comment

Choose a reason for hiding this comment

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

Thanks for fixing it!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 5, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 06b9b171ec8018aff0329725e7b8e7d6e0066656

pkg/util/networkutil.go Show resolved Hide resolved
pkg/util/networkutil.go Outdated Show resolved Hide resolved
- If an NCP version with more than 3 segments is found, only use the first 3

Signed-off-by: gsatchi <gab.satchi@broadcom.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 5, 2024
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 5, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 3ac90420cb6757706c685ed7cd1205576d0b58c0

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi

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 Mar 5, 2024
@chrischdi
Copy link
Member

/cherry-pick release-1.9

@k8s-infra-cherrypick-robot

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

In response to this:

/cherry-pick release-1.9

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 merged commit 8562684 into kubernetes-sigs:main Mar 5, 2024
18 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.10 milestone Mar 5, 2024
@k8s-infra-cherrypick-robot

@chrischdi: new pull request created: #2797

In response to this:

/cherry-pick release-1.9

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.

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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants