-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
VR: fix wrong check when compare two configuration files #9822
base: 4.18
Are you sure you want to change the base?
Conversation
@blueorangutan package |
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 4.18 #9822 +/- ##
===========================================
Coverage 12.27% 12.27%
- Complexity 9335 9336 +1
===========================================
Files 4699 4699
Lines 414691 414691
Branches 53409 51957 -1452
===========================================
+ Hits 50891 50896 +5
+ Misses 357475 357469 -6
- Partials 6325 6326 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11380 |
@blueorangutan test |
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-11683)
|
@@ -175,6 +175,6 @@ def deleteLine(self, search): | |||
self.new_config = list(temp_config) | |||
|
|||
def compare(self, o): | |||
result = (isinstance(o, self.__class__) and set(self.config) == set(o.config)) | |||
result = (isinstance(o, self.__class__) and self.config == o.config) |
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.
So this means that we no longer compare the set to be equal but the line by line items (in order). Is that really what we want @weizhouapache ?
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.
yes, we should compare lines by lines.
the method is being used to compare the configurations for
- haproxy
- conntrackd
- radvd
for all 3, I think the order of configurations in the files matters.
Description
in some configuration files, the value can be set in multiple times and order matters.
For example there are two haproxy configurations
without this change, they are considered as same configuration, which is obviously wrong.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?