Skip to content

Commit

Permalink
Fix cluster upgrades stuck in pending state (#529)
Browse files Browse the repository at this point in the history
* Fix cluster upgrades stuck in pending state

* Force update selected queue on external list update
  • Loading branch information
floreks authored Sep 14, 2022
1 parent dbcde1b commit e21e156
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions www/src/components/clusters/ClustersContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function ClustersContent(): ReactElement | null {
</PageTitle>
<UpgradesList
upgrades={data.upgradeQueue?.upgrades}
acked={data.upgradeQueue?.acked}
loading={loading}
fetchMore={fetchMore}
/>
Expand All @@ -88,10 +89,10 @@ export function ClustersContent(): ReactElement | null {
}

function UpgradesList({
upgrades, loading, fetchMore,
upgrades, acked, loading, fetchMore,
}): ReactElement {
const [listRef, setListRef] = useState(null)
const { edges, pageInfo, acked } = upgrades
const { edges, pageInfo } = upgrades

return (
<Flex
Expand Down
7 changes: 7 additions & 0 deletions www/src/components/clusters/ClustersSidenav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ export function ClustersSidenav({
onQueueChange(queue)
}

// Update selected queue if queues are updated
useEffect(() => {
const queue = queues.find(q => q.id === selectedKey.id)

setSelectedKey(queue)
}, [queues, selectedKey, setSelectedKey])

return (
<Flex
gap={24}
Expand Down

0 comments on commit e21e156

Please sign in to comment.