From 8ec80833dcaa5d48efda0b963ac3fa6f563f0036 Mon Sep 17 00:00:00 2001 From: Radoslaw Szwajkowski <64194103+rszwajko@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:46:48 +0100 Subject: [PATCH 1/2] :bug: Count custom rules imported from yaml file (#1748) Reference-Url: https://issues.redhat.com/browse/MTA-2003 ### Before ![Screenshot from 2024-03-06 13-39-40](https://github.com/konveyor/tackle2-ui/assets/64194103/915742f9-94da-4ab9-8229-e22e974e72e7) ### After ![Screenshot from 2024-03-06 15-17-17](https://github.com/konveyor/tackle2-ui/assets/64194103/e74f76ee-0a86-489a-a0fc-753c4cd96035) Signed-off-by: Radoslaw Szwajkowski --- client/src/app/utils/rules-utils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/app/utils/rules-utils.ts b/client/src/app/utils/rules-utils.ts index 3c460d6587..e9bdb5f6ea 100644 --- a/client/src/app/utils/rules-utils.ts +++ b/client/src/app/utils/rules-utils.ts @@ -21,8 +21,8 @@ export const parseRules = (file: IReadFile): ParsedRule => { const yamlList = Array.isArray(yamlDoc) ? yamlDoc : [yamlDoc]; const yamlLabels = Array.from( new Set( - yamlList?.flatMap((parsedLine) => { - return parsedLine?.labels ? parsedLine?.labels : []; + yamlList?.flatMap((parsedRule) => { + return parsedRule?.labels ? parsedRule?.labels : []; }) || [] ) ); @@ -32,7 +32,8 @@ export const parseRules = (file: IReadFile): ParsedRule => { target: allLabels?.targetLabel, otherLabels: allLabels?.otherLabels, allLabels: allLabels?.allLabels, - total: 0, + total: + yamlList?.filter((parsedRule) => parsedRule?.ruleID)?.length ?? 0, ...(file.responseID && { fileID: file.responseID, }), From 3e3d6904964fd4085bdfddd3e7530368a0022b10 Mon Sep 17 00:00:00 2001 From: Scott Dickerson Date: Wed, 6 Mar 2024 16:28:14 -0500 Subject: [PATCH 2/2] :seedling: Increase ulimit nofiles on image-build.yaml (#1746) Builds keep failing with EMFILE errors, so follow the advice from a similar issue work around: https://github.com/npm/cli/issues/4783#issuecomment-1908016260 --------- Signed-off-by: Scott Dickerson --- .github/workflows/image-build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/image-build.yaml b/.github/workflows/image-build.yaml index 261d01674a..3e67b3fcf2 100644 --- a/.github/workflows/image-build.yaml +++ b/.github/workflows/image-build.yaml @@ -21,6 +21,7 @@ jobs: image_name: "tackle2-ui" containerfile: "./Dockerfile" architectures: '[ "amd64", "arm64", "ppc64le", "s390x" ]' + extra-args: "--ulimit nofile=4096:4096" secrets: registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }} registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }}