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

OCPBUGS-29188: fix: resolve PV name via Symlink before comparing to KName #571

Conversation

jakobmoellerdev
Copy link
Contributor

@jakobmoellerdev jakobmoellerdev commented Feb 7, 2024

This allows us to properly exclude and filter symlinked devices that would previously be compared via kname without being resolved. Now we compare them symlinked which results in proper filter results

Added precommit timeout and incremented golang ci lint version

@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Feb 7, 2024
@openshift-ci-robot
Copy link

@jakobmoellerdev: This pull request references Jira Issue OCPBUGS-29188, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @radeore

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This allows us to properly exclude and filter symlinked devices that would previously be compared via kname without being resolved. Now we compare them symlinked which results in proper filter results

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from radeore February 7, 2024 16:18
@@ -206,7 +206,7 @@ func isDeviceAlreadyPartOfVG(nodeStatus *lvmv1alpha1.LVMVolumeGroupNodeStatus, d
for _, vgStatus := range nodeStatus.Spec.LVMVGStatus {
if vgStatus.Name == volumeGroup.Name {
for _, pv := range vgStatus.Devices {
if pv == diskName {
if resolvedPV, _ := evalSymlinks(pv); resolvedPV == diskName {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note to reviewer: the error here can be ignored as its the same as returning false

@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 7, 2024
Copy link
Contributor

openshift-ci bot commented Feb 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jakobmoellerdev

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 7, 2024
@jakobmoellerdev jakobmoellerdev force-pushed the OCPBUGS-29188-fix-symlink-resolution branch from e0192e1 to 208b092 Compare February 7, 2024 16:36
@openshift-ci openshift-ci bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 7, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (39f73d4) 82.47% compared to head (03ea2e3) 77.46%.
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #571      +/-   ##
==========================================
- Coverage   82.47%   77.46%   -5.01%     
==========================================
  Files          25       27       +2     
  Lines        1894     1948      +54     
==========================================
- Hits         1562     1509      -53     
- Misses        217      322     +105     
- Partials      115      117       +2     
Files Coverage Δ
internal/controllers/vgmanager/devices.go 80.00% <100.00%> (ø)
internal/controllers/vgmanager/filter/filter.go 82.75% <50.00%> (-2.70%) ⬇️

... and 7 files with indirect coverage changes

@jakobmoellerdev
Copy link
Contributor Author

/test precommit-check

@suleymanakbas91
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2024
@suleymanakbas91
Copy link
Contributor

/hold for unsigned commits

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 8, 2024
@jakobmoellerdev jakobmoellerdev force-pushed the OCPBUGS-29188-fix-symlink-resolution branch from 208b092 to 03ea2e3 Compare February 8, 2024 15:50
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 8, 2024
@openshift-ci-robot
Copy link

@jakobmoellerdev: This pull request references Jira Issue OCPBUGS-29188, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @radeore

In response to this:

This allows us to properly exclude and filter symlinked devices that would previously be compared via kname without being resolved. Now we compare them symlinked which results in proper filter results

Added precommit timeout and incremented golang ci lint version

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 openshift-eng/jira-lifecycle-plugin repository.

@jakobmoellerdev
Copy link
Contributor Author

/test all

2 similar comments
@jakobmoellerdev
Copy link
Contributor Author

/test all

@jakobmoellerdev
Copy link
Contributor Author

/test all

@jakobmoellerdev
Copy link
Contributor Author

/test lvm-operator-e2e-aws
/test lvm-operator-e2e-aws-sno

@jakobmoellerdev
Copy link
Contributor Author

/test lvm-operator-e2e-aws-sno

Copy link
Contributor

openshift-ci bot commented Feb 9, 2024

@jakobmoellerdev: all tests passed!

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.

@suleymanakbas91
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 9, 2024
@jakobmoellerdev
Copy link
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 12, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 6bb9fef into openshift:main Feb 12, 2024
9 checks passed
@openshift-ci-robot
Copy link

@jakobmoellerdev: Jira Issue OCPBUGS-29188: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-29188 has been moved to the MODIFIED state.

In response to this:

This allows us to properly exclude and filter symlinked devices that would previously be compared via kname without being resolved. Now we compare them symlinked which results in proper filter results

Added precommit timeout and incremented golang ci lint version

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 openshift-eng/jira-lifecycle-plugin repository.

@jakobmoellerdev
Copy link
Contributor Author

/cherry-pick release-4.15

@openshift-cherrypick-robot

@jakobmoellerdev: #571 failed to apply on top of branch "release-4.15":

Applying: fix: resolve PV name before comparing to KName
Using index info to reconstruct a base tree...
M	internal/controllers/vgmanager/devices.go
M	internal/controllers/vgmanager/filter/filter.go
M	internal/controllers/vgmanager/filter/filter_test.go
Falling back to patching base and 3-way merge...
Auto-merging internal/controllers/vgmanager/filter/filter_test.go
Auto-merging internal/controllers/vgmanager/filter/filter.go
CONFLICT (content): Merge conflict in internal/controllers/vgmanager/filter/filter.go
Auto-merging internal/controllers/vgmanager/devices.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: resolve PV name before comparing to KName
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.15

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. jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm 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