From f71f8dd604de50158d95f09165269e3f4de099ce Mon Sep 17 00:00:00 2001 From: David Date: Sun, 18 Jan 2026 15:47:22 -0700 Subject: [PATCH] hotfix - address build errors found after fresh clone --- .github/workflows/deploy.yml | 3 +++ helm/kubetasker-frontend/Dockerfile | 4 ++-- test/e2e/e2e_suite_test.go | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a56f6ea..4f33cfc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -36,6 +36,9 @@ jobs: ${{ secrets.DOCKER_USERNAME }}/kubetasker-controller:${{ github.sha }} ${{ secrets.DOCKER_USERNAME }}/kubetasker-controller:latest + - name: Copy requirements.txt to frontend directory + run: cp requirements.txt helm/kubetasker-frontend/ + - name: Build and push Frontend uses: docker/build-push-action@v5 with: diff --git a/helm/kubetasker-frontend/Dockerfile b/helm/kubetasker-frontend/Dockerfile index e83ac8b..b51822e 100644 --- a/helm/kubetasker-frontend/Dockerfile +++ b/helm/kubetasker-frontend/Dockerfile @@ -3,8 +3,8 @@ FROM python:3.12-slim # Set environment variables -ENV PYTHONDONTWRITEBYTECODE 1 -ENV PYTHONUNBUFFERED 1 +ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 # Set the working directory in the container WORKDIR /app diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index 9e89fda..2d6d62a 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -53,6 +53,7 @@ var ( projectRootDir string chartsRoot string testRoot string + kubeconfigPath string ) // TestE2E runs the end-to-end (e2e) test suite for the project. These tests execute in an isolated, @@ -98,6 +99,20 @@ var _ = BeforeSuite(func() { err = utils.LoadImageToKindClusterWithName(kindClusterName, frontendImage) ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to load the frontend API image into Kind") + By("getting the kubeconfig from Kind") + cmd = exec.Command("kind", "get", "kubeconfig", "--name", kindClusterName) + kubeconfig, err := utils.Run(cmd) + Expect(err).NotTo(HaveOccurred(), "Failed to get kubeconfig from Kind") + + f, err := os.CreateTemp("", "kubeconfig") + Expect(err).NotTo(HaveOccurred()) + _, err = f.WriteString(kubeconfig) + Expect(err).NotTo(HaveOccurred()) + err = f.Close() + Expect(err).NotTo(HaveOccurred()) + kubeconfigPath = f.Name() + os.Setenv("KUBECONFIG", kubeconfigPath) + By("updating helm dependencies for the umbrella chart") umbrellaChartPath := filepath.Join(chartsRoot, "kubetasker") cmd = exec.Command("helm", "dependency", "update", umbrellaChartPath) @@ -195,6 +210,9 @@ var _ = AfterSuite(func() { // Only remove the files generated during the test, not the whole directory. _ = os.Remove(filepath.Join(projectRootDir, "kustomize", "base", "all.yaml")) _ = os.Remove(filepath.Join(projectRootDir, "kustomize", "base", "crd.yaml")) + if kubeconfigPath != "" { + _ = os.Remove(kubeconfigPath) + } }) // logDebugInfoOnFailure checks if the current Ginkgo spec has failed. If it has, it captures