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

Node/npm requirement for Graphs CI workflow #812

Open
houserx-jmcc opened this issue Jul 3, 2023 · 2 comments
Open

Node/npm requirement for Graphs CI workflow #812

houserx-jmcc opened this issue Jul 3, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@houserx-jmcc
Copy link

Describe the bug

When using self-hosted runners (which tend to be slimmer images than the GitHub hosted runners) the Graphs CI workflow fails due to its reliance on npx and it not existing.

To Reproduce
Steps to reproduce the behavior:

  1. Use self-hosted runners from ARC for k8s (official method for self-hosting on k8s)
  2. Run the Graphs CI job

Expected behavior
The workflow should be able to work, even on slim images.

Screenshots
Screenshot 2023-07-03 at 4 13 54 PM

I think the most straightforward fix would be to add the actions/setup-node action as a precursor step in the Graphs CI workflow to ensure the dependency is always met. I am happy to make a PR for this.

@houserx-jmcc houserx-jmcc added the bug Something isn't working label Jul 3, 2023
@AnandChowdhary
Copy link
Member

@houserx-jmcc Maybe it's best to add this to the documentation instead (would love to accept a PR for that!)? I think we can add a note that if you're using as self-hosted runner, make sure running npx is supported by installing Node.js. Since the GitHub Actions workflow itself uses "node16", I think it's fair to assume that Node.js will be installed, and I don't want to slow down all the workflows by adding another step.

If you feel differently, I'm happy to reopen this issue and discuss!

@houserx-jmcc
Copy link
Author

houserx-jmcc commented Dec 16, 2023

I think we can add a note that if you're using as self-hosted runner, make sure running npx is supported by installing Node.js

This is a bit easier said than done (at least in my case). We'd have to start packaging our own runner images and get a pipeline setup to keep them up to date with the upstream base version, just for a single Node-related command in a single project.

We utilize GitHub's actions/setup-node action in almost every workflow, and its honestly quite fast since they do a lot of caching behind the scenes. Its almost always 0-2 seconds, and includes the npm tools with it. Using it would also allow you more flexibility for Node minor versions and updates.

With the additional lift to build out custom runner image, it would probably be a deal breaker for us to invest in using this unfortunately.

A compromise might be to add the step and let it be toggleable with an environment variable, so it would be skipped by default but enabled for those who need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants