Skip to content

Discord/Slack notifications being sent for runs with no updates #1008

@rg9400

Description

@rg9400

Describe the bug

On the latest dev image and for the last week, I noticed that Watchtower is now sending notifications for every single run, even if there are no updates. Previously, it would only send a notification if a container was actually updated. This is creating even more notification spam than usual (I was hoping Watchtower would go the other way where notifications became limited to summaries of runs where containers were updated).

To Reproduce

  1. Use latest dev version of Watchtower and configure Discord notifications. Not sure if this issue exists for Slack or Shoutrr as well, but I am using Discord via the Slack configuration variables (which works outside this issue).
  watchtower:
    image: containrrr/watchtower:latest-dev
    container_name: watchtower
    environment:
      - TZ=${TZ}
      - WATCHTOWER_CLEANUP=true
      - WATCHTOWER_REMOVE_VOLUMES=true
      - WATCHTOWER_SCHEDULE=0 0 * * * *
      - WATCHTOWER_INCLUDE_STOPPED=true
      - WATCHTOWER_INCLUDE_RESTARTING=true
      - WATCHTOWER_NOTIFICATIONS=slack
      - WATCHTOWER_NOTIFICATION_SLACK_HOOK_URL=https://discord.com/api/webhooks/${WATCHTOWERWEBHOOK}/slack
      - WATCHTOWER_NOTIFICATION_SLACK_IDENTIFIER=Watchtower
      - "WATCHTOWER_NOTIFICATION_SLACK_ICON_EMOJI=:whale:"
      - WATCHTOWER_NOTIFICATION_SLACK_ICON_URL=https://raw.githubusercontent.com/containrrr/watchtower/master/logo.png
      - DOCKER_CONFIG=/config
    volumes:
      - ${CONFDIR}/watchtower:/config
      - /var/run/docker.sock:/var/run/docker.sock
    hostname: ${HOSTNAME}
    logging: *default-logging
    labels: *default-labels
    restart: unless-stopped
  1. Wait for a run without any updates, check notifications

Expected behavior

Notifications are only sent if a container is being updated on a run

Screenshots

image
Environment

latest-dev tag, currently running version v1.3.0-19-gea300b7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions