-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add: utility script to upgrade docker-snap version #199
Conversation
- It works by running it from the base root of the project: ``` ./.github/workflows/upgrade.sh ``` It generates the necessary changes on snap/snapcraft.yaml by fetching the latest version available for Moby using the GitHub api. And then based on the Dockerfile for the latest version, it fetches the necessary tags for the other parts of docker-snap. It only changes the needed code and not the comments. Signed-off-by: Lincoln Wallace <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice utility script. Not sure if this should under workflows, considering a workflow for this doesn't exist yet.
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
* helper to check if yq is present. * helper to check the need of update. * replace all occurencies of the old engine version for the new one in the comments. Signed-off-by: Lincoln Wallace <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks.
I noticed that this is not upgrading the Nvidia runtime parts. Would be useful to also upgrade nvidia-container-toolkit and libnvidia-container, but that needs to rely on a reference (major version number?) to avoid breaking changes.
It generates the necessary changes on
snap/snapcraft.yaml
by fetching the latest version available for Mobyusing the GitHub API.
And then, based on the Dockerfile for the latest version, it fetches the necessary tags for the other parts of docker-snap.
It also updates the comments with the new version for the Moby Engine.
PS: It has well known that the script generates some undesired changes like: It deletes the blank lines on the
snap/snapcraft.yaml
file, this is because of howyq
behaves (since it serializes and deserializes theYAML
file). And it's not something that I'm willing to fix on this script with this PR. The undesired changed can be removed by doinggit restore snap/snapcraft.yaml -p
and selecting the changes that you want to discard. Or also by doinggit add -p
and adding to the stage area only the changes that you want and discarding the other ones withgit restore .
.