cli icon indicating copy to clipboard operation
cli copied to clipboard

Duplicate entries in docker node ps when multi nodes are passed

Open ehsan-salamati opened this issue 1 year ago • 1 comments

- 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

  1. Added a unit test for this case.
  2. Created a multi-node cluster and pass in multiple nodes to the docker node ps command. Before: image After : image

- 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)

ehsan-salamati avatar Aug 02 '24 14:08 ehsan-salamati

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           

codecov-commenter avatar Aug 05 '24 16:08 codecov-commenter