-
Notifications
You must be signed in to change notification settings - Fork 40
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
OCPEDGE-1168: change DevicePath field to its own type #690
Conversation
@qJkee: This pull request references OCPEDGE-1168 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set. In response to this:
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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qJkee 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 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #690 +/- ##
==========================================
- Coverage 70.66% 70.53% -0.13%
==========================================
Files 47 48 +1
Lines 3245 3262 +17
==========================================
+ Hits 2293 2301 +8
- Misses 785 791 +6
- Partials 167 170 +3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a tad confused on the actual impact on the change, as I think we said that we want to make sure that resolution happens on a At Most Once basis. Other than that LGTM
@@ -31,7 +31,7 @@ func parseMetrics(metricsResult string) ([]RawMetric, error) { | |||
return nil, fmt.Errorf("failed to unmarshal metrics: %w", err) | |||
} | |||
|
|||
metrics := []RawMetric{} | |||
metrics := make([]RawMetric, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metrics := make([]RawMetric, 0) | |
var metrics []RawMetric |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the last nit pending
match golang version in debug dockerfile with main dockerfile
/hold for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits, approach is LGTM for me.
Looking at the code for the resolver, it feels a little like we do not need the concurrent sync.Map access since we run in the reconcile and the reconcile doesnt have a concurrent call for device resolution AFAIK. (please correct me if im wrong)
Im also not sure if we should keep the DevicePath type because now its literally a string wrapper, although I must admit that the Unresolved() method makes it clear what is to be expected from that value. maybe a godoc would resolve that?
/test e2e-aws |
438dc28
to
8ef7937
Compare
Add new object for symlink resolution with caching to reduce symlink resolution amount within reconcile loop Also, introduce a new type called DevicePath to contain user provided device path. This is done in order to create a standard way of working with raw(unresolved) device path and avoid errors when it's not resolved while it's expected to be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/unhold |
@qJkee: 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-sigs/prow repository. I understand the commands that are listed here. |
Introduce a new type called DevicePath to contain user provided device path. This is done in order to create a standard way of working with resolved if symlink or raw(unresolved) device path and avoid errors when it's not resolved while it's expected to be.