The GitHub Actions job "CI Actions" on kvrocks-controller.git has failed.
Run started by GitHub user git-hulk (triggered by git-hulk).

Head commit for run:
f7e9f306565042d79c7a5f51b43f13a58f7a6df6 / git-hulk <hulk.webs...@gmail.com>
Fix npm build error and build web ui in CI

Before this PR, run `npm run build` will return the following error:

```shell
./src/app/namespaces/[namespace]/clusters/[cluster]/page.tsx:114:41
Type error: Type '({ label: string; color: string; } | undefined)[]' is not 
assignable to type '{ label: string; color?: string | undefined; }[]'.
  Type '{ label: string; color: string; } | undefined' is not assignable to 
type '{ label: string; color?: string | undefined; }'.
    Type 'undefined' is not assignable to type '{ label: string; color?: string 
| undefined; }'.

  112 |                                     <ResourceCard
  113 |                                         title={`Shard ${index + 1}`}
> 114 |                                         tags={[
      |                                         ^
  115 |                                             {
  116 |                                                 label: 
`${shard.nodes.length} nodes`,
  117 |                                                 color: "secondary",

```

It's due to using the array filter on undefined value.

Report URL: 
https://github.com/apache/kvrocks-controller/actions/runs/14061099158

With regards,
GitHub Actions via GitBox

Reply via email to