Missing icon cache is too aggressive
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 253
- Forks
- 106
- Avg merge
- 6d 22h
- Merged PRs (30d)
- 12
Description
When a container is created and it doesn't have an icon, it will default to the question mark. However, if a valid image is defined later, even when the container is recreated and you hard refresh in browser, it's still the question mark.
If you look at DockerClient.php:
So then it gets persisted into state/plugins/dynamix.docker.manager/docker.json permanently unless manually changed. I think the code that exists for this case where it's missing the icon so it uses the fallback but then it gets a valid icon so then it changes to the correct icon is faulty;
Because this will always evaluate as true since the placeholder image does exist, the check for a proper icon never runs again. The only solution is to manually edit the icon field in docker.json.
Might be related to #2691?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with emhttp/plugins/dynamix.docker.manager/include/DockerClient.php around lines 340-346 and inspect how the fallback icon is persisted in state/plugins/dynamix.docker.manager/docker.json. Reproduce the sequence with a container that first lacks an icon and later receives a valid image, then verify that recreation and a browser refresh show the valid icon without manually editing docker.json.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100