Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord notifications changed format #1926

Closed
alex289 opened this issue Feb 9, 2024 · 2 comments
Closed

Discord notifications changed format #1926

alex289 opened this issue Feb 9, 2024 · 2 comments

Comments

@alex289
Copy link

alex289 commented Feb 9, 2024

Describe the bug

Previously I would get notifications from watchtower including the number of updates, fails and everything in one block but now I just get the containers and even a second block with two repeated lines.

Is there something wrong on my end? I didn't change any configuration.

Steps to reproduce

Run this:

version: "3.8"

services:
  watchtowertest:
    image: containrrr/watchtower:latest
    container_name: watchtowertest
    environment:
      TZ: "Europe/Berlin"
      WATCHTOWER_CLEANUP: "true"
      WATCHTOWER_INCLUDE_STOPPED: "true"
      WATCHTOWER_NOTIFICATION_REPORT: "true"
      WATCHTOWER_DEBUG: "true"
      WATCHTOWER_RUN_ONCE: "true"
      WATCHTOWER_NOTIFICATION_URL: "discord://...@..."
      WATCHTOWER_NOTIFICATION_TEMPLATE: |
  {{- if .Report -}}
          {{- with .Report -}}
        {{len .Scanned}} Scanned, {{len .Updated}} Updated, {{len .Failed}} Failed
              {{- range .Updated}}
        - {{.Name}} ({{.ImageName}}): {{.CurrentImageID.ShortID}} updated to {{.LatestImageID.ShortID}}
              {{- end -}}
              {{- range .Fresh}}
        - {{.Name}} ({{.ImageName}}): {{.State}}
            {{- end -}}
            {{- range .Skipped}}
        - {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
            {{- end -}}
            {{- range .Failed}}
        - {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}}
            {{- end -}}
          {{- end -}}
        {{- else -}}
          {{range .Entries -}}{{.Message}}{{"\n"}}{{- end -}}
        {{- end -}}
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

Expected behavior

The old behavior with the report.

Screenshots

Before:
before
After:
after

Environment

  • Platform: Ubuntu 22.04.3 LTS
  • Architecture: x86_64
  • Docker Version: 25.0.2, build 29cf629

Your logs

time="2024-02-09T15:49:20+01:00" level=debug msg="Got image name: postgres:latest"
time="2024-02-09T15:49:20+01:00" level=debug msg="Checking if pull is needed" container=/postgres image="postgres:latest"
time="2024-02-09T15:49:20+01:00" level=debug msg="Built challenge URL" URL="https://index.docker.io/v2/"
time="2024-02-09T15:49:20+01:00" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2024-02-09T15:49:20+01:00" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2024-02-09T15:49:20+01:00" level=debug msg="Setting scope for auth token" image=docker.io/library/postgres scope="repository:library/postgres:pull"
time="2024-02-09T15:49:20+01:00" level=debug msg="No credentials found."
time="2024-02-09T15:49:20+01:00" level=debug msg="Parsing image ref" host=index.docker.io image=library/postgres normalized=docker.io/library/postgres tag=latest
time="2024-02-09T15:49:20+01:00" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/library/postgres/manifests/latest"
time="2024-02-09T15:49:21+01:00" level=debug msg="Found a remote digest to compare with" remote="sha256:09f23e02d76670d3b346a3c00aa33a27cf57aab8341eedfcdaed41459d14f5c4"
time="2024-02-09T15:49:21+01:00" level=debug msg=Comparing local="sha256:09f23e02d76670d3b346a3c00aa33a27cf57aab8341eedfcdaed41459d14f5c4" remote="sha256:09f23e02d76670d3b346a3c00aa33a27cf57aab8341eedfcdaed41459d14f5c4"
time="2024-02-09T15:49:21+01:00" level=debug msg="Found a match"
time="2024-02-09T15:49:21+01:00" level=debug msg="No pull needed. Skipping image."
time="2024-02-09T15:49:21+01:00" level=debug msg="No new images found for /postgres"
time="2024-02-09T15:49:21+01:00" level=debug msg="Trying to load authentication credentials." container=/nginx image="nginx:latest"
time="2024-02-09T15:49:21+01:00" level=debug msg="No credentials for index.docker.io found" config_file=/config.json
time="2024-02-09T15:49:21+01:00" level=debug msg="Got image name: nginx:latest"
time="2024-02-09T15:49:21+01:00" level=debug msg="Checking if pull is needed" container=/nginx image="nginx:latest"
time="2024-02-09T15:49:21+01:00" level=debug msg="Built challenge URL" URL="https://index.docker.io/v2/"
time="2024-02-09T15:49:21+01:00" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2024-02-09T15:49:21+01:00" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2024-02-09T15:49:21+01:00" level=debug msg="Setting scope for auth token" image=docker.io/library/nginx scope="repository:library/nginx:pull"
time="2024-02-09T15:49:21+01:00" level=debug msg="No credentials found."
time="2024-02-09T15:49:21+01:00" level=debug msg="Parsing image ref" host=index.docker.io image=library/nginx normalized=docker.io/library/nginx tag=latest
time="2024-02-09T15:49:21+01:00" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/library/nginx/manifests/latest"
time="2024-02-09T15:49:21+01:00" level=debug msg="Found a remote digest to compare with" remote="sha256:84c52dfd55c467e12ef85cad6a252c0990564f03c4850799bf41dd738738691f"
time="2024-02-09T15:49:21+01:00" level=debug msg=Comparing local="sha256:5f44022eab9198d75939d9eaa5341bc077eca16fa51d4ef32d33f1bd4c8cbe7d" remote="sha256:84c52dfd55c467e12ef85cad6a252c0990564f03c4850799bf41dd738738691f"
time="2024-02-09T15:49:21+01:00" level=debug msg=Comparing local="sha256:6eb953446a36ad7aaa1624ff7b0fba5c8f8742e13fbef572cda3cac202fcf4aa" remote="sha256:84c52dfd55c467e12ef85cad6a252c0990564f03c4850799bf41dd738738691f"
time="2024-02-09T15:49:21+01:00" level=debug msg=Comparing local="sha256:84c52dfd55c467e12ef85cad6a252c0990564f03c4850799bf41dd738738691f" remote="sha256:84c52dfd55c467e12ef85cad6a252c0990564f03c4850799bf41dd738738691f"
time="2024-02-09T15:49:21+01:00" level=debug msg="Found a match"
time="2024-02-09T15:49:21+01:00" level=debug msg="No pull needed. Skipping image."
time="2024-02-09T15:49:21+01:00" level=debug msg="No new images found for /nginx"
time="2024-02-09T15:49:21+01:00" level=debug msg="Trying to load authentication credentials." container=/gitea image="gitea/gitea:latest"
time="2024-02-09T15:49:21+01:00" level=debug msg="No credentials for index.docker.io found" config_file=/config.json
time="2024-02-09T15:49:21+01:00" level=debug msg="Got image name: gitea/gitea:latest"
time="2024-02-09T15:49:21+01:00" level=debug msg="Checking if pull is needed" container=/gitea image="gitea/gitea:latest"
time="2024-02-09T15:49:21+01:00" level=debug msg="Built challenge URL" URL="https://index.docker.io/v2/"
time="2024-02-09T15:49:22+01:00" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2024-02-09T15:49:22+01:00" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2024-02-09T15:49:22+01:00" level=debug msg="Setting scope for auth token" image=docker.io/gitea/gitea scope="repository:gitea/gitea:pull"
time="2024-02-09T15:49:22+01:00" level=debug msg="No credentials found."
time="2024-02-09T15:49:22+01:00" level=debug msg="Parsing image ref" host=index.docker.io image=gitea/gitea normalized=docker.io/gitea/gitea tag=latest
time="2024-02-09T15:49:22+01:00" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/gitea/gitea/manifests/latest"
time="2024-02-09T15:49:22+01:00" level=debug msg="Found a remote digest to compare with" remote="sha256:a2095ce71c414c0c6a79192f3933e668a595f7fa7706324edd0aa25c8728f00f"
time="2024-02-09T15:49:22+01:00" level=debug msg=Comparing local="sha256:a2095ce71c414c0c6a79192f3933e668a595f7fa7706324edd0aa25c8728f00f" remote="sha256:a2095ce71c414c0c6a79192f3933e668a595f7fa7706324edd0aa25c8728f00f"
time="2024-02-09T15:49:22+01:00" level=debug msg="Found a match"
time="2024-02-09T15:49:22+01:00" level=debug msg="No pull needed. Skipping image."
time="2024-02-09T15:49:22+01:00" level=debug msg="No new images found for /gitea"
time="2024-02-09T15:49:22+01:00" level=debug msg="Trying to load authentication credentials." container=/uptime-kuma image="louislam/uptime-kuma:latest"
time="2024-02-09T15:49:22+01:00" level=debug msg="No credentials for index.docker.io found" config_file=/config.json
time="2024-02-09T15:49:22+01:00" level=debug msg="Got image name: louislam/uptime-kuma:latest"
time="2024-02-09T15:49:22+01:00" level=debug msg="Checking if pull is needed" container=/uptime-kuma image="louislam/uptime-kuma:latest"
time="2024-02-09T15:49:22+01:00" level=debug msg="Built challenge URL" URL="https://index.docker.io/v2/"
time="2024-02-09T15:49:22+01:00" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2024-02-09T15:49:22+01:00" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2024-02-09T15:49:22+01:00" level=debug msg="Setting scope for auth token" image=docker.io/louislam/uptime-kuma scope="repository:louislam/uptime-kuma:pull"
time="2024-02-09T15:49:22+01:00" level=debug msg="No credentials found."
time="2024-02-09T15:49:22+01:00" level=debug msg="Parsing image ref" host=index.docker.io image=louislam/uptime-kuma normalized=docker.io/louislam/uptime-kuma tag=latest
time="2024-02-09T15:49:22+01:00" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/louislam/uptime-kuma/manifests/latest"
time="2024-02-09T15:49:23+01:00" level=debug msg="Found a remote digest to compare with" remote="sha256:c326fd83d8da2d8fff3feb0e47433546139513bd823d9accc12977176b05b31f"
time="2024-02-09T15:49:23+01:00" level=debug msg=Comparing local="sha256:c326fd83d8da2d8fff3feb0e47433546139513bd823d9accc12977176b05b31f" remote="sha256:c326fd83d8da2d8fff3feb0e47433546139513bd823d9accc12977176b05b31f"
time="2024-02-09T15:49:23+01:00" level=debug msg="Found a match"
time="2024-02-09T15:49:23+01:00" level=debug msg="No pull needed. Skipping image."
time="2024-02-09T15:49:23+01:00" level=debug msg="No new images found for /uptime-kuma"
time="2024-02-09T15:49:23+01:00" level=debug msg="Trying to load authentication credentials." container=/gitea-runner image="gitea/act_runner:latest"
time="2024-02-09T15:49:23+01:00" level=debug msg="No credentials for index.docker.io found" config_file=/config.json
time="2024-02-09T15:49:23+01:00" level=debug msg="Got image name: gitea/act_runner:latest"
time="2024-02-09T15:49:23+01:00" level=debug msg="Checking if pull is needed" container=/gitea-runner image="gitea/act_runner:latest"
time="2024-02-09T15:49:23+01:00" level=debug msg="Built challenge URL" URL="https://index.docker.io/v2/"
time="2024-02-09T15:49:23+01:00" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2024-02-09T15:49:23+01:00" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2024-02-09T15:49:23+01:00" level=debug msg="Setting scope for auth token" image=docker.io/gitea/act_runner scope="repository:gitea/act_runner:pull"
time="2024-02-09T15:49:23+01:00" level=debug msg="No credentials found."
time="2024-02-09T15:49:23+01:00" level=debug msg="Parsing image ref" host=index.docker.io image=gitea/act_runner normalized=docker.io/gitea/act_runner tag=latest
time="2024-02-09T15:49:23+01:00" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/gitea/act_runner/manifests/latest"
time="2024-02-09T15:49:24+01:00" level=debug msg="Found a remote digest to compare with" remote="sha256:3f5b708370d47144bc9887c536486dd1d954af16effc160596c46e3daae41298"
time="2024-02-09T15:49:24+01:00" level=debug msg=Comparing local="sha256:3f5b708370d47144bc9887c536486dd1d954af16effc160596c46e3daae41298" remote="sha256:3f5b708370d47144bc9887c536486dd1d954af16effc160596c46e3daae41298"
time="2024-02-09T15:49:24+01:00" level=debug msg="Found a match"
time="2024-02-09T15:49:24+01:00" level=debug msg="No pull needed. Skipping image."
time="2024-02-09T15:49:24+01:00" level=debug msg="No new images found for /gitea-runner"
time="2024-02-09T15:49:24+01:00" level=debug msg="Trying to load authentication credentials." container=/portainer image="portainer/portainer-ce:latest"
time="2024-02-09T15:49:24+01:00" level=debug msg="No credentials for index.docker.io found" config_file=/config.json
time="2024-02-09T15:49:24+01:00" level=debug msg="Got image name: portainer/portainer-ce:latest"
time="2024-02-09T15:49:24+01:00" level=debug msg="Checking if pull is needed" container=/portainer image="portainer/portainer-ce:latest"
time="2024-02-09T15:49:24+01:00" level=debug msg="Built challenge URL" URL="https://index.docker.io/v2/"
time="2024-02-09T15:49:24+01:00" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://auth.docker.io/token\",service=\"registry.docker.io\"" status="401 Unauthorized"
time="2024-02-09T15:49:24+01:00" level=debug msg="Checking challenge header content" realm="https://auth.docker.io/token" service=registry.docker.io
time="2024-02-09T15:49:24+01:00" level=debug msg="Setting scope for auth token" image=docker.io/portainer/portainer-ce scope="repository:portainer/portainer-ce:pull"
time="2024-02-09T15:49:24+01:00" level=debug msg="No credentials found."
time="2024-02-09T15:49:24+01:00" level=debug msg="Parsing image ref" host=index.docker.io image=portainer/portainer-ce normalized=docker.io/portainer/portainer-ce tag=latest
time="2024-02-09T15:49:24+01:00" level=debug msg="Doing a HEAD request to fetch a digest" url="https://index.docker.io/v2/portainer/portainer-ce/manifests/latest"
time="2024-02-09T15:49:24+01:00" level=debug msg="Found a remote digest to compare with" remote="sha256:908d04d20e86f07a50b0f1a029a111b89aa3089b7fc7fdf68ec1c71b025f36cd"
time="2024-02-09T15:49:24+01:00" level=debug msg=Comparing local="sha256:908d04d20e86f07a50b0f1a029a111b89aa3089b7fc7fdf68ec1c71b025f36cd" remote="sha256:908d04d20e86f07a50b0f1a029a111b89aa3089b7fc7fdf68ec1c71b025f36cd"
time="2024-02-09T15:49:24+01:00" level=debug msg="Found a match"
time="2024-02-09T15:49:24+01:00" level=debug msg="No pull needed. Skipping image."
time="2024-02-09T15:49:24+01:00" level=debug msg="No new images found for /portainer"
time="2024-02-09T15:49:24+01:00" level=debug msg="This is the watchtower container /watchtower"
time="2024-02-09T15:49:24+01:00" level=info msg="Session done" Failed=0 Scanned=11 Updated=0 notify=no
time="2024-02-09T15:49:24+01:00" level=info msg="Waiting for the notification goroutine to finish" notify=no

Additional context

In the logfile notify is set to no but I have the WATCHTOWER_NOTIFICATION_REPORT set to true. Maybe it has something to do with it

Copy link

github-actions bot commented Feb 9, 2024

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

@alex289
Copy link
Author

alex289 commented Apr 22, 2024

This only happens when there are more than 9 containers, seems like it's okay for now

@alex289 alex289 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant