#169 Linters yamllint job failing with `xargs: yamllint: No such file or directory`
Opened by zlopez. Modified

Today I updated some zuul jobs configuration we are using in Fedora Infra and it's running linters check as following:

- project:
    check:
      jobs:
        - linters:
            vars:
              linters:
                - yamllint

This failed with the error in title. The whole job run could be found here.

It seems that the yamllint is not installed on the machine prior to running the job.

In fi-ansible-yamllint job defined in our zuul repo we actually making sure that the package is installed, so this could probably fix the issue for default linters as well


Thanks you for opening an issue.

We run the linter with the "zuul-linter-fedora-stable" image that includes expected linters packages.

https://pagure.io/fedora-project-config/blob/master/f/zuul.d/_jobs-base.yaml#_83

You could also move to that image or stay with you solution that is good as well.

Fabien

Metadata Update from @fbo:
- Issue status updated to: Closed (was: Open)

@fbo I don't have issue with my own job, the problem is with the base linters job. Maybe something is missing in the zuul-linter-fedora-stable image.

Hi Michal,

Do you mean that the base linter job (https://pagure.io/fedora-zuul-jobs/blob/master/f/zuul.d/_included-jobs.yaml#_3) should install linter' packages if they are missing ?

Usually we prefer to populate an image with the required tooling to avoid handling that in a Job.

Do you have a link where I could look at the issue related to the base linters job or the zuul-linter-fedora-stable image ?

Fabien

@fbo See my original post in this issue, the .zuul.yaml for the project has this as the only running job.

- project:
    check:
      jobs:
        - linters:
            vars:
              linters:
                - yamllint

And it fails with xargs: yamllint: No such file or directory.

Here is the log of the run.

This happened again and here is the zuul job.

Metadata Update from @zlopez:
- Issue status updated to: Open (was: Closed)

It seems that the yamllint package is just missing from the image you are using for the job. According to the log it's zuul-worker-fedora-stable.

I probably missed this link previously: https://pagure.io/fedora-project-config/blob/master/f/zuul.d/_jobs-base.yaml#_83

It seems that the default node is set to zuul-worker-fedora-stable, which really doesn't have the linters installed, you need to manually set the correct node in check section. This could be confusing for people who are using the job. Why it doesn't have the zuul-linter-fedora-stable as default?

I fixed issue in my project in https://pagure.io/fedora-infra/zuul/pull-request/40, but it would be great if the default node set for this job is set to zuul-linter-fedora-stable so it doesn't fail by default for yamllint. Or at least add this to README of the job that with yamllint you need to manually add correct node.

Metadata