-
Notifications
You must be signed in to change notification settings - Fork 27
Lilypad runs cached modules instead of pulling new Docker Image if there are changes #520
Description
Describe the bug
Current Behavior
When a user runs a job module using the Lilypad CLI, modules get downloaded to:
/tmp/lilypad/data/repos/<MODULE_AUTHOR>/<MODULE_NAME>
All job module runs are then ran from the cached module.
If a module is ran once, it will never update unless /tmp is cleared.
The most recent changes from the GitHub repo are correctly pulled, but the newest image from Docker Hub is not downloaded (unless the job.Spec.Docker.Image field changes).
Proposed Behavior
Check the hash of the Docker hash locally and compare it with the latest published hash, then pull the new Docker image if necessary
Instead download and run modules to/from:
- /tmp/lilypad/data/repos/<MODULE_NAME>/<MODULE_VERSION>
or:
- /tmp/lilypad/data/repos/<MODULE_AUTHOR>/<MODULE_NAME>/<MODULE_VERSION>
Either way, the key difference is the <MODULE_VERSION> which ensures the latest version of the module is being ran.
- We can add a version field to the lilypad_module.json.tmpl file
- We can alternatively use the Docker Hub hash or index digest (probably a better solution)
- Replace <MODULE_VERSION> with <DOCKER_HASH>
Reproduction
- Download module repo (or create your own)
- Build and push Docker image to Docker Hub
- Run module with
lilypad run ... - Make changes to module, and push changes to new Docker image
- Run module again with
lilypad run ... - None of the changes from the new Docker image will be present in the locally cached module
Logs
Screenshots
System Info
Apple M1 Pro
MacOs 15.2Severity
Annoyance