Docker auto update#2678
Conversation
|
This builds on the fix prior, only pay attention to the last commit. First two are the other pr |
|
Cant have one without the other, if you don't update the action, the deps will be outdated. Therefore, the library syncs itself. This also solves any dependency-related issues the user might get with time. |
|
Please resolve merge conflicts. We can merge this, but this doesn't address the initial question I asked, of if we need to have the GH action run daily? |
Doing that rn. I think the action should only run when commits are added. For this to be possible without breaking the Docker, the dependencies need to be updated by the user |
|
In my opinion, it should be updated by the user regardless to avoid issuees with time |
|
Ok, can you please update the GH action as you suggest? |
…downloader into DockerAutoUpdate
|
I think I did it, but I am unfamiliar with actions so please look over it |
| push: | ||
| branches: | ||
| - dev | ||
| - master |
There was a problem hiding this comment.
| - master |
Let's not publish a docker hub image on push to master, and only create a production release when a GH release is published.
The below action would've failed as github.ref == 'refs/heads/master' isnt treated as a production build
There was a problem hiding this comment.
Shouldn't the master branch be treated as the stable tag and the dev be the nightly? I don't know how GH action works, so I don't know how to do this, but that was my idea with this.
| set -e | ||
|
|
||
| uv --project /app lock --upgrade | ||
| uv --project /app sync --no-dev --frozen |
There was a problem hiding this comment.
Hmm.
Shouldn't docker images be immutable?
w/ this entrypoint, upgradding dependencies at runtime means:
- users require network access for every single command (compared to only at installation/build when dependencies r downloaded)
- The image is now non-reproducible over time, i.e. users with the same docker image can have different dependencies as they r resolved on startup
- This is an issue since a dependency update could break an already published image (defeating the main purpose of the docker img?)
There was a problem hiding this comment.
Hmm. Shouldn't docker images be immutable? w/ this entrypoint, upgradding dependencies at runtime means:
users require network access for every single command (compared to only at installation/build when dependencies r downloaded)
The image is now non-reproducible over time, i.e. users with the same docker image can have different dependencies as they r resolved on startup
- This is an issue since a dependency update could break an already published image (defeating the main purpose of the docker img?)
- Yes, this would have to update the deps every single time, a possible solution to this is to put the site-packages folder (or wtv uv uses) in a volume that is not a part of the image.
- The idea that the image is non-reproducable is incorrect because all libraries will always be up to date, exactly like using the latest image, no matter what image is used. The dependencies will always be what is in the pyproject and, therefore the same thing in the GH action that will update every day.
Auto update all deps on startup