Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Set previous release tag version for RELEASE CANDIDATE/BETA RELEASE #10435

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

chandankumar4
Copy link
Contributor

What this PR does / why we need it:

  • Add Previous release tag version for RELEASE CANDIDATE/BETA RELEASE

For RELEASE CANDIDATE/BETA RELEASE

$ RELEASE_TAG=v1.7.0-rc.1 PREVIOUS_VERSION_TAG=tags/v1.7.0-rc.0 make release-notes

go build -C hack/tools -o /Users/ckumar14/go/src/github.com/sigs.k8s.io/cluster-api/bin/notes -tags tools sigs.k8s.io/cluster-api/hack/tools/release/notes
./bin/notes --release v1.7.0-rc.1 --previous-release-version tags/v1.7.0-rc.0 > CHANGELOG/v1.7.0-rc.1.md
2024/04/14 10:46:08 Computing diff between v1.7.0-rc.0 and heads/release-1.7
2024/04/14 10:46:08 Calling endpoint repos/kubernetes-sigs/cluster-api/compare/v1.7.0-rc.0...release-1.7?per_page=250&page=1&
2024/04/14 10:46:09 Total of 1 pages and 31 elements read
2024/04/14 10:46:09 Reading ref heads/release-1.7 for upper limit
.....

For Release TAG

$ RELEASE_TAG=v1.7.0 make release-notes

go build -C hack/tools -o /Users/ckumar14/go/src/github.com/sigs.k8s.io/cluster-api/bin/notes -tags tools sigs.k8s.io/cluster-api/hack/tools/release/notes
./bin/notes --release v1.7.0 --previous-release-version "" > CHANGELOG/v1.7.0.md
2024/04/14 10:56:07 Computing diff between tags/v1.6.0 and heads/release-1.7
2024/04/14 10:56:07 Calling endpoint repos/kubernetes-sigs/cluster-api/compare/v1.6.0...release-1.7?per_page=250&page=1&
2024/04/14 10:56:09 Calling endpoint repos/kubernetes-sigs/cluster-api/compare/v1.6.0...release-1.7?per_page=250&page=2&
.....

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #10396

Signed-off-by: chandankumar4 <chandan.kr404@gmail.com>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label labels Apr 14, 2024
@k8s-ci-robot
Copy link
Contributor

This PR is currently missing an area label, which is used to identify the modified component when generating release notes.

Area labels can be added by org members by writing /area ${COMPONENT} in a comment

Please see the labels list for possible areas.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 14, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @chandankumar4. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 14, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign justinsb for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@chandankumar4 chandankumar4 changed the title Set previous release tag version for RELEASE CANDIDATE/BETA RELEASE 馃悰 Set previous release tag version for RELEASE CANDIDATE/BETA RELEASE Apr 14, 2024
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Signed-off-by: chandankumar4 <chandan.kr404@gmail.com>
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
@@ -1166,7 +1164,7 @@ release-notes-tool:

.PHONY: release-notes
release-notes: release-notes-tool
./bin/notes --release $(RELEASE_TAG) > CHANGELOG/$(RELEASE_TAG).md
./bin/notes --release $(RELEASE_TAG) --previous-release-version "$(PREVIOUS_VERSION_TAG)" > CHANGELOG/$(RELEASE_TAG).md

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related: is it documented anywhere that PREVIOUS_VERSION_TAG has to be set?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's not documented anywhere yet, is there any place where I can document it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cahillsf I assume you have an idea :)

Copy link
Contributor

@typeid typeid Apr 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#### Create PR for release notes
would be a good place.

Ideally we properly document it with an example for a rc and a stable version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep looks like the right place to me too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the release docs

Signed-off-by: chandankumar4 <chandan.kr404@gmail.com>
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 19, 2024
docs/release/release-tasks.md Outdated Show resolved Hide resolved
docs/release/release-tasks.md Outdated Show resolved Hide resolved
```bash
# RELEASE_TAG should be the new desired tag (note: at this point the tag does not yet exist).
# PREVIOUS_VERSION_TAG is the previous released tag for determining the changes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would this work for the first pre-release version without a pre-release precedent? Is that worth documenting as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the docs for the same, a minor code change was also required for it.

Signed-off-by: chandankumar4 <chandan.kr404@gmail.com>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 5, 2024
@chandankumar4 chandankumar4 requested a review from typeid May 5, 2024 06:39
@@ -187,12 +187,6 @@ func validateConfig(config *notesCmdConfig, releaseType string) error {
}
}

if releaseType != "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this going away?

PRE_RELEASE=true
endif
# the previous release tag, e.g., v0.3.9, excluding pre-release tags
PREVIOUS_TAG ?= $(shell git tag -l | grep -E "^v[0-9]+\.[0-9]+\.[0-9]+$$" | sort -V | grep -B1 $(RELEASE_TAG) | head -n 1 2>/dev/null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where was this used? I can't find any ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release notes generation documentation and make target don't work for release candidates
6 participants