From dad3c9ab7540e00499847e4052b64fe00f4a11e6 Mon Sep 17 00:00:00 2001 From: Carlos Abalde Date: Mon, 3 Feb 2025 14:10:24 +0100 Subject: [PATCH 01/10] Add CodeQL configuration file to ignore 'assets/static' --- .github/codeql/codeql-config.yml | 2 ++ .github/workflows/codeql.yml | 1 + 2 files changed, 3 insertions(+) create mode 100644 .github/codeql/codeql-config.yml diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml new file mode 100644 index 0000000..9173ab6 --- /dev/null +++ b/.github/codeql/codeql-config.yml @@ -0,0 +1,2 @@ +paths-ignore: + - assets/static diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index fe3ab19..a9795f0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -34,6 +34,7 @@ jobs: with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} + config-file: ./.github/codeql/codeql-config.yml - if: matrix.build-mode == 'manual' shell: bash From f3bd0457692a3620b9466707a7734b2c9adb11a0 Mon Sep 17 00:00:00 2001 From: Carlos Abalde Date: Mon, 3 Feb 2025 14:40:59 +0100 Subject: [PATCH 02/10] Added GitHub Action language to .github/workflows/codeql.yml --- .github/workflows/codeql.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a9795f0..f04969b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,6 +26,8 @@ jobs: build-mode: manual - language: javascript-typescript build-mode: none + - language: actions + build-mode: none steps: - uses: actions/checkout@v4 From 21a55d33212b5ddc53012f22d63f97b1a83066ac Mon Sep 17 00:00:00 2001 From: Carlos Abalde Date: Mon, 3 Feb 2025 15:27:32 +0100 Subject: [PATCH 03/10] Added 'toolchain' entry to 'go.mod' --- go.mod | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index cc56c77..0a16475 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/allenta/varnishmon -go 1.23.5 +go 1.23 + +toolchain go1.23.5 require ( github.com/fasthttp/router v1.5.4 From 9c372c89b563c95046c9896812cb3df259d317dd Mon Sep 17 00:00:00 2001 From: Carlos Abalde Date: Mon, 3 Feb 2025 16:00:28 +0100 Subject: [PATCH 04/10] Added dirty hack to mitigate issues with ARM64 builds with GitHub Actions --- extras/github/build-action/action.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/extras/github/build-action/action.yml b/extras/github/build-action/action.yml index 4b2bfa9..71d9674 100644 --- a/extras/github/build-action/action.yml +++ b/extras/github/build-action/action.yml @@ -21,6 +21,21 @@ runs: - shell: bash run: | + # XXX: for ARM64 builds, jobs occasionally fail with an error suggesting + # that Docker is not ready. This is a dirty attempt to mitigate the + # issue. + if [ '${{ inputs.architecture }}' = 'arm64' ]; then + for i in {1..10}; do + if docker info > /dev/null 2>&1; then + echo 'Docker is ready!' + break + else + echo 'Waiting for Docker to be ready...' + sleep 5 + fi + done + fi + IMAGE=$( \ docker build \ --quiet \ From 003c584e2fb02541c12af58adf5b68b89d0b83ff Mon Sep 17 00:00:00 2001 From: Carlos Abalde Date: Mon, 3 Feb 2025 16:05:35 +0100 Subject: [PATCH 05/10] Revert "Added dirty hack to mitigate issues with ARM64 builds with GitHub Actions" This reverts commit 9c372c89b563c95046c9896812cb3df259d317dd. It's nonsense. The ARM64 issues appears before reaching the build script. >Run ./extras/github/build-action >Run docker/setup-buildx-action@v3 >Docker info >Buildx version >Inspecting default docker context >Creating a new builder instance Error: ERROR: failed to initialize builder builder-7cfe3cdd-acf8-4116-a011-40173ca3d469 (builder-7cfe3cdd-acf8-4116-a011-40173ca3d4690): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? --- extras/github/build-action/action.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/extras/github/build-action/action.yml b/extras/github/build-action/action.yml index 71d9674..4b2bfa9 100644 --- a/extras/github/build-action/action.yml +++ b/extras/github/build-action/action.yml @@ -21,21 +21,6 @@ runs: - shell: bash run: | - # XXX: for ARM64 builds, jobs occasionally fail with an error suggesting - # that Docker is not ready. This is a dirty attempt to mitigate the - # issue. - if [ '${{ inputs.architecture }}' = 'arm64' ]; then - for i in {1..10}; do - if docker info > /dev/null 2>&1; then - echo 'Docker is ready!' - break - else - echo 'Waiting for Docker to be ready...' - sleep 5 - fi - done - fi - IMAGE=$( \ docker build \ --quiet \ From 2b85fd15109d7bd248a1a58c129b817a58491a92 Mon Sep 17 00:00:00 2001 From: Carlos Abalde Date: Mon, 3 Feb 2025 16:41:47 +0100 Subject: [PATCH 06/10] Packaging: 'restart' instead of 'try-reload-or-restart' when updating package --- extras/packaging/debian/varnishmon.postinst | 2 +- extras/packaging/redhat/varnishmon.postinst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/packaging/debian/varnishmon.postinst b/extras/packaging/debian/varnishmon.postinst index 9ab87b5..6cbdcd4 100644 --- a/extras/packaging/debian/varnishmon.postinst +++ b/extras/packaging/debian/varnishmon.postinst @@ -30,7 +30,7 @@ case "$1" in if [ -x "$(command -v systemctl)" ]; then systemctl daemon-reload > /dev/null - systemctl try-reload-or-restart varnishmon > /dev/null + systemctl restart varnishmon > /dev/null fi fi ;; diff --git a/extras/packaging/redhat/varnishmon.postinst b/extras/packaging/redhat/varnishmon.postinst index 23b9f57..edca5af 100644 --- a/extras/packaging/redhat/varnishmon.postinst +++ b/extras/packaging/redhat/varnishmon.postinst @@ -27,6 +27,6 @@ elif [ "$1" -gt 1 ]; then if [ -x "$(command -v systemctl)" ]; then systemctl daemon-reload > /dev/null - systemctl try-reload-or-restart varnishmon > /dev/null + systemctl restart varnishmon > /dev/null fi fi From 58a97413d970e82279b7e4d85085dc832956ad13 Mon Sep 17 00:00:00 2001 From: David Fuentes Date: Mon, 3 Feb 2025 16:53:34 +0100 Subject: [PATCH 07/10] Fix npm update recipe in docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index b93ede4..8c6900b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,7 +45,7 @@ # # - Go: # # + go get -u ./... + make mod fmt lint vet test # # - Node.js: -# # + rm -rf package-lock.json node_modules && npm update && npm audit fix +# # + rm -rf package-lock.json node_modules && npm update --save && npm audit fix # # + npm outdated && npm install --save-dev @latest # # # Fetch profiling data & metrics. From 9337c0781236b3c2a0c5397e1068d3bfd02b65bf Mon Sep 17 00:00:00 2001 From: Carlos Abalde Date: Mon, 3 Feb 2025 16:59:44 +0100 Subject: [PATCH 08/10] Added new dirty hack to mitigate issues with ARM64 builds with GitHub Actions --- .github/workflows/main.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a992081..4d4ed5d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,6 +53,36 @@ jobs: - uses: actions/checkout@v4 - uses: ./extras/github/build-action + id: attempt1 + continue-on-error: true + with: + platform: ${{ matrix.platform }} + architecture: ${{ matrix.architecture }} + go-version: ${{ env.GO_VERSION }} + + # XXX: for ARM64 builds, jobs occasionally fail with an error suggesting + # that Docker is not ready. This is a workaround to retry the build once. + # >Run ./extras/github/build-action + # >Run docker/setup-buildx-action@v3 + # >Docker info + # >Buildx version + # >Inspecting default docker context + # >Creating a new builder instance + # Error: ERROR: failed to initialize builder builder-7cfe3cdd-acf8-4116-a011-40173ca3d469 + # (builder-7cfe3cdd-acf8-4116-a011-40173ca3d4690): Cannot connect to the Docker daemon at + # unix:///var/run/docker.sock. Is the docker daemon running? + - uses: ./extras/github/build-action + if: steps.attempt1.outcome == 'failure' + id: attempt2 + continue-on-error: true + with: + platform: ${{ matrix.platform }} + architecture: ${{ matrix.architecture }} + go-version: ${{ env.GO_VERSION }} + + # XXX: same as above, but for the second retry. + - uses: ./extras/github/build-action + if: steps.attempt2.outcome == 'failure' with: platform: ${{ matrix.platform }} architecture: ${{ matrix.architecture }} From 12992fc5b8597f535394fc13daf337977ef3edc7 Mon Sep 17 00:00:00 2001 From: Carlos Abalde Date: Tue, 4 Feb 2025 10:19:45 +0100 Subject: [PATCH 09/10] Fixed the X-axis layout in charts during refresh, adding additional styling + Used a monospace font for cluster names --- CHANGELOG.md | 4 ++++ assets/webpack/src/index.html.tmpl | 2 +- assets/webpack/src/js/chart.js | 17 ++++++++++++++--- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2da2af..362ee53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +- ? + + Fixed the X-axis layout in charts during refresh, adding additional styling. + + Used a monospace font for cluster names. + - 0.4.7-1 (2025-02-03): + Updated dependencies. * Go 1.23.3 ➙ 1.23.5 diff --git a/assets/webpack/src/index.html.tmpl b/assets/webpack/src/index.html.tmpl index a58cd7f..ef1ea1f 100644 --- a/assets/webpack/src/index.html.tmpl +++ b/assets/webpack/src/index.html.tmpl @@ -136,7 +136,7 @@