whats-up-docker icon indicating copy to clipboard operation
whats-up-docker copied to clipboard

Discrepancy between GUI and Home Assistant

Open LorenKeagle opened this issue 11 months ago • 8 comments

Using WUD 7.1.1, I have a situation where the WUD GUI is correctly indicating that there is no update available for a container, but the MQTT telemetry to Home Assistant is still indicating one:

Screenshot 2024-12-14 at 2 30 43 AM

Screenshot 2024-12-14 at 2 30 22 AM

Here is my WUD compose file:

services:
  whatsupdocker:
    image: getwud/wud:7.1.1
    container_name: wud
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 3000:3000
    environment:
      - WUD_WATCHER_LOCAL_WATCHALL=true
      - WUD_TRIGGER_MQTT_MOSQUITTO_URL=mqtt://xxx.xxx.xxx.xxx:1883
      - WUD_TRIGGER_MQTT_MOSQUITTO_HASS_ENABLED=true
      - WUD_TRIGGER_MQTT_MOSQUITTO_HASS_DISCOVERY=true
      - WUD_TRIGGER_MQTT_MOSQUITTO_USER=**********
      - WUD_TRIGGER_MQTT_MOSQUITTO_PASSWORD=**********
      - WUD_REGISTRY_LSCR_USERNAME=**********
      - WUD_REGISTRY_LSCR_TOKEN=**********
    labels:
      - 'wud.tag.include=^\d+\.\d+\.\d+$'
      - 'wud.watch.digest=true'
   

And here is the compose entry for the container in question:

  unifi-db:
    image: mongo:7
    container_name: unifi-db
    volumes:
      - ./mongodb/data:/data/db
      - ./mongodb/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
    restart: unless-stopped
    labels:
      - 'wud.tag.include=^7+\.\d+\.\d+$'
      - 'wud.watch.digest=true'

This may be an edge condition related to the usage of the "mongo:7" tag to pull the latest version of mongo 7.x.x. I have a feeling that this is due to WUD blindly reporting "current version = 7" vs "latest version = 7.0.15" in the MQTT message. Is it not possible for WUD to figure out the actual version that is currently installed using the image ID? I was hoping that would be handled with the "wud.watch.digest=true" configuration, as that flag is supposed to look up all images from the repository.

LorenKeagle avatar Dec 14 '24 10:12 LorenKeagle

Are you sure Home Assistant shows an update? I do have the same issue sometimes, but so far that was gone after destroying HA browser cache and reloading.

proud-nerd avatar Mar 18 '25 22:03 proud-nerd

I have the same problem for some images. Clearing cache does not resolve the problem. It is visible not only in HA but also in the WUD web interface, at the same time portainer shows that there is no updated version available. Good example is https://hub.docker.com/layers/minimworld/minimserver/latest/images/sha256-48de01ed32dbce6507b24aa63a737c8dbda17274511add41cbf8345f75787f6f Last push to Docker Hub was 2 years ago and still WUD shows that update is available for it.

adorobis avatar Mar 19 '25 07:03 adorobis

It is visible not only in HA but also in the WUD web interface.

That's a different issue, not the same. I'd suggest opening a separate issue, after checking, if there might be already an issue for your problem.

More info about your setup and used labels would also help.

proud-nerd avatar Mar 19 '25 08:03 proud-nerd

That's a different issue, not the same. I'd suggest opening a separate issue, after checking, if there might be already an issue for your problem.

True. Actually I have opened it earlier: https://github.com/getwud/wud/issues/518

adorobis avatar Mar 19 '25 09:03 adorobis

Yes, Home Assistant is definitely still showing the update. Since creating this ticket, I've updated that container twice, and the change is reflected in the HA entity:

Image

The WUD UI still correctly shows the entity as having no update:

Image

To be fair, this may be an issue with the logic in HA doing a simple string comparison between the installed/latest versions. However, this data is coming from WUD so I believe WUD should be sending the actual detected full version string as the 'current' version, rather than the "7" label. You could make the case that HA could fix this on their end by doing better semantic comparison between "7" and "7.0.17" in their Update entities, but I don't think that's a good approach. WUD has the logic configured to recognize that the container is up to date, and the data it's sending to HA should be cognizant of whatever logic HA is operating with so that the states are consistent.

LorenKeagle avatar Mar 19 '25 19:03 LorenKeagle

What I meant by that is: If you go into developer tools in Home Assistant and search for the update entity, what does it show there? Can you provide that? My guess was, that your browser is showing you an old entity that does not exist anymore. Atleast that's what happened to me a few times already and was fixed by clearing browser cache.

If you can provide the actual state of the update sensor in home assistant, that would help nonetheless.

proud-nerd avatar Mar 19 '25 21:03 proud-nerd

It's definitely a real entity:

Image

LorenKeagle avatar Mar 19 '25 21:03 LorenKeagle

Okay, so first thing you can try: click the manual trigger button for that container in wud web UI. That should send a fresh sensor update to homeassistant. I doubt that it will fix this, but who knows.

Second thing: what goal are you trying to achieve with you wud.tag.include regex? Do you just want version 7 and use digest watching on that? Then the regex you need would be simply ^7$. Right now you are only matching tags, that are full semver down to patch level and start with one or more sevens. E.g. 7.0.17 or 77.99.99, but it won't match your current version 7.

Possible that WUD is confused because your wud.tag.include does not match your installed version? But I'm just guessing right now tbh. Sounds definetly like bug, that it's reporting something else to home assistant than showing in it's own UI. But maybe there is atleast a workaround.

proud-nerd avatar Mar 20 '25 06:03 proud-nerd