console icon indicating copy to clipboard operation
console copied to clipboard

reassign partitions view throws error

Open dobe opened this issue 4 years ago • 3 comments

when starting a reassignement (outside of kowl using kafkactl) e.g:

partition=0: replicas:[107 106] addingReplicas:[106] removingReplicas:[]

the reassign-partitions view is shows a TypeError

Cannot read properties of null (reading 'toString')

tested on current chrome and safari on osx

Stack (Decoded)

toString (components/pages/reassign-partitions/components/BrokerList.tsx:59:55)
map (components/pages/reassign-partitions/components/BrokerList.tsx:44:31)
allowStateChanges<T> (../../src/core/action.ts:149:15)
reactiveRender (../../src/observerClass.ts:134:28)
Array (../../src/core/derivation.ts:177:21)
isSpyEnabled (../../src/core/reaction.ts:137:23)
reactiveRender (../../src/observerClass.ts:132:8)
_allowStateChanges (../../src/observerClass.ts:145:11)
render (../../src/observerClass.ts:55:15)

Environment

NODE_ENV : production
GIT_SHA  : 1177dfdcda669904b0fbfc54934dbeba322bf2af
GIT_REF  : v1.4.0
TIMESTAMP: 1622141499
appName  : Kowl

Location

Protocol: http:
Path    : /reassign-partitions
Search  : 
Hash    :

dobe avatar Oct 06 '21 06:10 dobe

Hey @dobe , I'm currently on vacation and hence I can not look into it in a timely fashion. However, just to make sure I'm understanding it correctly: You reassigned partition with a 3rd party tool and then tried to view the active reassignments in Kowl by browsing the "Reassign Partitions" page.

If that's the case, could you also provide the JSON body of the response from the backend for this page? (It's a single page application that sends HTTP requests to the backend on new pages / refresh)

weeco avatar Oct 06 '21 18:10 weeco

hi @weeco, thx for the fast response

here an example with a reassignment which increases replicas from brokers:107 to 107,101:

kafkactl alter partition thetopicname 0 -r 107,101
reassignment running for topic=thetopicname partition=0: replicas:[107 101] addingReplicas:[101] removingReplicas:[]
...

here the output of /api/operations/reassign-partitions

{
  "topics": [
    {
      "topicName": "thetopicname",
      "partitions": [
        {
          "partitionId": 0,
          "addingReplicas": [
            101
          ],
          "removingReplicas": null,
          "replicas": null
        }
      ]
    }
  ]
}

side note: if i just move a partition (no increase of replicas) i can watch the progress and also cancel the reassignement, however the refresh does not work, i need to go to another view e.g: topics and the back and i see the updated status - well this is a different issue i faced.

dobe avatar Oct 06 '21 19:10 dobe

I'll take a look and fix those two issues (the exception/type error thing; and the refresh not working) Thx for reporting, and thx for the additional info 😄

rikimaru0345 avatar Oct 08 '21 21:10 rikimaru0345

Done, for enterprise

twmb avatar Oct 19 '23 15:10 twmb