Add CHANGELOG and Github Tag to release page#54740
Add CHANGELOG and Github Tag to release page#54740k8s-ci-robot merged 1 commit intokubernetes:mainfrom
Conversation
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
/lgtm |
|
@CodesbyUnnati: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/sig release |
lmktfy
left a comment
There was a problem hiding this comment.
Thanks. We can just about merge it as-is, but it will be considerably better with tweaks.
layouts/docs/release-series.html
Outdated
| </li> | ||
| {{ end }} | ||
| <li> | ||
| <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-{{ .Params.minorVersion }}.md"> |
There was a problem hiding this comment.
For v1.35 the right place to link to is likely to be https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.35.md#changelog-since-v1340
I think we could try to work out the fragment to target (automatically, I mean); if we get that part wrong, it degrades to a less good but still useful experience for the user.
There was a problem hiding this comment.
Agreed, linking directly to the relevant section would be a better experience. I'll work on generating the fragment automatically.
There was a problem hiding this comment.
The anchor format for changelogs varies across older versions (e.g., "changes-since" vs "changelog-since", inconsistent hash patterns). So it required version-specific branching to generate the correct link.
There was a problem hiding this comment.
Eesh. We might be able to get that fixed retrospectively or something.
OK. Well, then, it doesn't block a merge.
There was a problem hiding this comment.
I also think this logic is ugly. Recent releases already use a consistent anchor format, so if we could fix the old CHANGELOGs, we could remove all this branching logic entirely.
I'm not sure if changing historical CHANGELOGs is acceptable or not, but is it worth filing an issue to discuss at kubernetes/kubernetes?
| {{ end }} | ||
| </li> | ||
| {{ end }} | ||
| <li> |
There was a problem hiding this comment.
I'd use
{{- $currentVersion := site.Params.version -}}
{{- $currentVersion := (replace $currentVersion "v" "") -}}
matching https://github.com/kubernetes/website/blob/fb51996b2ede0aec5ab329cb5816ce8bd1a28f4c/layouts/shortcodes/skew.html (the skew shortcode)
There was a problem hiding this comment.
The same question with https://github.com/kubernetes/website/pull/54740/changes#r2898768439
Thanks for the suggestion. Currently, isLatestVersion is computed in the content adapter (_content.gotmpl) by comparing against the first entry in site.Data.releases.schedule.schedules.
Do you mean that passing this data via .Params from the content adapter is not preferred?
There was a problem hiding this comment.
Ah, I mistook these for global params. Oops.
| </li> | ||
| <li> | ||
| <a href="https://github.com/kubernetes/kubernetes/releases/tag/v{{ .Params.latestPatchVersion }}"> | ||
| {{ T "release_github_tag" }} ({{ .Params.latestPatchVersion }}) |
There was a problem hiding this comment.
The best way to get the patch version is actually similar to this code:
<!-- output patch version for current release -->
{{- if eq $version "currentPatchVersion" -}}
{{- $seenPatchVersionInfoCount := 0 }}
{{- range $releaseInfo := .Site.Data.releases.schedule.schedules -}}
{{- if eq $currentVersion ( printf "%.2f" $releaseInfo.release ) -}}
{{- range $patchReleaseInfo := $releaseInfo.previousPatches -}}
{{- if eq $seenPatchVersionInfoCount 0 -}}
{{- $patchReleaseInfo.release -}}
{{- end -}}
{{- $seenPatchVersionInfoCount = add $seenPatchVersionInfoCount 1 -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if eq $seenPatchVersionInfoCount 0 -}}
<!-- fallback patch version to .0 -->
{{- printf "%s.0" $currentVersion -}}
{{- end -}}
{{- end -}}
This lookup that I've quoted relies on changes that are automatically processed (using a process owned by SIG Release); .Params.latestPatchVersion is legacy.
There was a problem hiding this comment.
Just to clarify, .Params.latestPatchVersion is computed in the content adapter (_content.gotmpl).
For supported versions, it comes from site.Data.releases.schedule.schedules[].previousPatches.
For eol versions, it comes from site.Data.releases.eol.branches[].finalPatchRelease.
Do you mean that passing this data via .Params from the content adapter is not a preferred approach?
There was a problem hiding this comment.
Ah, I mistook these for global params. Sorry about that.
There was a problem hiding this comment.
It's good to have a defensive calculation where if previousPatches doesn't have any data, we fall back to patch version 0 though.
|
Aside: we used to have https://relnotes.k8s.io/ but it is very stale. |
| {{ $parts := split $version "." }} | ||
| {{ $major := int (index $parts 0) }} | ||
| {{ $minor := int (index $parts 1) }} | ||
| {{ $previousMinorVersion := printf "%d.%d" $major (sub $minor 1) }} |
There was a problem hiding this comment.
Maybe add a comment that this is fragile if we ever do a major version release (Kubernetes 2.0)
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 7b41591e14de1d69b627692b53564c7848488f59 |
|
I've updated the commits to incorporate the latest changes. Please take a look when you have time. |
|
thank you @kfess 🚀 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: natalisucks The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 51ba6d12bea605d466ccd6a5804ee5bb12a3fab5 |
Description
Add CHANGELOG and GitHub tag links to release series pages for all versions.
Issue
Closes: #54739