From d90a0d3b7be1c9b1c8d2a4e457f841a880ac3038 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Oct 2023 19:42:39 +0000 Subject: [PATCH 1/4] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/angular.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/go.yml | 2 +- .github/workflows/kotlin.yml | 2 +- .github/workflows/terraform.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/angular.yml b/.github/workflows/angular.yml index 756e8988..199f7489 100644 --- a/.github/workflows/angular.yml +++ b/.github/workflows/angular.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 # https://stackoverflow.com/questions/58139406/only-run-job-on-specific-branch-with-github-actions # if: github.ref == 'refs/heads/main' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7a611ad7..d361e54e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,7 +18,7 @@ jobs: node-version: [16.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # https://github.com/actions/cache # This action allows caching dependencies and build outputs to improve workflow execution time. diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e83eb703..cdbe1535 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -24,7 +24,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go 1.x uses: actions/setup-go@v4 diff --git a/.github/workflows/kotlin.yml b/.github/workflows/kotlin.yml index 3519e3fe..b8f8e5c2 100644 --- a/.github/workflows/kotlin.yml +++ b/.github/workflows/kotlin.yml @@ -23,7 +23,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 17 (temurin) uses: actions/setup-java@v3 diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 33dee8fc..473841ce 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v3.0.1 From e67574b8de02112c19c81af9e7f4e5fdf0e2a87b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:12:01 +0000 Subject: [PATCH 2/4] Bump aws-actions/configure-aws-credentials from 3 to 4 Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 3 to 4. - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/v3...v4) --- updated-dependencies: - dependency-name: aws-actions/configure-aws-credentials dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/angular.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/go.yml | 2 +- .github/workflows/kotlin.yml | 2 +- .github/workflows/terraform.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/angular.yml b/.github/workflows/angular.yml index 3c87adda..11bf44b7 100644 --- a/.github/workflows/angular.yml +++ b/.github/workflows/angular.yml @@ -26,7 +26,7 @@ jobs: # if: github.ref == 'refs/heads/main' - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v3.0.1 + uses: aws-actions/configure-aws-credentials@v4 if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d6857e7e..14619e5e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -40,7 +40,7 @@ jobs: node-version: ${{ matrix.node-version }} - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v3 + uses: aws-actions/configure-aws-credentials@v4 if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 69e814ec..f08f80d2 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -33,7 +33,7 @@ jobs: id: go - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v3.0.1 + uses: aws-actions/configure-aws-credentials@v4 if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/kotlin.yml b/.github/workflows/kotlin.yml index d7994735..0d45adbc 100644 --- a/.github/workflows/kotlin.yml +++ b/.github/workflows/kotlin.yml @@ -34,7 +34,7 @@ jobs: - name: Configure AWS Credentials # avoid https://github.com/aws-actions/configure-aws-credentials#notice-node12-deprecation-warning - uses: aws-actions/configure-aws-credentials@v3.0.1 + uses: aws-actions/configure-aws-credentials@v4 if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 833a6ed2..a7a94e56 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v3 - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v3.0.1 + uses: aws-actions/configure-aws-credentials@v4 if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} From 23e3941f2dbef9f0a8793fc5413d68bbf2f1e4f4 Mon Sep 17 00:00:00 2001 From: tillkuhn Date: Fri, 12 Jan 2024 17:12:24 +0100 Subject: [PATCH 3/4] update actions --- .github/workflows/angular.yml | 4 ++-- .github/workflows/go.yml | 6 +++--- .github/workflows/kotlin.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/angular.yml b/.github/workflows/angular.yml index 38b4dd22..077620e7 100644 --- a/.github/workflows/angular.yml +++ b/.github/workflows/angular.yml @@ -89,7 +89,7 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Set up Docker Buildx to support arm/amd platforms - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main - name: Login to DockerHub @@ -100,7 +100,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} # Password or personal access token used to log in to a Docker registry. If not set then no login will occur. - name: Push to DockerHub - uses: docker/build-push-action@v4 # https://github.com/docker/build-push-action + uses: docker/build-push-action@v5 # https://github.com/docker/build-push-action if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main with: context: ./angular diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ab26b45b..4453fa29 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -99,7 +99,7 @@ jobs: dockerfile: ./go/Dockerfile - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main - name: Login to DockerHub @@ -127,7 +127,7 @@ jobs: # check https://stackoverflow.com/a/71438011/4292075 - name: Push to GitHub Container Registry - uses: docker/build-push-action@v4 # https://github.com/docker/build-push-action + uses: docker/build-push-action@v5 # https://github.com/docker/build-push-action if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main with: context: ./go @@ -146,7 +146,7 @@ jobs: RELEASE_VERSION: ${{ env.RELEASE_VERSION }} - name: Push to DockerHub - uses: docker/build-push-action@v4 # https://github.com/docker/build-push-action + uses: docker/build-push-action@v5 # https://github.com/docker/build-push-action if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main with: context: ./go diff --git a/.github/workflows/kotlin.yml b/.github/workflows/kotlin.yml index 52021187..5d973652 100644 --- a/.github/workflows/kotlin.yml +++ b/.github/workflows/kotlin.yml @@ -116,7 +116,7 @@ jobs: # Setup Docker buildx to support multi-platform images # https://github.com/docker/setup-buildx-action - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main - name: Login to DockerHub @@ -131,7 +131,7 @@ jobs: # GitHub Action to build and push Docker images including multistage builds - name: Push to DockerHub - uses: docker/build-push-action@v4 # https://github.com/docker/build-push-action + uses: docker/build-push-action@v5 # https://github.com/docker/build-push-action if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) # run only on main with: context: ./kotlin From 55eb2d1f197581fc56695f5fdb642199da386961 Mon Sep 17 00:00:00 2001 From: tillkuhn Date: Fri, 12 Jan 2024 17:19:36 +0100 Subject: [PATCH 4/4] set dummy value for kafka brokers --- go/topkapi/client_test.go | 44 ++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/go/topkapi/client_test.go b/go/topkapi/client_test.go index 08e452c8..1f62876a 100644 --- a/go/topkapi/client_test.go +++ b/go/topkapi/client_test.go @@ -1,34 +1,36 @@ package topkapi import ( - "fmt" - "hash/adler32" - "testing" + "fmt" + "hash/adler32" + "os" + "testing" ) func TestTopicPrefix(t *testing.T) { - config := &ClientConfig{ - TopicPrefix: "hase-", - } - fulltopic := getTopicWithPrefix("horst", config) - if fulltopic != "hase-horst" { - t.Error(fulltopic + " unexpected") - } + config := &ClientConfig{ + TopicPrefix: "hase-", + } + fulltopic := getTopicWithPrefix("horst", config) + if fulltopic != "hase-horst" { + t.Error(fulltopic + " unexpected") + } } func TestChecksum(t *testing.T) { - message := "SummerOf69!" - checksum := adler32.Checksum([]byte(message)) - if checksum != 422708159 { - t.Error(fmt.Sprint(checksum) + " unexpected") - } + message := "SummerOf69!" + checksum := adler32.Checksum([]byte(message)) + if checksum != 422708159 { + t.Error(fmt.Sprint(checksum) + " unexpected") + } } func TestClientSetup(t *testing.T) { - expected := "testTheRest" - client := NewClientWithId(expected) - actual1 := client.Config.ClientId - if actual1 != expected { - t.Error(fmt.Sprintf("Expected %s got %s", expected, actual1)) - } + _ = os.Setenv("KAFKA_BROKERS", "localhost:9094") + expected := "testTheRest" + client := NewClientWithId(expected) + actual1 := client.Config.ClientId + if actual1 != expected { + t.Error(fmt.Sprintf("Expected %s got %s", expected, actual1)) + } }