-
Notifications
You must be signed in to change notification settings - Fork 104
make has_plugin detection method more reliable #362
Conversation
Codecov Report
@@ Coverage Diff @@
## main #362 +/- ##
=======================================
Coverage 36.80% 36.80%
=======================================
Files 3 3
Lines 758 758
Branches 148 148
=======================================
Hits 279 279
Misses 430 430
Partials 49 49 Continue to review full report at Codecov.
|
@joschi36 thank you for the PR. I think the better solution here would be to just change it to Also, could you add a changelog fragment? https://docs.ansible.com/ansible/latest/community/development_process.html#creating-a-changelog-fragment |
Thanks for the feedback. I first also thought on doing that, however I choose to use the more simple variant. But yes you are totally right. I will update the PR with this change and also with the change log fragment. |
@gravesm I have updated the PR |
@@ -0,0 +1,2 @@ | |||
bugfixes: | |||
- helm - make helm-diff plugin detection more reliable by splitting by any whitespace instead of explicit whitespace (`\s`) |
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 couple minor nits. Since this gets turned into rst those should be double backticks. Could you also add the link to this PR at the end in parentheses? There are a few examples here: https://docs.ansible.com/ansible/latest/community/development_process.html#creating-a-changelog-fragment.
Thanks for your work on this!
@gravesm I have fixed the double backticks. |
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.
Thank you for your contribution, @joschi36!
This repository does not accept pull requests, see the README for details. |
SUMMARY
This PR makes the plugin detection method more reliable.
The issue before was that when you had multiple plugins it wouldn't split at the right point. This method just loops through the list and searches the start of the string for the plugin name.
ISSUE TYPE
COMPONENT NAME
helm
ADDITIONAL INFORMATION
Why the method before was a problem: With multiple plugins with different plugin name lengths installed the detection method failed.
So my line is
diff\s\s\s\s\s\t3.1.3[...]
and the result variablename
with the behavior before wasdiff\s\s\s\s\s
which unfortunately wasn't equal to ´diff´I hope I could explain it well, If you have an additional question please ask.
/cc @gravesm