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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USHIFT-1349: automatically track pre-release versions in release note script #3163

Conversation

dhellmann
Copy link
Contributor

We build a default list of versions to scan using the current version
and the previous version. This assumes the script is run out of the
main branch where we can find the most current version under
development. During the period where 4.n is being developed, 4.n-1 may
still be producing only release candidates, so that scanning those 2
versions give us the 2 most recent candidates for having no
releases. During the period where the main branch has not landed a
rebase to update the version and both main and the pre-release branch
have the same version, we will end up scanning for EC or RC releases
of 4.n-2, but that's

/assign @pmtk @pacevedom

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 15, 2024

@dhellmann: This pull request references USHIFT-1349 which is a valid jira issue.

In response to this:

We build a default list of versions to scan using the current version
and the previous version. This assumes the script is run out of the
main branch where we can find the most current version under
development. During the period where 4.n is being developed, 4.n-1 may
still be producing only release candidates, so that scanning those 2
versions give us the 2 most recent candidates for having no
releases. During the period where the main branch has not landed a
rebase to update the version and both main and the pre-release branch
have the same version, we will end up scanning for EC or RC releases
of 4.n-2, but that's

/assign @pmtk @pacevedom

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 15, 2024
@openshift-ci openshift-ci bot requested review from jerpeter1 and pmtk March 15, 2024 15:08
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 15, 2024
Comment on lines 122 to 120
# 4.16
version = version_makefile.read_text('utf8').split('=')[-1].strip().split('.')[:2]
Copy link
Member

Choose a reason for hiding this comment

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

Is the version a list? Looks like it due to [:2] and usage in line 136, but comment 4.16 suggests it's a str.
Do you think we could make some changes to have less list operations? Could we add a struct {major, minor} or at least major minor integers? All that [idx] (together with line 136) is a bit difficult to read

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this could be written clearer. Maybe even as a regex. :-)

The comment is wrong here. version ends up a list, and then versions_to_scan below gets 2 strings.

I'll fix this up.

Comment on lines 195 to 196
if not args.versions_to_scan:
args.versions_to_scan = versions_to_scan
Copy link
Member

Choose a reason for hiding this comment

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

What's this for? I don't see args passed to another fuction and I don't see usage of args.versions_to_scan

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is a vestige of an earlier implementation plan that I didn't follow..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, it was mistakenly trying to replace the defaults with the values the user gave us, but I either overwrote the wrong variable or passed the wrong variable to all of the functions that need it below.

scripts/release-notes/gen_ec_release_notes.py Show resolved Hide resolved
Comment on lines +117 to +113
root_dir = pathlib.Path(__file__).parent.parent.parent
version_makefile = root_dir / 'Makefile.version.aarch64.var'
Copy link
Member

@pmtk pmtk Apr 2, 2024

Choose a reason for hiding this comment

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

Can't we assume we're executing the script from the microshift/ and just use current working dir? That's how it runs in the https://github.com/openshift/release/pull/49830/files#diff-24ec5dd51fc1cbf37ac7d08f85d9f4d8abc188083abce1ccc7ace59d1eaf6377R16-R17

Scratch that, it's gen_ec_release_notes.sh calling this script with full absolute path

@dhellmann dhellmann force-pushed the USHIFT-1349-automate-version-limits-release-notes branch from b6ae754 to e5967c3 Compare April 2, 2024 12:27
… script

We build a default list of versions to scan using the current version
and the previous version. This assumes the script is run out of the
main branch where we can find the most current version under
development. During the period where 4.n is being developed, 4.n-1 may
still be producing only release candidates, so that scanning those 2
versions give us the 2 most recent candidates for having no
releases. During the period where the main branch has not landed a
rebase to update the version and both main and the pre-release branch
have the same version, we will end up scanning for EC or RC releases
of 4.n-2, but that's
@dhellmann dhellmann force-pushed the USHIFT-1349-automate-version-limits-release-notes branch from e5967c3 to 935cfc8 Compare April 2, 2024 12:30
@pmtk
Copy link
Member

pmtk commented Apr 2, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 2, 2024
Copy link
Contributor

openshift-ci bot commented Apr 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, pmtk

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

The pull request process is described 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

Copy link
Contributor

openshift-ci bot commented Apr 2, 2024

@dhellmann: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit ba49423 into openshift:main Apr 2, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants