Sitelet https://github.com/actions/setup-node/pull/186
Skip to content

chore: Remove strategy for non-matrix builds - #186

Merged
MaksimZhukov merged 2 commits into
actions:mainfrom
nschonni:remove-strategy
Dec 30, 2021
Merged

MaksimZhukov merged 2 commits into
actions:mainfrom
nschonni:remove-strategy

Conversation

@nschonni

@nschonni nschonni commented Aug 15, 2020 •

Copy link
Copy Markdown
Contributor

Just flagged in schema validation because the strategy value is only applicable if it has a matrix below it

@bryanmacfarlane

Copy link
Copy Markdown
Contributor

Is the schema validation wrong? Even though there's no matrix below there are multiple jobs and the intent is to fail fast the other jobs if one fails to release concurrency. Not sure this is a good change but maybe I'm missing something ...

@nschonni

Copy link
Copy Markdown
Contributor Author

The separate jobs aren't part of a matrix. EX: if one fails it doesn't fail/cancel the others. The matrix is used to pass variables to them. If the one of the "batches" like running Node 14 and Node 12 fails, then it cancels all the jobs in the other batch, not other jobs in the same batch.

@nschonni

Copy link
Copy Markdown
Contributor Author

Found the schema that VS Code is using https://json.schemastore.org/github-workflow

@bryanmacfarlane

Copy link
Copy Markdown
Contributor

It might be a bug in the schema - in this case we want fail fast even though it's not a matrix.

@nschonni

Copy link
Copy Markdown
Contributor Author

Did an example to show that it doesn't behave like you're talking about https://github.com/nschonni/setup-node/actions/runs/499393700
Even if one of the job fails, it doesn't cancel other running jobs like it does when they are part of an actual matrix

Trimmed trailing spaces as well

@theifedayo theifedayo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

what does strategy: failfast: false do? can you explain?

@nschonni

Copy link
Copy Markdown
Contributor Author

@theifedayo it stops parallel runs if one fails https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast
Doesn't make sense here, since there are no parallel runs

@MaksimZhukov
MaksimZhukov merged commit 7b55867 into actions:main Dec 30, 2021
@nschonni
nschonni deleted the remove-strategy branch December 30, 2021 14:49
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.

5 participants