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

build: add build artifact to CI #32458

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

Conversation

gengjiawen
Copy link
Member

Lots of user want to help us test or use our new features like quic or other
new exciting feature, but build Node.js from start is not quite easy.

This will help a lot when community want to testing edging WIP features.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the meta Issues and PRs related to the general management of the project. label Mar 24, 2020
Copy link
Member

@himself65 himself65 left a comment

Choose a reason for hiding this comment

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

suggestion: we could describe this feature in doc, example pull-requests.md

@richardlau
Copy link
Member

If you do document this it should include that the artifacts are only available to download after the entire workflow completes (and not when the job completes, so you may need to wait for other platforms to finish before you can download the one you want). Also the artifacts are not permanent (currently expire after 90 days or if manually deleted).

jasnell
jasnell previously approved these changes Mar 24, 2020
@MylesBorins
Copy link
Member

MylesBorins commented Mar 24, 2020

So one thing worth bringing up here... this is a very nice feature but could be abused. This is essentially allowing every PR to create multi-platform binaries that can be downloaded by anyone (if I'm understanding correctly). This does create the possibility that someone could open up a PR with malicious code and we, Node.js, would technically be distributing that to folks. I'm pretty uncomfortable with that TBQH.

@jasnell
Copy link
Member

jasnell commented Mar 24, 2020

Ah right... good point.

@jasnell jasnell dismissed their stale review March 24, 2020 16:50

second thoughts...

@Flarna
Copy link
Member

Flarna commented Mar 24, 2020

What about an extra, manual CI trigger to publish artifacts? This allows collaborators to easily share binaries if needed but no abuseable automatism.

@gengjiawen
Copy link
Member Author

What about an extra, manual CI trigger to publish artifacts ?

Github action doesn't look like has this feature for now.

@gengjiawen gengjiawen added the blocked PRs that are blocked by other issues or PRs. label Mar 25, 2020
@gengjiawen gengjiawen mentioned this pull request Mar 26, 2020
2 tasks
@addaleax
Copy link
Member

@MylesBorins I can see that concern but I feel like the benefits outweigh the risks. Even to just think how much this could speed up bisecting when we have a build available for each commit on master makes me really want to have this.

I think we could rename the file to indicate that it is not an official build? E.g. node-pr-${prid} or node-custom-${commithash}?

@gengjiawen
Copy link
Member Author

Also, it looks like anyone can make a pr add artifact as long as we have github action enabled ? So, enabled it by default won't make much difference ?

@mmarchini
Copy link
Contributor

Also, it looks like anyone can make a pr add artifact as long as we have github action enabled ? So, enabled it by default won't make much difference ?

Changes on Actions coming from forks will only work if the author has commit access, so it's not an issue.

@mmarchini
Copy link
Contributor

Overall I like this :)

Some questions:

  • I think GitHub has a space limit for artifacts. How much would be consumed by this?
  • Can/should we upload everything from make install instead of just the binary?

@MylesBorins
Copy link
Member

@addaleax for the bisecting bit could that not be accomplished with a action only on master as opposed to on every PR?

@addaleax
Copy link
Member

addaleax commented Apr 2, 2020

@MylesBorins Yes, that’s the case.

@MylesBorins
Copy link
Member

@addaleax with that in mind I would like to propose that we scope this PR to only pushes to master, at least for now. That should limit the number of binaries we have to store with github and precludes the security concerns I raised before

@mmarchini
Copy link
Contributor

@MylesBorins does your objection persists here? This would be an amazing feature for us to get feedback from users for specific features which are still in the PR phase, I think it's a good idea to reconsider having it for pushes to the default branch as well as PRs. As a recent example where this would be useful: https://twitter.com/aredridel/status/1305277024446156801. If your objection persist add the Requested Changes to this PR and let's escalate to TSC for decision.

@mmarchini
Copy link
Contributor

@gengjiawen do you mind rebasing this PR?

@MylesBorins
Copy link
Member

Fwiw my intent was more a -1 not an objection.

I need to review this again and think it through more extensively, but it was definitely meant to be "let's make sure we think about the risk" not "absolutely don't do this"

I totally trust that you and others working on this would do something thoughtful

@mmarchini
Copy link
Contributor

In terms of risk of malicious code being sent, we might need to wait for a rebase to try some of these, but:

  • the binary will be set to the next major with a -pre on the version (indicating it's not official)
    • because of that, installing with npm will be wonky and will need --node-dir to run, therefore folks will probably be more mindful of what they're running
  • we can manually delete the artifact if someone sends a PR with malicious code
  • the binary/package will not be signed, which is a sign for users that it's not an official

I'm with @addaleax, the benefits outweigh the risks here. Furthermore if we have an incident because of this we can reconsider.

Copy link
Contributor

@mmarchini mmarchini left a comment

Choose a reason for hiding this comment

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

I'm huge +1 on this change, just making this comment explicit so we don't land before fixing it:

We should upload everything that is installed with make install, otherwise the user won't have npm, gyp, etc.

@aduh95
Copy link
Contributor

aduh95 commented Sep 18, 2023

@gengjiawen this would need a rebase.

@aduh95 aduh95 added the stalled Issues and PRs that are stalled. label May 11, 2024
Copy link
Contributor

This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked PRs that are blocked by other issues or PRs. meta Issues and PRs related to the general management of the project. stalled Issues and PRs that are stalled.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet