Skip to content

release: release (undraft) GitHub release from release script #18886

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ivanvc
Copy link
Member

@ivanvc ivanvc commented Nov 12, 2024

Release (updraft) GitHub release from the release script after creating it, avoiding the last manual step of this process. However, if the user answers no to the prompt, the script won't exit with a failure code, as it is still possible to manually release it.

I tested this in my fork, and it works as expected.

Part of #18604

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.83%. Comparing base (ffb6ff9) to head (5279471).
Report is 50 commits behind head on main.

Current head 5279471 differs from pull request most recent head cc0e439

Please upload reports for the commit cc0e439 to get more accurate results.

Additional details and impacted files
Files with missing lines Coverage Δ
api/version/version.go 86.66% <ø> (ø)

... and 26 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #18886      +/-   ##
==========================================
- Coverage   68.84%   68.83%   -0.01%     
==========================================
  Files         421      421              
  Lines       35900    35900              
==========================================
- Hits        24716    24713       -3     
+ Misses       9762     9757       -5     
- Partials     1422     1430       +8     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ffb6ff9...cc0e439. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@jmhbnz jmhbnz left a comment

Choose a reason for hiding this comment

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

LGTM - Thanks @ivanvc

log_warning ""

# Give a 10 minute timeout to the user to confirm the release.
read -p "Release GitHub release for ${RELEASE_VERSION} [y/N]? " -t 600 -r confirm
Copy link
Member

Choose a reason for hiding this comment

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

I think with a bit more testing / confidence we can simply drop the publishing of the release in draft mode and 10 minute review prompt and simply publish the full release.

It was a really great milestone to see the script automatically creating the GitHub release for us today so let's just get a bit more confidence in the next round of releases and then revisit it :)

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree. I was hesitant to add this change, but no matter what arguments I'd pass to gh create release, the draft release in the edit UI always has the "set as latest release" checkbox ticked. So, the workaround was to publish the release by editing it, while passing all the possible arguments.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm going to draft this PR then. We can revisit it when we feel confident about automating the release process.

Copy link
Member Author

Choose a reason for hiding this comment

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

I left this in place, as it follows the approach of the other steps.

@ivanvc ivanvc marked this pull request as draft November 13, 2024 07:11
@ivanvc ivanvc changed the title release: add a prompt to release GitHub release release: release (undraft) GitHub release from release script Nov 14, 2024
@ivanvc ivanvc force-pushed the add-prompt-to-release-github-release branch 2 times, most recently from 04e5814 to 2192e77 Compare March 8, 2025 06:46
@ivanvc ivanvc force-pushed the add-prompt-to-release-github-release branch from 2192e77 to e0f2996 Compare March 11, 2025 23:28
@ivanvc ivanvc force-pushed the add-prompt-to-release-github-release branch from e0f2996 to cc0e439 Compare March 12, 2025 21:20
@ivanvc ivanvc force-pushed the add-prompt-to-release-github-release branch from 5e85cbf to cc0e439 Compare March 12, 2025 21:36
@ivanvc ivanvc force-pushed the add-prompt-to-release-github-release branch from 5279471 to cc0e439 Compare March 12, 2025 22:11
@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ivanvc, jmhbnz

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

@ivanvc ivanvc marked this pull request as ready for review March 12, 2025 22:14
@ivanvc ivanvc requested a review from serathius March 12, 2025 22:14
@ivanvc
Copy link
Member Author

ivanvc commented Mar 20, 2025

/test pull-etcd-unit-test-386

@ivanvc ivanvc requested a review from jmhbnz March 20, 2025 18:00
@ivanvc ivanvc marked this pull request as draft March 20, 2025 21:41
@ivanvc
Copy link
Member Author

ivanvc commented Mar 20, 2025

I'm parking this pull request again. I'm thinking that we can keep the draft release as we have now and release it using a GitHub action (after the released artifacts tests pass). Based on etcd-io/auger I know that we have the permissions to publish the release from an action.

@ivanvc
Copy link
Member Author

ivanvc commented Mar 20, 2025

Note: I'll need to automate checking if it's a pre-release or if we should mark it as a release. I think it is doable with the following logic:

Pre-release

If there's a pre-release identifier (i.e., -alpha.0 from v3.6.0-alpha.0), mark it as a pre-release.

Latest version

  1. If the patch ends with 0 (i.e., 3.6.0), mark it as the latest release.
  2. If not,
    1. Get the latest release gh release list --json isLatest,tagName --jq '.[] | select(.isLatest) | .tagName'
    2. If the combination of the major and minor is the same as the release in question (i.e., v3.6), mark it as the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants