From 3009db4cf4a0b26b5bbf65e7996eef10d659c804 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 11 Dec 2024 10:44:26 -0600 Subject: [PATCH 1/3] Floating tag support --- lifecycle.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lifecycle.md b/lifecycle.md index af1aa4f8..59be1764 100644 --- a/lifecycle.md +++ b/lifecycle.md @@ -48,9 +48,21 @@ Note: this content should be moved to another location as it is not lifecycle re Build and test images are referenced in repo infra files, across a variety of `main` and `release/*` branches. Updating these references is a multi-step detail-oriented task. It is a pain, but necessary. -We use version specific references in infra to ensure that our CI builds are reliable. One can imagine using floating OS tags (such as `debian-oldest` and `debian-latest`), however such an approach would be guaranteed to break our build. We know that since we often see build and test breaks that need addressing in PRs where we update build and test images. +Several types of tag styles are provided: +* version-specific: The tag name includes the distro's version. Example: `alpine-3.21-helix-amd64` +* floating: The tag name has no version. Instead it is routinely updated to reference a new version as the distro's lifecycle progresses. There are two sub-types of floating tags: + * latest: References the latest validated version of the distro. Example: `alpine-latest-helix-amd64` + * oldest: References the oldest supported version of the distro. Example: `alpine-oldest-helix-amd64` -At times, it may be necessary to use a [fixed image reference](https://github.com/dotnet/runtime/pull/110199#discussion_r1859075989) for build reliability. If this is ever done, a tracking issue should be created (before the PR is merged) so that we remember to resolve the underlying issue and update the image reference. +FLoating tags are beneficial for repos that are not susceptible to breaking changes that occur from new distro versions because the source that references the tag doesn't need to be updated in order to make use of the new version. Conversely, some repos may be susceptible to distro breaking changes in which case the version-specific tags should be used ([dotnet/runtime](https://github.com/dotnet/runtime) is an example of such a repo). + +There is a vetting process before a `latest` floating tag gets moved to a newer distro version: + +1. Version-specific tags for the new distro version are provided. +1. The [dotnet/runtime](https://github.com/dotnet/runtime) repo is updated to reference the new version-specific tags. +1. Once runtime has successfully taken a dependency on the new version, the `latest` floating tag is updated to reference that version. + +At times, it may be necessary to use a [fixed image reference](https://github.com/dotnet/runtime/pull/110199#discussion_r1859075989) for build reliability. This is done by referencing the digest of the specific image that is needed (e.g. `mcr.microsoft.com/dotnet-buildtools/prereqs@sha256:56feee03d202e008a98f3c92784f79f3f0b3a512074f7f8ee2b1ba4ca4c08c6e`). If this is ever done, a tracking issue should be created (before the PR is merged) so that we remember to resolve the underlying issue and update the image reference. The following locations are examples of infra that gets updated when new images are available. From 3562aea62bc650ae5c91dab3cfbaeeafa3156df4 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Wed, 11 Dec 2024 10:53:45 -0600 Subject: [PATCH 2/3] break up lines to satisfy linter --- lifecycle.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lifecycle.md b/lifecycle.md index 59be1764..971fa712 100644 --- a/lifecycle.md +++ b/lifecycle.md @@ -54,7 +54,8 @@ Several types of tag styles are provided: * latest: References the latest validated version of the distro. Example: `alpine-latest-helix-amd64` * oldest: References the oldest supported version of the distro. Example: `alpine-oldest-helix-amd64` -FLoating tags are beneficial for repos that are not susceptible to breaking changes that occur from new distro versions because the source that references the tag doesn't need to be updated in order to make use of the new version. Conversely, some repos may be susceptible to distro breaking changes in which case the version-specific tags should be used ([dotnet/runtime](https://github.com/dotnet/runtime) is an example of such a repo). +FLoating tags are beneficial for repos that are not susceptible to breaking changes that occur from new distro versions because the source that references the tag doesn't need to be updated in order to make use of the new version. +Conversely, some repos may be susceptible to distro breaking changes in which case the version-specific tags should be used ([dotnet/runtime](https://github.com/dotnet/runtime) is an example of such a repo). There is a vetting process before a `latest` floating tag gets moved to a newer distro version: @@ -62,7 +63,9 @@ There is a vetting process before a `latest` floating tag gets moved to a newer 1. The [dotnet/runtime](https://github.com/dotnet/runtime) repo is updated to reference the new version-specific tags. 1. Once runtime has successfully taken a dependency on the new version, the `latest` floating tag is updated to reference that version. -At times, it may be necessary to use a [fixed image reference](https://github.com/dotnet/runtime/pull/110199#discussion_r1859075989) for build reliability. This is done by referencing the digest of the specific image that is needed (e.g. `mcr.microsoft.com/dotnet-buildtools/prereqs@sha256:56feee03d202e008a98f3c92784f79f3f0b3a512074f7f8ee2b1ba4ca4c08c6e`). If this is ever done, a tracking issue should be created (before the PR is merged) so that we remember to resolve the underlying issue and update the image reference. +At times, it may be necessary to use a [fixed image reference](https://github.com/dotnet/runtime/pull/110199#discussion_r1859075989) for build reliability. +This is done by referencing the digest of the specific image that is needed (e.g. `mcr.microsoft.com/dotnet-buildtools/prereqs@sha256:56feee03d202e008a98f3c92784f79f3f0b3a512074f7f8ee2b1ba4ca4c08c6e`). +If this is ever done, a tracking issue should be created (before the PR is merged) so that we remember to resolve the underlying issue and update the image reference. The following locations are examples of infra that gets updated when new images are available. From e434503d2c111bbe3672524d14d785bb576275e8 Mon Sep 17 00:00:00 2001 From: Matt Thalman Date: Fri, 13 Dec 2024 13:25:56 -0600 Subject: [PATCH 3/3] Updates from feedback --- lifecycle.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lifecycle.md b/lifecycle.md index 971fa712..09203187 100644 --- a/lifecycle.md +++ b/lifecycle.md @@ -48,20 +48,18 @@ Note: this content should be moved to another location as it is not lifecycle re Build and test images are referenced in repo infra files, across a variety of `main` and `release/*` branches. Updating these references is a multi-step detail-oriented task. It is a pain, but necessary. -Several types of tag styles are provided: +Two types of tag styles are available: * version-specific: The tag name includes the distro's version. Example: `alpine-3.21-helix-amd64` -* floating: The tag name has no version. Instead it is routinely updated to reference a new version as the distro's lifecycle progresses. There are two sub-types of floating tags: +* floating (optional): The tag name has no version. Instead it is routinely updated to reference a new version as the distro's lifecycle progresses. There are two sub-types of floating tags: * latest: References the latest validated version of the distro. Example: `alpine-latest-helix-amd64` * oldest: References the oldest supported version of the distro. Example: `alpine-oldest-helix-amd64` -FLoating tags are beneficial for repos that are not susceptible to breaking changes that occur from new distro versions because the source that references the tag doesn't need to be updated in order to make use of the new version. +FLoating tags are provided on an as-needed basis. They are beneficial for repos that are not susceptible to breaking changes that occur from new distro versions because the source that references the tag doesn't need to be updated in order to make use of the new version. Conversely, some repos may be susceptible to distro breaking changes in which case the version-specific tags should be used ([dotnet/runtime](https://github.com/dotnet/runtime) is an example of such a repo). -There is a vetting process before a `latest` floating tag gets moved to a newer distro version: - -1. Version-specific tags for the new distro version are provided. -1. The [dotnet/runtime](https://github.com/dotnet/runtime) repo is updated to reference the new version-specific tags. -1. Once runtime has successfully taken a dependency on the new version, the `latest` floating tag is updated to reference that version. +There is an evaluation period before a `latest` floating tag gets moved to a newer distro version. +First, version-specific tags for the new distro version are provided. +After a one month evaluation period, the `latest` floating tag is updated to reference the new version, assuming there are no issues found. At times, it may be necessary to use a [fixed image reference](https://github.com/dotnet/runtime/pull/110199#discussion_r1859075989) for build reliability. This is done by referencing the digest of the specific image that is needed (e.g. `mcr.microsoft.com/dotnet-buildtools/prereqs@sha256:56feee03d202e008a98f3c92784f79f3f0b3a512074f7f8ee2b1ba4ca4c08c6e`).