Skip to content

Commit e21e156

Browse files
authored
Fix cluster upgrades stuck in pending state (#529)
* Fix cluster upgrades stuck in pending state * Force update selected queue on external list update
1 parent dbcde1b commit e21e156

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

www/src/components/clusters/ClustersContent.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export function ClustersContent(): ReactElement | null {
8080
</PageTitle>
8181
<UpgradesList
8282
upgrades={data.upgradeQueue?.upgrades}
83+
acked={data.upgradeQueue?.acked}
8384
loading={loading}
8485
fetchMore={fetchMore}
8586
/>
@@ -88,10 +89,10 @@ export function ClustersContent(): ReactElement | null {
8889
}
8990

9091
function UpgradesList({
91-
upgrades, loading, fetchMore,
92+
upgrades, acked, loading, fetchMore,
9293
}): ReactElement {
9394
const [listRef, setListRef] = useState(null)
94-
const { edges, pageInfo, acked } = upgrades
95+
const { edges, pageInfo } = upgrades
9596

9697
return (
9798
<Flex

www/src/components/clusters/ClustersSidenav.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ export function ClustersSidenav({
2929
onQueueChange(queue)
3030
}
3131

32+
// Update selected queue if queues are updated
33+
useEffect(() => {
34+
const queue = queues.find(q => q.id === selectedKey.id)
35+
36+
setSelectedKey(queue)
37+
}, [queues, selectedKey, setSelectedKey])
38+
3239
return (
3340
<Flex
3441
gap={24}

0 commit comments

Comments
 (0)