feat(blockdevicefilter): add filter for empty block device tag label value#500
feat(blockdevicefilter): add filter for empty block device tag label value#500kmova merged 4 commits intoopenebs-archive:masterfrom
Conversation
…value This commit adds a filter that does not select BD that has empty block device tag value. Ref: openebs/openebs#3139 Signed-off-by: ajeetrai707 <ajeetrai707@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #500 +/- ##
==========================================
- Coverage 51.47% 47.15% -4.32%
==========================================
Files 73 73
Lines 5076 3274 -1802
==========================================
- Hits 2613 1544 -1069
+ Misses 2213 1573 -640
+ Partials 250 157 -93
Continue to review full report at Codecov.
|
akhilerm
left a comment
There was a problem hiding this comment.
@AJEETRAI707 , given a few comments.
Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
| }, | ||
| }, | ||
| }, | ||
| wantedNoofBDs: 4, |
There was a problem hiding this comment.
Also, is it allowed to pass a BD tag with empty value in BDC.
Shouldn't this be 0? because "" will always be excluded.
There was a problem hiding this comment.
Also, is it allowed to pass a BD tag with empty value in BDC.
Yes. it is allowed, because its a valid label selector.
Shouldn't this be 0? because "" will always be excluded.
Actually 2 levels of filtering happens. The original BD List that we get here, will be after a label selection as part of the list call. So those selectors will already be applied. But if those selectors are applied, we still need to remove the empty tag, thats being done in this filter.
So the tests assume that already a selection has happened with the list call. And the output of the tests will be therefore including the BDs that would have been removed by the select call. Thats why the additional 4 BDs come.
There was a problem hiding this comment.
If you check this comment , you can see how the filter works.
This PR adds a filter that does not select
BD that has empty block device tag value.
Ref: openebs/openebs#3139
Signed-off-by: ajeetrai707 ajeetrai707@gmail.com
Pull Request template
Why is this PR required? What issue does it fix?:
What this PR does?:
Does this PR require any upgrade changes?:
If the changes in this PR are manually verified, list down the scenarios covered::
Any additional information for your reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Checklist:
<type>(<scope>): <subject>