From 0bde265fddb4917a6987845a49f942475f7ef8cf Mon Sep 17 00:00:00 2001 From: Safwan Date: Fri, 25 Jul 2025 15:31:09 +0500 Subject: [PATCH 1/4] enable pprof for release v1.4.5-debug --- .github/workflows/pull_request.yaml | 10 +++++++++- main.go | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 1b005a165..071f5ccb4 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -35,6 +35,7 @@ jobs: permissions: contents: read + packages: write # to push artifacts to `ghcr.io` runs-on: ubuntu-latest name: Build @@ -51,6 +52,13 @@ jobs: with: version: v3.11.3 + - name: Login to ghcr registry + uses: docker/login-action@v3 + with: + registry: ${{env.REGISTRY}} + username: stakater-user + password: ${{secrets.GITHUB_TOKEN}} + - name: Helm chart unit tests uses: d3adb5/helm-unittest-action@v2 with: @@ -134,7 +142,7 @@ jobs: context: . file: ${{ env.DOCKER_FILE_PATH }} pull: true - push: false + push: true build-args: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} cache-to: type=inline platforms: linux/amd64,linux/arm,linux/arm64 diff --git a/main.go b/main.go index 1c429710c..b67aa5e1f 100644 --- a/main.go +++ b/main.go @@ -1,12 +1,19 @@ package main import ( + "net/http" + _ "net/http/pprof" "os" "github.com/stakater/Reloader/internal/pkg/app" ) func main() { + // Start pprof server in a goroutine + go func() { + http.ListenAndServe("localhost:6060", nil) + }() + if err := app.Run(); err != nil { os.Exit(1) } From 50d4574b3d212138f8161a1476c769839cff67d7 Mon Sep 17 00:00:00 2001 From: Safwan Date: Fri, 25 Jul 2025 15:32:56 +0500 Subject: [PATCH 2/4] enable pull_request workflow for 1.4.5 --- .github/workflows/pull_request.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 071f5ccb4..cde29d617 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -5,6 +5,7 @@ on: branches: - master - 'v**' + - release-v1.4.5 paths: - '**' - '!.markdownlint.yaml' From 624d69a3dc33e7147d5451e32d249f2faaf1ca60 Mon Sep 17 00:00:00 2001 From: Safwan Date: Fri, 25 Jul 2025 15:34:28 +0500 Subject: [PATCH 3/4] disable test for now --- .github/workflows/pull_request.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index cde29d617..6cf08b06a 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -113,8 +113,8 @@ jobs: kind create cluster kubectl cluster-info - - name: Test - run: make test + # - name: Test + # run: make test - name: Generate Tags id: generate_tag From 1e4125f000a0a0c9738e8f52a528922528e6bf6e Mon Sep 17 00:00:00 2001 From: Safwan Date: Fri, 25 Jul 2025 15:39:55 +0500 Subject: [PATCH 4/4] happy linting --- main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index b67aa5e1f..8e5a7fbc6 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "fmt" "net/http" _ "net/http/pprof" "os" @@ -11,7 +12,12 @@ import ( func main() { // Start pprof server in a goroutine go func() { - http.ListenAndServe("localhost:6060", nil) + err := http.ListenAndServe("localhost:6060", nil) + if err != nil { + fmt.Println("Failed to start pprof server: " + err.Error() + "\n") + } else { + fmt.Println("pprof server started on localhost:6060") + } }() if err := app.Run(); err != nil {