Skip to content

Community maintenance of actions/setup-node? #462

Open

Description

@dominykas

It doesn't seem like actions/setup-node#26 will get resolved any time soon. There are other features requested (incl. PRs open) that don't seem to be getting the attention they deserve.

Should Node.js have an official action of its own?

This way we could implement the keywords support, and possibly we could recommend a different default matrix to the users.

The default matrix does have a tradeoff - right now,
a maintainer has to add new versions each time, if we recommended, say [ lts-1, lts, latest ] as the default, then the tested versions would drop off without notice, but I figure that testing in latest versions is more valuable than testing in unsupported versions, even if breaking that support means the need to bump semver major.

Related: #416

Activity

  1. ljharb commented on Apr 25, 2021

    @ljharb
    SponsorMember

    I've got the node/matrix and node/install actions under https://github.com/ljharb/actions, the latter of which uses nvm. It currently doesn't support windows but only because i haven't gotten around to it. I use it on all 2-300 of my projects. nvm supports lts/*, lts/argon etc, and lts/-1 etc.

    In other words, even if folks wanted to use setup-node, they could still use my matrix action to automatically support whatever versions they like. Here's an example: https://github.com/ljharb/unbox-primitive/blob/main/.github/workflows/node-4%2B.yml#L6-L23

  2. dominykas commented on Apr 25, 2021

    @dominykas
    MemberAuthor

    Without the shareable workflows that's a lot of boilerplate to copy/paste... And shareable workflows got bumped to Q3.

    Not saying we shouldn't recommend it, just that the matrix is still a burden... Any chance you managed to get around to automating the maintenance of distributing the boilerplate?

    Also it's not that you're a some random dude online, but part of the reason why I raised this is to see if it would be useful to make it "official"?

  3. ljharb commented on Apr 25, 2021

    @ljharb
    SponsorMember

    No, I still haven't solved that, unfortunately.

    tbh I think that once there's shareable workflows, there's a lot less value in having an official one.

  4. dominykas commented on Apr 26, 2021

    @dominykas
    MemberAuthor

    Well, once there's shareable workflows, there's still the benefit of having this moved out into a community... If we can form a community around it specifically.

    That said, I wouldn't hold my breath waiting for the shareable workflows...

  5. changed the title [-]Let's fork `actions/setup-node`?[/-] [+]Community maintenance of `actions/setup-node`?[/+] on Jun 28, 2021
  6. bnb commented on Sep 7, 2021

    @bnb
    Contributor

    FWIW it seems like the root point in this issue (actions/setup-node#26) was addressed: actions/setup-node#26 (comment)

  7. ljharb commented on Sep 7, 2021

    @ljharb
    SponsorMember

    True enough, but that it took so long to do something so basic suggests that indeed we need something owned by the community.

  8. bnb commented on Sep 7, 2021

    @bnb
    Contributor

    True enough, but that it took so long to do something so basic suggests that indeed we need something owned by the community.

    Sure, fair enough. It's also probably indicative of community need (or lack thereof) that a solution didn't gain traction over actions/setup-node despite it taking 2 years to actually ship that feature.

  9. ljharb commented on Sep 7, 2021

    @ljharb
    SponsorMember

    Very true. I think that it wasn't until travis changed their pricing - last November - that Actions really became the solution of choice, and in the intervening time, I created my own solution for my hundreds of packages, and I think others just manually made a matrix.

    In other words, I think there's community need, but it's very difficult for anything non "standard" to gain traction.

  10. bnb commented on Sep 7, 2021

    @bnb
    Contributor

    I think others just manually made a matrix.

    yeah, this is basically the solution I used for everything. I'll slowly update my files to not be like this anymore. It worked but had a maintenance burden, which the new update relatively solves.

    In other words, I think there's community need, but it's very difficult for anything non "standard" to gain traction.

    If that's the case, do you think it's a worthwhile investment of our time to work on this? I am perpetually concerned about spreading ourselves over many projects and having a mediocre execution vs. focusing on a few projects and doing them well.

  11. ljharb commented on Sep 7, 2021

    @ljharb
    SponsorMember

    Note that I did create an action that automatically makes a matrix :-) but nobody besides me has adopted it.

    Yes, I do think it's worthwhile, but I can't speak to prioritization.

  12. dominykas commented on Sep 26, 2021

    @dominykas
    MemberAuthor

    Well, I did add a repo for pkgjs/action - I just haven't had a chance to start any discussions there, but I would hope that as a wrapper layer around actions/setup-node we'd be able to solve at least some problems, as opposed to straight out fork, esp. given the concerns that the official action is a part of a broader commercial offering and it is after all "official", so indeed overcoming that inertia would be really tricky.

    Either way, it also seems that actions/setup-node does have some renewed activity, so maybe this particular issue is best closed and offloaded to pkgjs/action.

    Note that I did create an action that automatically makes a matrix :-) but nobody besides me has adopted it.

    That's because the ergonomics of achieving that are really not pretty... :( I can't advocate for it in good conscience :D And then you still have to maintain the yaml boilerplate (it will have to evolve over time, won't it?). Maaaybe packaging that up as an npm package to simplify the distribution is an option? github/roadmap#98 was originally scheduled for Q2, then rescheduled for Q3, but it's really hard to guess if it's any closer...

    But even without the reusable workflows - having an explicit option in the workflows API to just load the matrix variables from an external URL would solve 99% of the problem... But I have no idea how to reach the people who can influence an implementation of such a thing.

  13. ljharb commented on Sep 26, 2021

    @ljharb
    SponsorMember

    No, the boilerplate and action need no further changes forever. I agree it’s not super ergonomic, but I’m hoping that can change as GHA adds reuse features.

  14. dominykas commented on Sep 27, 2021

    @dominykas
    MemberAuthor

    At the risk of veering just slightly off topic - spotted this on one of the GHA issues: actions/runner#834 (comment) - basically, it's a suggestion to work around the lack of if inside composite actions by generating the action and executing it (effectively an eval) - I wonder if that could work to also do the matrix?

  15. bnb commented on Sep 27, 2021

    @bnb
    Contributor

    honestly, if we were to approach this I'd really recommend that we take the approach that Twitter Together takes where the action you add is actually a meta action that manages your other actions.

    the DX of this is rather nice, and allows you to centrally manage updates a bit more effectively.

  16. ljharb commented on Sep 27, 2021

    @ljharb
    SponsorMember

    I'm not sure if it would work, since i think the matrix config needs to be statically available to GHA.

  17. bnb commented on Sep 27, 2021

    @bnb
    Contributor

    @ljharb what about an action committing a static action wouldn't work?

  18. bnb commented on Sep 27, 2021

    @bnb
    Contributor

    basically:

    • Add Controller action
      • Controller action commits CI action to the repo
      • CI action runs as CI

    When you want to update the CI action, you update the configuration the Controller action commits, and either have it on a cron or manually runnable to update the committed CI action.

  19. ljharb commented on Sep 27, 2021

    @ljharb
    SponsorMember

    @bnb oh sorry, i was replying to #462 (comment)

    What you're saying would work, but it'd create a ton of extra commit noise, and you wouldn't be able to test the action changes against the repo before committing them (when making changes to the controller)

  20. bnb commented on Sep 27, 2021

    @bnb
    Contributor

    have the controller PR rather than directly commit :P

  21. ljharb commented on Sep 27, 2021

    @ljharb
    SponsorMember

    Maybe I'm misunderstanding, but that would be multiple steps:

    1. update the controller
    2. the controller sends a PR, where tests are run.

    You wouldn't be able to test step 1 until after it was completed.

  22. bnb commented on Sep 27, 2021

    @bnb
    Contributor

    what do you need to test in step 1?

  23. ljharb commented on Sep 27, 2021

    @ljharb
    SponsorMember

    I'd be using this controller on 300 projects. I'd want to make sure that I wasn't about to create 300 failing PRs.

  24. bjohansebas commented on Mar 20, 2025

    @bjohansebas
    Member

    This issue is too old. Do we still believe community support is needed for this action? Maybe it's time to close this issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions