spec-prod icon indicating copy to clipboard operation
spec-prod copied to clipboard

Ensure correct node/python versions are used

Open sidvishnoi opened this issue 4 years ago • 6 comments

Users shouldn't need to add a setup-node (for respec) or setup-python (for bikeshed) step. spec-prod should ensure that versions are available, regardless of runs-on value. GitHub Actions now support using other actions in composite actions (https://github.blog/changelog/2021-08-25-github-actions-reduce-duplication-with-action-composition/) so it should be much simpler now.

Also recommend runs-on: ubuntu-latest instead of ubuntu-20.04 once this issue is closed, so the users don't have to update runs-on when GitHub deprecates old versions.

sidvishnoi avatar Sep 03 '21 20:09 sidvishnoi

Note that the example workflow (in README.md) doesn't include setup-node steps. We've been following that in some specs and the update to node 16 has caused those builds to fail.

martinthomson avatar Nov 09 '21 15:11 martinthomson

I will update docs to recommend not using node 16 manually and let it be controlled by spec-prod. Can you share some examples where (and possibly why) manual setup-node was used?

Can't revert it now as all ReSpec based specs will fail otherwise. In near future, it might be possible to detect node version and not run setup-node if an ok version already exists. (https://github.com/actions/runner/issues/834, waiting for https://github.com/actions/runner/pull/1438 to be generally available). Will also enable setup-python for Bikeshed then.

sidvishnoi avatar Nov 09 '21 16:11 sidvishnoi

To be clear, spec-prod doesn't require users to manually use setup-node in their workflows (now it in fact discourages it). If I understand correctly, you mean it started crashing if there was a manual setup-node in workflow?

sidvishnoi avatar Nov 09 '21 16:11 sidvishnoi

The last build of https://github.com/w3c/mediacapture-fromelement contains a failure.

martinthomson avatar Nov 09 '21 18:11 martinthomson

That workflow is using unsupported spec-prod@v1. Please upgrade to v2. Example upgrade: https://github.com/w3c/webrtc-svc/commit/9412d0725b1b1c1985025fccd3797ad4823e67ef

sidvishnoi avatar Nov 09 '21 18:11 sidvishnoi

Ah, thanks for the correction. I've opened a pull request to fix it.

martinthomson avatar Nov 10 '21 12:11 martinthomson