Fix: send failure notifications for config init errors#697
Merged
m90 merged 2 commits intooffen:mainfrom Dec 22, 2025
Merged
Conversation
…ilure notifications
Contributor
Author
|
Tests ran locally without errors. Although I had to change a bunch of stuff because of being on a mac and having differing docker desktop setting: diff --git a/test/docker-compose.yml b/test/docker-compose.yml
index eb4445b..b8f23ca 100644
--- a/test/docker-compose.yml
+++ b/test/docker-compose.yml
@@ -3,6 +3,8 @@ services:
hostname: manager
privileged: true
image: offen/docker-volume-backup:test-sandbox
+ environment:
+ DOCKER_CONFIG: /tmp/docker-config
healthcheck:
test: ["CMD", "docker", "info"]
interval: 1s
@@ -10,7 +12,7 @@ services:
retries: 50
volumes:
- ./:/code
- - ${HOME}/.docker/config.json:/root/.docker/config.json
+ - docker_config:/tmp/docker-config
- ${TARBALL:-.}:/cache/image.tar.gz
- docker_volume_backup_test_sandbox_image:/var/lib/docker/image
- docker_volume_backup_test_sandbox_containerd:/var/lib/docker/containerd
@@ -20,7 +22,7 @@ services:
hostname: worker1
volumes:
- ./:/code
- - ${HOME}/.docker/config.json:/root/.docker/config.json
+ - docker_config:/tmp/docker-config
- ${TARBALL:-.}:/cache/image.tar.gz
- docker_volume_backup_test_sandbox_image:/var/lib/docker/image
- docker_volume_backup_test_sandbox_containerd_1:/var/lib/docker/containerd
@@ -31,7 +33,7 @@ services:
hostname: worker2
volumes:
- ./:/code
- - ${HOME}/.docker/config.json:/root/.docker/config.json
+ - docker_config:/tmp/docker-config
- ${TARBALL:-.}:/cache/image.tar.gz
- docker_volume_backup_test_sandbox_image:/var/lib/docker/image
- docker_volume_backup_test_sandbox_containerd_2:/var/lib/docker/containerd
@@ -43,3 +45,4 @@ volumes:
docker_volume_backup_test_sandbox_containerd:
docker_volume_backup_test_sandbox_containerd_1:
docker_volume_backup_test_sandbox_containerd_2:
+ docker_config:
diff --git a/test/test.sh b/test/test.sh
index c695326..208c7db 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -29,7 +29,7 @@ if [ ! -z "$MATCH_PATTERN" ]; then
find_args="$find_args -name $MATCH_PATTERN"
fi
-for dir in $(find $find_args | sort); do
+for dir in $(gfind $find_args | sort); do
dir=$(echo $dir | cut -c 3-)
echo "################################################"
echo "Now running ${dir}"
@@ -58,7 +58,7 @@ for dir in $(find $find_args | sort); do
docker exec $svc /bin/sh -c "docker load -i /cache/image.tar.gz"
done
- for executable in $(find $dir -type f -executable | sort); do
+ for executable in $(gfind $dir -type f -executable | sort); do
context="manager"
if [ -f "$executable.context" ]; then
context=$(cat "$executable.context") |
Member
|
I went through the commit history and it seems the deadlock I remembered is gone for a while now (and I missed that it's now possible to do what this PR does). One of your changes made me find a slight inconsistency in error handling in Once this is green, it's ready to go, thanks for fixing. |
Contributor
Author
|
Thanks for creating the “offen” collective. I like the concept! |
Member
|
This is now released in v2.47.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Fixes #696
How I tested this
notification-docker-compose.yml'.token')
Should look like this:
[ { "id": 1, "appid": 2, "message": "Running docker-volume-backup failed with error: main.(*script).init: error creating s3 storage backend: s3.NewStorageBackend: AWS_S3_BUCKET_NAME is defined, but no credentials were provided\n\nLog output of the failed run was:\n\n", "title": "Failure running docker-volume-backup at 2025-12-21T17:39:28Z", "priority": 0, "date": "2025-12-21T17:39:28.49883576Z" } ]