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

Github action error: Error when evaluating 'strategy' for job 'check'. #284

Closed
yihuaf opened this issue Sep 7, 2021 · 1 comment · Fixed by #294
Closed

Github action error: Error when evaluating 'strategy' for job 'check'. #284

yihuaf opened this issue Sep 7, 2021 · 1 comment · Fixed by #294

Comments

@yihuaf
Copy link
Collaborator

yihuaf commented Sep 7, 2021

Error when evaluating 'strategy' for job 'check'. (Line: 30, Col: 15): Matrix vector 'dirs' does not contain any values

First observed in https://github.com/containers/youki/actions/runs/1210634803.

The change is a readme change, so likely it is not caused by the PR.

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Sep 8, 2021

Yes , it is not caused by the PR itself.
The reason behind it is :

currently the CI first runs a job called changes which checks which specific directories have changed : https://github.com/containers/youki/blob/main/.github/workflows/main.yml#L10-L23

This maps the files changed according to path and maps them to provided values, which in our case are directories. These values are given as output by this job.

The job check depends on changes, and uses the output of it as matrix to run the format and lint checks only in those directories in which the files have changed. Reasoning behind this, is that if only the files in cgroups have changed, then there is no need to run checks in youki or test_framework etc. Note that this only applies to format and lint checks, all tests are always run.

In this particular case, no files in any of the given path patterns had changed, so output of changes was empty. Thus the matrix given to the check was also empty, which resulted in the error. The fix on this would be to put some kind of condition such that set the matrix only if the output is non-empty, otherwise not run the job, but I'm not sure how to do that.

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 a pull request may close this issue.

2 participants