From 3092c7e3555914fc120907e9ca6dc2482618993a Mon Sep 17 00:00:00 2001 From: Erik Harding Date: Wed, 11 Sep 2024 12:17:06 +0200 Subject: [PATCH 1/9] Add v8.0.0 to build matrix --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9d34eb7..435e0bd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,7 +15,7 @@ jobs: PGPASSWORD: temba strategy: matrix: - ARCHIVER_VERSION: ["6.4.0", "7.0.0", "7.2.0"] + ARCHIVER_VERSION: ["6.4.0", "7.0.0", "7.2.0", "8.0.0"] steps: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 From b655789082b7430dcd2304a23e33d71fcfc89a04 Mon Sep 17 00:00:00 2001 From: Erik Harding Date: Wed, 11 Sep 2024 12:29:19 +0200 Subject: [PATCH 2/9] Remove olde versions from build batrix --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 435e0bd..45aabe2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,7 +15,7 @@ jobs: PGPASSWORD: temba strategy: matrix: - ARCHIVER_VERSION: ["6.4.0", "7.0.0", "7.2.0", "8.0.0"] + ARCHIVER_VERSION: ["8.0.0"] steps: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 From 96d08fee99cb4358617d31216fca2b4a90bb170a Mon Sep 17 00:00:00 2001 From: Erik Harding Date: Wed, 11 Sep 2024 12:51:17 +0200 Subject: [PATCH 3/9] Update base image --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b232b32..a09eb4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN wget -q -O archiver.tar.gz "https://github.com/$ARCHIVER_REPO/releases/downl RUN mkdir archiver RUN tar -xzC archiver -f archiver.tar.gz -FROM debian:stretch-slim +FROM debian:bullseye-slim RUN set -ex; \ addgroup --system archiver; \ @@ -24,4 +24,4 @@ COPY --from=build archiver/rp-archiver /usr/local/bin USER archiver ENTRYPOINT [] -CMD ["rp-archiver"] \ No newline at end of file +CMD ["rp-archiver"] From 2cc167c4302e3246aee6a134980088501777d65e Mon Sep 17 00:00:00 2001 From: Erik Harding Date: Wed, 11 Sep 2024 13:24:42 +0200 Subject: [PATCH 4/9] Add debug info --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 45aabe2..fc16019 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,6 +50,7 @@ jobs: psql -h localhost -d temba -U temba -f ci/database.sql - name: Test image run: | + docker ps docker run --name archiver --env-file docker.envfile --link postgis --link localstack_main --publish 8080:8080 --detach archiver timeout ${{env.GREP_TIMEOUT}} grep -m 1 's3 bucket ok' <(docker logs --follow archiver 2>&1) timeout ${{env.GREP_TIMEOUT}} grep -m 1 'Sleeping until next UTC day' <(docker logs --follow archiver 2>&1) From 5b85fcf0fa1ddc25418318efc839ec46134bae24 Mon Sep 17 00:00:00 2001 From: Erik Harding Date: Wed, 11 Sep 2024 13:29:11 +0200 Subject: [PATCH 5/9] fix container name --- .github/workflows/ci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fc16019..e80da90 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,8 +50,7 @@ jobs: psql -h localhost -d temba -U temba -f ci/database.sql - name: Test image run: | - docker ps - docker run --name archiver --env-file docker.envfile --link postgis --link localstack_main --publish 8080:8080 --detach archiver + docker run --name archiver --env-file docker.envfile --link postgis --link localstack-main --publish 8080:8080 --detach archiver timeout ${{env.GREP_TIMEOUT}} grep -m 1 's3 bucket ok' <(docker logs --follow archiver 2>&1) timeout ${{env.GREP_TIMEOUT}} grep -m 1 'Sleeping until next UTC day' <(docker logs --follow archiver 2>&1) grep -v 'error' <(docker logs archiver 2>&1) From e3d2fcca4a9b72fea071ad90100765f8ec765596 Mon Sep 17 00:00:00 2001 From: Erik Harding Date: Wed, 11 Sep 2024 13:41:40 +0200 Subject: [PATCH 6/9] add localstack logs --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e80da90..94e66fd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -60,6 +60,7 @@ jobs: docker ps docker images docker logs archiver + docker logs localstack-main - name: Create image tags uses: docker/metadata-action@v3 id: tags From 68be1f5c5444bfbc94e416b66ba30065b118fac2 Mon Sep 17 00:00:00 2001 From: Erik Harding Date: Wed, 11 Sep 2024 13:52:27 +0200 Subject: [PATCH 7/9] use dummy auth values --- docker.envfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker.envfile b/docker.envfile index 1d0f2a8..3ca303c 100644 --- a/docker.envfile +++ b/docker.envfile @@ -2,4 +2,6 @@ ARCHIVER_DB=postgres://temba:temba@postgis/temba?sslmode=disable ARCHIVER_S3_DISABLE_SSL=true ARCHIVER_S3_FORCE_PATH_STYLE=true ARCHIVER_S3_ENDPOINT=http://localstack_main:4566 -ARCHIVER_LOG_LEVEL=debug \ No newline at end of file +ARCHIVER_LOG_LEVEL=debug +ARCHIVER_AWS_ACCESS_KEY_ID=root +ARCHIVER_AWS_SECRET_ACCESS_KEY=pass From 9ec8ded7ca9b0a6a2db8c0652ab5cb05ced32bc7 Mon Sep 17 00:00:00 2001 From: Erik Harding Date: Wed, 11 Sep 2024 13:55:15 +0200 Subject: [PATCH 8/9] Fix s3 endpoint --- docker.envfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker.envfile b/docker.envfile index 3ca303c..e62ce0c 100644 --- a/docker.envfile +++ b/docker.envfile @@ -1,7 +1,7 @@ ARCHIVER_DB=postgres://temba:temba@postgis/temba?sslmode=disable ARCHIVER_S3_DISABLE_SSL=true ARCHIVER_S3_FORCE_PATH_STYLE=true -ARCHIVER_S3_ENDPOINT=http://localstack_main:4566 +ARCHIVER_S3_ENDPOINT=http://localstack-main:4566 ARCHIVER_LOG_LEVEL=debug ARCHIVER_AWS_ACCESS_KEY_ID=root ARCHIVER_AWS_SECRET_ACCESS_KEY=pass From 3a1b308c9667805fcb318fa212d6f4546696a244 Mon Sep 17 00:00:00 2001 From: Erik Harding Date: Wed, 11 Sep 2024 14:00:02 +0200 Subject: [PATCH 9/9] Fix log checks --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 94e66fd..d0d30e4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -51,8 +51,10 @@ jobs: - name: Test image run: | docker run --name archiver --env-file docker.envfile --link postgis --link localstack-main --publish 8080:8080 --detach archiver + timeout ${{env.GREP_TIMEOUT}} grep -m 1 'db ok' <(docker logs --follow archiver 2>&1) timeout ${{env.GREP_TIMEOUT}} grep -m 1 's3 bucket ok' <(docker logs --follow archiver 2>&1) - timeout ${{env.GREP_TIMEOUT}} grep -m 1 'Sleeping until next UTC day' <(docker logs --follow archiver 2>&1) + timeout ${{env.GREP_TIMEOUT}} grep -m 1 'tmp file access ok' <(docker logs --follow archiver 2>&1) + timeout ${{env.GREP_TIMEOUT}} grep -m 1 'sleeping until next archival' <(docker logs --follow archiver 2>&1) grep -v 'error' <(docker logs archiver 2>&1) - name: debug outputs if: always()