From e88a2c12f150aa670f008b92a12a682053d42c64 Mon Sep 17 00:00:00 2001 From: Leandro Nunes Date: Fri, 8 Apr 2022 15:02:50 +0100 Subject: [PATCH 1/3] [RFC] A proposed update to the Docker images ci_* tag pattern This RFC proposes a new format to keep our Docker images used in CI, moving away from our current incremental numbering to a more meaningful format that contains a timestamp and the latest hash from the repository used to generate such images. --- rfcs/0000-docker-image-tags.md | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 rfcs/0000-docker-image-tags.md diff --git a/rfcs/0000-docker-image-tags.md b/rfcs/0000-docker-image-tags.md new file mode 100644 index 00000000..e5c6619b --- /dev/null +++ b/rfcs/0000-docker-image-tags.md @@ -0,0 +1,52 @@ +- Feature Name: docker_image_tag_format +- Start Date: 2022-04-08 +- RFC PR: [apache/tvm-rfcs#0000](https://github.com/apache/tvm-rfcs/pull/0000) +- GitHub Issue: [apache/tvm#0000](https://github.com/apache/tvm/issues/0000) + +# Summary + +Defines a format for TVM CI Docker images tag. + +# Motivation + +In the current format used to identify our Docker images, it is impossible to link back a given version of the image to which version of the repository that represents. + +# Guide-level explanation + +For years we have been using a patern to version our CI Docker images, which is composed by v0.INCREMENTAL_NUMBER, e.g. tlcpack/ci_cpu:v0.80. Every time an image is updated, we bump the minor number, just as a way to release a new version. + +As the project is growing and given we recently have been improving the Docker images building process, it is time to consider using a more meaningful tagging scheme, so that it is easier to identify what is included in the images being used in our CI. + +When looking/using a Docker image, usually we would be interested in: + +1. How long ago was this image generated? +2. What is the last change added in the current images being used in production? + +None of these questions can be answered by our current numbering scheme, and to get that information we would usually need to do some digging and inspecting the image to see what is in there. + +# Reference-level explanation + +As an improvement to the current situation, this RFC proposes the adption of a tagging scheme currently used in the `tlcpackstaging` (https://hub.docker.com/u/tlcpackstaging) repository, composed by: + +* a timestamp YYYYMMDD-HHMMSS +* the last short git hash added in that image + +One example would be tlcpackstaging/ci_arm:20220201-115323-2af42ba8e. This tells us when this image was generated and up to which point in the repository is included. + +The advantage with the proposed scheme, is that we can just look back on our own repository to discover which changes to the Docker setup scripts (under docker/install/* in the TVM repository) as a way to check whether a given change is expected to be in the image. + +# Drawbacks + +Pointing to "the previous image" is obvious today, because it is just "the current version minus one". To revert the image in the proposed tagging scheme, we will need to adapt this process and use git history to discover which was the previous version in the repository. However, reverting images is quite rare so it should be something the will consume lots of time very often. + +# Rationale and alternatives + +Many other formats could be used to describe the tag, such as `git describe`, however, it lacks the timestamp, which is a quite useful piece of information to give an impression of how long ago an image was updated. + +# Prior art + +The proposed format is used in our automated daily Docker image rebuild jobs at https://ci.tlcpack.ai/job/docker-images-ci/. + +# Future possibilities + +As this is already in discussion, there is an opportunity, given we evaluate properly the impact in the current CI job runs, to rebuild Docker images for each PR. From f6904d6fcaa26f6600b2f1c2b094681f842a4219 Mon Sep 17 00:00:00 2001 From: Leandro Nunes Date: Wed, 20 Apr 2022 13:00:44 +0100 Subject: [PATCH 2/3] Update rfcs/0000-docker-image-tags.md Co-authored-by: Christopher Sidebottom --- rfcs/0000-docker-image-tags.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfcs/0000-docker-image-tags.md b/rfcs/0000-docker-image-tags.md index e5c6619b..459b7b1d 100644 --- a/rfcs/0000-docker-image-tags.md +++ b/rfcs/0000-docker-image-tags.md @@ -13,7 +13,7 @@ In the current format used to identify our Docker images, it is impossible to li # Guide-level explanation -For years we have been using a patern to version our CI Docker images, which is composed by v0.INCREMENTAL_NUMBER, e.g. tlcpack/ci_cpu:v0.80. Every time an image is updated, we bump the minor number, just as a way to release a new version. +For years we have been using a pattern to version our CI Docker images, which is composed by v0.INCREMENTAL_NUMBER, e.g. tlcpack/ci_cpu:v0.80. Every time an image is updated, we bump the minor number, just as a way to release a new version. As the project is growing and given we recently have been improving the Docker images building process, it is time to consider using a more meaningful tagging scheme, so that it is easier to identify what is included in the images being used in our CI. From 8170fd36a3a7478b69b153e791d341ab7718a302 Mon Sep 17 00:00:00 2001 From: Leandro Nunes Date: Wed, 20 Apr 2022 13:00:50 +0100 Subject: [PATCH 3/3] Update rfcs/0000-docker-image-tags.md Co-authored-by: Christopher Sidebottom --- ...{0000-docker-image-tags.md => 0066-docker-image-tags.md} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename rfcs/{0000-docker-image-tags.md => 0066-docker-image-tags.md} (89%) diff --git a/rfcs/0000-docker-image-tags.md b/rfcs/0066-docker-image-tags.md similarity index 89% rename from rfcs/0000-docker-image-tags.md rename to rfcs/0066-docker-image-tags.md index 459b7b1d..67213043 100644 --- a/rfcs/0000-docker-image-tags.md +++ b/rfcs/0066-docker-image-tags.md @@ -1,6 +1,6 @@ - Feature Name: docker_image_tag_format - Start Date: 2022-04-08 -- RFC PR: [apache/tvm-rfcs#0000](https://github.com/apache/tvm-rfcs/pull/0000) +- RFC PR: [apache/tvm-rfcs#0066](https://github.com/apache/tvm-rfcs/pull/66) - GitHub Issue: [apache/tvm#0000](https://github.com/apache/tvm/issues/0000) # Summary @@ -26,7 +26,7 @@ None of these questions can be answered by our current numbering scheme, and to # Reference-level explanation -As an improvement to the current situation, this RFC proposes the adption of a tagging scheme currently used in the `tlcpackstaging` (https://hub.docker.com/u/tlcpackstaging) repository, composed by: +As an improvement to the current situation, this RFC proposes the adoption of a tagging scheme currently used in the `tlcpackstaging` (https://hub.docker.com/u/tlcpackstaging) repository, composed by: * a timestamp YYYYMMDD-HHMMSS * the last short git hash added in that image @@ -37,7 +37,7 @@ The advantage with the proposed scheme, is that we can just look back on our own # Drawbacks -Pointing to "the previous image" is obvious today, because it is just "the current version minus one". To revert the image in the proposed tagging scheme, we will need to adapt this process and use git history to discover which was the previous version in the repository. However, reverting images is quite rare so it should be something the will consume lots of time very often. +Pointing to "the previous image" is obvious today, because it is just "the current version minus one". To revert the image in the proposed tagging scheme, we will need to adapt this process and use git history to discover which was the previous version in the repository. However, revert is quite rare but it will consume lots of time very often. # Rationale and alternatives