mirror of
https://github.com/hanzo-ml/trainer.git
synced 2026-09-24 00:31:34 +00:00
fix(ci): Fix git-cliff for patch release Changelog (#3591)
* fix(ci): Fix git-cliff for patch release Changelog Signed-off-by: Andrey Velichkevich <[email protected]> * Potential fix for pull request finding Signed-off-by: Andrey Velichkevich <[email protected]> --------- Signed-off-by: Andrey Velichkevich <[email protected]> Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
Hanzo Dev
parent
4d9f287c3f
commit
f020e988db
@@ -1,5 +1,3 @@
|
||||
# Changelog
|
||||
|
||||
# [v2.0.1](https://github.com/kubeflow/trainer/tree/v2.0.1) (2025-09-29)
|
||||
|
||||
## New Features
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# Changelog
|
||||
|
||||
# [v2.1.0](https://github.com/kubeflow/trainer/tree/v2.1.0) (2025-11-07)
|
||||
|
||||
This is Kubeflow Trainer v2.1.0 release.
|
||||
@@ -97,7 +95,7 @@ For more information, please see [the Kubeflow Trainer docs](https://www.kubeflo
|
||||
|
||||
## Misc
|
||||
|
||||
- [release-2.1] feat: Adding local execution example notebook ([#2924](https://github.com/kubeflow/trainer/pull/2924) by [@Fiona-Waters](https://github.com/Fiona-Waters))
|
||||
- [release-2.1] feat: Adding local execution example notebook ([#2924](https://github.com/kubeflow/trainer/pull/2924) by [@Fiona-Waters](https://github.com/Fiona-Waters))
|
||||
- feat(manifests): Publish Kubeflow Trainer Helm charts ([#2917](https://github.com/kubeflow/trainer/pull/2917) by [@adity1raut](https://github.com/adity1raut))
|
||||
- [release-2.1] chore(operator): Use SSA throughout runtime framework ([#2912](https://github.com/kubeflow/trainer/pull/2912) by [@astefanutti](https://github.com/astefanutti))
|
||||
- [release-2.1] feat(initializer): add s3 model and dataset initializers ([#2911](https://github.com/kubeflow/trainer/pull/2911) by [@rudeigerc](https://github.com/rudeigerc))
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Changelog
|
||||
# [v2.2.0](https://github.com/kubeflow/trainer/tree/v2.2.0) (2026-03-19)
|
||||
|
||||
This is Kubeflow Trainer v2.2.0 release.
|
||||
@@ -15,7 +14,7 @@ helm install kubeflow-trainer oci://ghcr.io/kubeflow/charts/kubeflow-trainer \
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
- feat(api): BREAKING CHANGE: Replace PodTemplateOverrides with RuntimePatches API ([#3309](https://github.com/kubeflow/trainer/pull/3309) by @astefanutti)
|
||||
- feat(api): BREAKING CHANGE: Replace PodTemplateOverrides with RuntimePatches API ([#3309](https://github.com/kubeflow/trainer/pull/3309) by @astefanutti)
|
||||
- feat(api): BREAKING CHANGE: Remove numProcPerNode from Torch API ([#3239](https://github.com/kubeflow/trainer/pull/3239) by @andreyvelich)
|
||||
- feat(api): BREAKING CHANGE: Remove ElasticPolicy API ([#3235](https://github.com/kubeflow/trainer/pull/3235) by @andreyvelich)
|
||||
- feat(api): Fix immutability of the TrainJob APIs ([#3157](https://github.com/kubeflow/trainer/pull/3157) by @andreyvelich)
|
||||
@@ -29,7 +28,6 @@ helm install kubeflow-trainer oci://ghcr.io/kubeflow/charts/kubeflow-trainer \
|
||||
- feat(runtimes): Add JAX training runtime ([#3151](https://github.com/kubeflow/trainer/pull/3151) by @kaisoz)
|
||||
- feat(cache): KEP-2655: Adding default runtime with cache and example ([#2923](https://github.com/kubeflow/trainer/pull/2923) by @akshaychitneni)
|
||||
|
||||
|
||||
### Flux Runtime for MPI and HPC Workloads
|
||||
|
||||
- feat: support for flux framework as hpc manager ([#3188](https://github.com/kubeflow/trainer/pull/3188) by @vsoch)
|
||||
|
||||
@@ -244,29 +244,37 @@ helm-docs: helm-docs-plugin ## Generates markdown documentation for helm charts
|
||||
|
||||
##@ Release
|
||||
|
||||
# Release version (X.Y.Z or X.Y.Z-rc.N)
|
||||
# Release version, including the leading "v" (vX.Y.Z or vX.Y.Z-rc.N).
|
||||
VERSION ?=
|
||||
GITHUB_TOKEN ?=
|
||||
|
||||
.PHONY: release
|
||||
release: ## Create a release commit. Usage: make release VERSION=X.Y.Z [GITHUB_TOKEN=<token>]
|
||||
@if [ -z "$(VERSION)" ] || ! echo "$(VERSION)" | grep -E -q '^[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$$'; then \
|
||||
echo "Error: VERSION must be set in X.Y.Z or X.Y.Z-rc.N format. Usage: make release VERSION=X.Y.Z[-rc.N]"; \
|
||||
release: ## Create a release commit. Usage: make release VERSION=vX.Y.Z [GITHUB_TOKEN=<token>]
|
||||
@if [ -z "$(VERSION)" ] || ! echo "$(VERSION)" | grep -E -q '^v[0-9]+\.[0-9]+\.[0-9]+(-rc\.[0-9]+)?$$'; then \
|
||||
echo "Error: VERSION must be set in vX.Y.Z or vX.Y.Z-rc.N format. Usage: make release VERSION=vX.Y.Z[-rc.N]"; \
|
||||
exit 1; \
|
||||
fi
|
||||
@echo -n "v$(VERSION)" > VERSION
|
||||
@echo -n "$(VERSION)" > VERSION
|
||||
@echo "Updated VERSION to $(VERSION)"
|
||||
@if echo "$(VERSION)" | grep -E -q '\-rc\.[0-9]+$$'; then \
|
||||
echo "Skipping changelog generation for RC release $(VERSION)"; \
|
||||
else \
|
||||
MAJOR_MINOR=$$(echo "$(VERSION)" | cut -d. -f1,2); \
|
||||
MAJOR_MINOR=$$(echo "$(VERSION)" | sed 's/^v//' | cut -d. -f1,2); \
|
||||
CHANGELOG_PATH="CHANGELOG/CHANGELOG-$$MAJOR_MINOR.md"; \
|
||||
echo "Generating changelog for v$(VERSION)"; \
|
||||
RELEASE_BRANCH="release-$$MAJOR_MINOR"; \
|
||||
PREV_TAG=$$(git describe --tags --abbrev=0 --match 'v[0-9]*' --exclude '*-rc*' "$$RELEASE_BRANCH" 2>/dev/null || true); \
|
||||
if [ -n "$$PREV_TAG" ]; then \
|
||||
CLIFF_SCOPE="$$PREV_TAG..$$RELEASE_BRANCH"; \
|
||||
echo "Generating changelog for $(VERSION) (range: $$CLIFF_SCOPE)"; \
|
||||
else \
|
||||
CLIFF_SCOPE="--unreleased"; \
|
||||
echo "Generating changelog for $(VERSION) (no prior tag on $$RELEASE_BRANCH; using --unreleased)"; \
|
||||
fi; \
|
||||
CLIFF_CMD="docker run --rm -u $$(id -u):$$(id -g) -v $(PROJECT_DIR):/app"; \
|
||||
if [ -n "$(GITHUB_TOKEN)" ]; then \
|
||||
CLIFF_CMD="$$CLIFF_CMD -e GITHUB_TOKEN=$(GITHUB_TOKEN)"; \
|
||||
fi; \
|
||||
CLIFF_CMD="$$CLIFF_CMD -w /app ghcr.io/orhun/git-cliff/git-cliff:latest --unreleased --tag v$(VERSION)"; \
|
||||
CLIFF_CMD="$$CLIFF_CMD -w /app ghcr.io/orhun/git-cliff/git-cliff:latest $$CLIFF_SCOPE --tag $(VERSION)"; \
|
||||
if [ -f "$$CHANGELOG_PATH" ]; then \
|
||||
$$CLIFF_CMD --prepend "$$CHANGELOG_PATH"; \
|
||||
else \
|
||||
@@ -276,6 +284,6 @@ release: ## Create a release commit. Usage: make release VERSION=X.Y.Z [GITHUB_T
|
||||
echo "Changelog generated at $$CHANGELOG_PATH"; \
|
||||
fi
|
||||
@echo ""
|
||||
@echo "Release commit for v$(VERSION) is ready."
|
||||
@echo "Review the changes, then commit with:"
|
||||
@echo " git add -A && git commit -s -m 'Release v$(VERSION)'"
|
||||
@echo "Release commit for $(VERSION) is ready."
|
||||
@echo "Review the changelog changes, then commit with:"
|
||||
@echo " git add -A && git commit -s -m 'Prepare Release $(VERSION)'"
|
||||
|
||||
+18
-20
@@ -2,14 +2,10 @@
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [Write](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)
|
||||
permission for the Kubeflow Trainer repository.
|
||||
|
||||
- Docker available locally (required for changelog generation with
|
||||
[`git-cliff`](https://git-cliff.org/)).
|
||||
|
||||
- Create a [GitHub Token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)
|
||||
and set it as `GITHUB_TOKEN` environment variable.
|
||||
- Create a [GitHub Token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token).
|
||||
|
||||
## Versioning Policy
|
||||
|
||||
@@ -53,12 +49,15 @@ prepends new entries automatically using `git-cliff`.
|
||||
|
||||
### 1. Update Version and Changelog
|
||||
|
||||
Run the release target from your working branch:
|
||||
For **the latest minor release**, run the following command from the `master` branch.
|
||||
|
||||
For **an older minor series patch** (for example, `v2.2.1` when `master` is on `v2.3.x`), checkout
|
||||
to the corresponding `release-X.Y` branch and run the following command.
|
||||
|
||||
```bash
|
||||
make release VERSION=X.Y.Z GITHUB_TOKEN=<token>
|
||||
make release VERSION=vX.Y.Z GITHUB_TOKEN=<token>
|
||||
# or for a release candidate:
|
||||
make release VERSION=X.Y.Z-rc.N GITHUB_TOKEN=<token>
|
||||
make release VERSION=vX.Y.Z-rc.N GITHUB_TOKEN=<token>
|
||||
```
|
||||
|
||||
This will:
|
||||
@@ -66,22 +65,14 @@ This will:
|
||||
1. Update `VERSION` to `vX.Y.Z`.
|
||||
2. Generate `CHANGELOG/CHANGELOG-X.Y.md` using `git-cliff` (skipped for RC releases).
|
||||
|
||||
After reviewing the changes, create a signed commit:
|
||||
After reviewing the changes, create a signed commit and open a PR to the appropriate branch
|
||||
(e.g. `master` or `release-X.Y`):
|
||||
|
||||
```bash
|
||||
git add -A && git commit -s -m 'Release vX.Y.Z'
|
||||
git add -A && git commit -s -m 'Prepare release vX.Y.Z'
|
||||
```
|
||||
|
||||
### 2. Submit a Release PR
|
||||
|
||||
- **Latest minor release** (including patches on the latest minor series):
|
||||
open a PR to `master`.
|
||||
|
||||
- **Old minor series patch** (e.g. `v2.1.2` when `master` is at `v2.2.x`):
|
||||
cherry-pick the necessary fixes from `master` via PRs to the `release-X.Y` branch,
|
||||
then open the release PR to `release-X.Y`.
|
||||
|
||||
### 3. Automated Release After Merge
|
||||
### 2. Automated Release After Merge
|
||||
|
||||
When the `VERSION` change is merged, the
|
||||
[release workflow](.github/workflows/release.yaml) runs automatically:
|
||||
@@ -103,3 +94,10 @@ When the `VERSION` change is merged, the
|
||||
> **Note**: Helm chart version, Python API version, and manifest image tags are only updated
|
||||
> on the release branch, not on `master`. This ensures users deploying from `master` always
|
||||
> get the latest images.
|
||||
|
||||
## Announcement
|
||||
|
||||
Post the release announcement for the new Kubeflow Trainer release in:
|
||||
|
||||
- [#kubeflow-trainer](https://cloud-native.slack.com/archives/C0742LDFZ4K) Slack channel
|
||||
- [`kubeflow-discuss`](https://groups.google.com/g/kubeflow-discuss) mailing list
|
||||
|
||||
+12
-11
@@ -4,10 +4,10 @@ repo = "trainer"
|
||||
|
||||
[changelog]
|
||||
body = """
|
||||
{%- if version %}
|
||||
## [{{ version }}](https://github.com/kubeflow/trainer/releases/tag/{{ version }}) ({{ timestamp | date(format="%Y-%m-%d") }})
|
||||
{%- if version -%}
|
||||
# [{{ version }}](https://github.com/kubeflow/trainer/releases/tag/{{ version }}) ({{ timestamp | date(format="%Y-%m-%d") }})
|
||||
{% else %}
|
||||
## [Unreleased]
|
||||
# [Unreleased]
|
||||
{%- endif %}
|
||||
|
||||
{%- set group_order = ["🚀 Features", "🐛 Bug Fixes", "⚙️ Miscellaneous Tasks", "⏪ Reverts"] -%}
|
||||
@@ -15,7 +15,7 @@ body = """
|
||||
{%- for group_name in group_order %}
|
||||
{%- set group_commits = commits | filter(attribute="group", value=group_name) -%}
|
||||
{%- if group_commits | length > 0 %}
|
||||
### {{ group_name }}
|
||||
## {{ group_name }}
|
||||
|
||||
{% for commit in group_commits | reverse -%}
|
||||
{%- set message = commit.message | split(pat="\n") | first | trim -%}
|
||||
@@ -35,13 +35,14 @@ body = """
|
||||
{%- if github -%}
|
||||
{%- set new_contributors = github.contributors | filter(attribute="is_first_time", value=true) -%}
|
||||
{%- if new_contributors | length != 0 %}
|
||||
### New Contributors
|
||||
## New Contributors
|
||||
{% for contributor in new_contributors %}
|
||||
- @{{ contributor.username }} made their first contribution in \
|
||||
[#{{ contributor.pr_number }}](https://github.com/kubeflow/trainer/pull/{{ contributor.pr_number }})
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- endif -%}
|
||||
{%- endif %}
|
||||
|
||||
"""
|
||||
|
||||
trim = true
|
||||
@@ -59,9 +60,9 @@ ignore_tags = ".*-(alpha|beta|rc).*"
|
||||
|
||||
# Manually define groups based on conventional patterns
|
||||
commit_parsers = [
|
||||
{ message = "^feat(\\(.*\\))?:", group = "🚀 Features" },
|
||||
{ message = "^fix(\\(.*\\))?:", group = "🐛 Bug Fixes" },
|
||||
{ message = "^chore(\\(.*\\))?:", group = "⚙️ Miscellaneous Tasks" },
|
||||
{ message = "^revert(\\(.*\\))?:", group = "⏪ Reverts" },
|
||||
{ message = ".*", skip = true },
|
||||
{ message = "^feat(\\(.*\\))?:", group = "🚀 Features" },
|
||||
{ message = "^fix(\\(.*\\))?:", group = "🐛 Bug Fixes" },
|
||||
{ message = "^chore(\\(.*\\))?:", group = "⚙️ Miscellaneous Tasks" },
|
||||
{ message = "^revert(\\(.*\\))?:", group = "⏪ Reverts" },
|
||||
{ message = ".*", skip = true },
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user