Duplicate entries in docker node ps when multi nodes are passed
- What I did Fixes #4155 duplicate entries in docker node ps when multi nodes are passed
- How I did it When running the docker node ps command with multiple nodes in the for loop, the filter state retains node-specific data from previous iterations, causing task entries to be duplicated for the first specified node. This occurs because the filter object, being a dictionary type, was reused and modified across iterations, accumulating previous node filters. - How to verify it
- Added a unit test for this case.
- Created a multi-node cluster and pass in multiple nodes to the
docker node pscommand. Before:After :
- Description for the changelog
Fixed duplicate entries in `docker node ps` cmd when multiple nodes are passed.
- A picture of a cute animal (not mandatory but encouraged)
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 61.45%. Comparing base (
ddd4c39) to head (94b0eb8). Report is 4 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #5314 +/- ##
=======================================
Coverage 61.45% 61.45%
=======================================
Files 299 299
Lines 20855 20855
=======================================
Hits 12816 12816
Misses 7124 7124
Partials 915 915