Skip to content

Automating docker-node part of the official Node Docker images release process #1646

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

Merged
merged 80 commits into from
Mar 10, 2022

Conversation

Pehesi97
Copy link
Contributor

@Pehesi97 Pehesi97 commented Feb 18, 2022

Description

  • Create GH Action
  • Check official node builds for new versions
  • If there is a new version, check for new musl builds
  • If there is a new musl build, and not a security release
  • Run update.sh according to the situation (-s if security release)
  • If there's no new version, exit gracefully
  • Create a new PR with the changes made by update.sh
  • Create a new action that runs when CI is green for the recently created PR and automatically merge it

Motivation and Context

#1312

Testing Details

Example Output(if appropriate)

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Others (non of above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

@SimenB
Copy link
Member

SimenB commented Feb 22, 2022

@Pehesi97 just notice this, exciting! Feel free to ping if/when you're ready for feedback.

/cc @nodejs/docker

Pedro Silva and others added 2 commits March 9, 2022 17:54
@SimenB
Copy link
Member

SimenB commented Mar 10, 2022

I'll merge this later today (CET) unless anybody says otherwise - would like to see it handle the new v17 release

@SimenB
Copy link
Member

SimenB commented Mar 10, 2022

I've enabled auto merge, maybe we can use that instead of polling and juliangruber/merge-pull-request-action? I.e. enable that for the PRs or something.

image

EDIT: right

I tried lots of approaches to make that auto-merge feature work (I won't share all the details unless you want me to) but ended up using a script that waits up to 5 minutes for the PR's CI to turn green.

I'd love to hear those reasons 🙂 I've now enabled the auto merge feature, and we already have branch protection rules, so I think all 3 conditions in the docs are ok: https://github.com/peter-evans/enable-pull-request-automerge#conditions

We also require a review, so we probably need the auto approve action as well

@Pehesi97
Copy link
Contributor Author

Yeah, I think that will work.

My main issue when trying to make auto-merge work was that the check suite isn't static (we create it dynamically using GitHub Actions) and it wasn't enough to trigger the "Require status checks to pass before merging" rule. I didn't try requiring approvals for the auto-merge to work, and all the others were already satisfied by the time I opened a test PR.

About the auto-approve-action, I think https://github.com/hmarr/auto-approve-action will do the trick.

Do you want me to do the changes?

@SimenB
Copy link
Member

SimenB commented Mar 10, 2022

If it works, I'd prefer to use auto merge over a manual poll, yes 🙂

@Pehesi97
Copy link
Contributor Author

@SimenB actually, I don't think that will work.

For auto-approving the PR, we would need the checks to pass. That's kinda the point of polling the GitHub API.

@SimenB
Copy link
Member

SimenB commented Mar 10, 2022

Fair enough. Merging will fail unless an approval is added though, so we need that part anyways

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

all of these actions can run with the default token.

However, approval must happen with a different token as it's not allowed to approve your own PR

@SimenB
Copy link
Member

SimenB commented Mar 10, 2022

@Pehesi97 see Pehesi97#27

(also, very sorry for all the back and forth 😬)

@Pehesi97
Copy link
Contributor Author

Pehesi97 commented Mar 10, 2022

It's OK. I understand.

@SimenB
Copy link
Member

SimenB commented Mar 10, 2022

I'm not 100% the automerge will work, but as mentioned in Pehesi97#27 (comment), just getting the PR is a great first step.

Thank you so much for working on this @Pehesi97, and thanks for your patience!

@SimenB SimenB merged commit 62262f4 into nodejs:main Mar 10, 2022
@shaneog
Copy link
Contributor

shaneog commented Mar 16, 2022

Should this have kicked off a new build/release process for this Node.js release from yesterday? Or should I open a PR for that?

@nschonni
Copy link
Member

Looks like the Alpine builds still aren't available

@shaneog
Copy link
Contributor

shaneog commented Mar 17, 2022

Just released: PR here

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

Successfully merging this pull request may close these issues.

4 participants