From 904803433a54453da72d636d68969e1d573564bf Mon Sep 17 00:00:00 2001 From: Vishnu Challa Date: Mon, 6 Jan 2025 20:49:01 -0500 Subject: [PATCH] Bug fix in ROSA HCP filter Signed-off-by: Vishnu Challa --- .github/workflows/poetry-check.yaml | 2 +- backend/app/api/v1/commons/utils.py | 4 +++- backend/backend.containerfile | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/poetry-check.yaml b/.github/workflows/poetry-check.yaml index c7ad2d3d..48a76754 100644 --- a/.github/workflows/poetry-check.yaml +++ b/.github/workflows/poetry-check.yaml @@ -11,7 +11,7 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3.11" - - uses: Gr1N/setup-poetry@v8 + - uses: Gr1N/setup-poetry@v9 - name: verify poetry instalation run: poetry --version working-directory: ./backend diff --git a/backend/app/api/v1/commons/utils.py b/backend/app/api/v1/commons/utils.py index 6985e9e7..1106ee41 100644 --- a/backend/app/api/v1/commons/utils.py +++ b/backend/app/api/v1/commons/utils.py @@ -39,7 +39,9 @@ def isRehearse(job): def clasifyAWSJobs(job): - if job["upstreamJob"].__contains__("rosa-hcp"): + if ("rosa-hcp" in job["clusterType"]) or ("rosa" in job["clusterType"] + and job["masterNodesCount"] == 0 + and job["infraNodesCount"] == 0): return "AWS ROSA-HCP" if job["clusterType"].__contains__("rosa"): return "AWS ROSA" diff --git a/backend/backend.containerfile b/backend/backend.containerfile index 1e7f11be..6118e4e4 100644 --- a/backend/backend.containerfile +++ b/backend/backend.containerfile @@ -18,6 +18,7 @@ EXPOSE 8000 RUN dnf install -y pip gcc python3-devel gcc-c++ RUN pip install --user poetry && \ + poetry self add poetry-plugin-export && \ poetry export -f requirements.txt -o requirements.txt && \ pip install -U typing-extensions && \ pip install --user dash && \