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

Fix session leak in Dell provider: #356

Merged
merged 4 commits into from
Oct 17, 2023

Conversation

jacobweinstock
Copy link
Member

What does this PR implement/change/remove?

This was leaving open sessions in non Dell machines. Closed sessions when the Dell Open function returns error after successfully opening.

Checklist

  • Tests added
  • Similar commits squashed

The HW vendor this change applies to (if applicable)

The HW model number, product name this change applies to (if applicable)

The BMC firmware and/or BIOS versions that this change applies to (if applicable)

What version of tooling - vendor specific or opensource does this change depend on (if applicable)

Description for changelog/release notes

@jacobweinstock jacobweinstock added the bug Something isn't working label Oct 16, 2023
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

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

Comparison is base (b6af042) 44.93% compared to head (91966ac) 45.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #356      +/-   ##
==========================================
+ Coverage   44.93%   45.05%   +0.12%     
==========================================
  Files          54       54              
  Lines        4206     4208       +2     
==========================================
+ Hits         1890     1896       +6     
+ Misses       2108     2104       -4     
  Partials      208      208              
Files Coverage Δ
providers/dell/idrac.go 46.22% <0.00%> (+4.88%) ⬆️

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

This was leaving open sessions in non Dell
machines. Closed sessions when the Dell
Open function returns error after successfully
opening.

Signed-off-by: Jacob Weinstock <[email protected]>
@jacobweinstock jacobweinstock force-pushed the fix-dell-session-leak branch 3 times, most recently from 1dde313 to e5a79f8 Compare October 17, 2023 00:53
chrisdoherty4
chrisdoherty4 previously approved these changes Oct 17, 2023
Copy link
Collaborator

@chrisdoherty4 chrisdoherty4 left a comment

Choose a reason for hiding this comment

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

Minor feedback.

LGTM

providers/dell/idrac.go Outdated Show resolved Hide resolved
@@ -12,6 +13,7 @@ import (
"os"
"testing"

bmclibErrs "github.com/bmc-toolbox/bmclib/v2/errors"
Copy link
Collaborator

Choose a reason for hiding this comment

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

bmclibErrs -> bmcliberrs

Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Copy link
Member

@joelrebel joelrebel 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 this up!

@mergify mergify bot merged commit 153e11d into bmc-toolbox:main Oct 17, 2023
6 of 7 checks passed
jacobweinstock added a commit to jacobweinstock/eks-anywhere that referenced this pull request Dec 6, 2023
New version has a session leak fix.
bmc-toolbox/bmclib#356

Signed-off-by: Jacob Weinstock <[email protected]>
eks-distro-bot pushed a commit to aws/eks-anywhere that referenced this pull request Dec 6, 2023
* Update bmclib library:

New version has a session leak fix.
bmc-toolbox/bmclib#356

Signed-off-by: Jacob Weinstock <[email protected]>

* For some reason i need to update this:

I dont understand how its related to my
top level go.mod changes.

Signed-off-by: Jacob Weinstock <[email protected]>

---------

Signed-off-by: Jacob Weinstock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants