Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.
This repository was archived by the owner on May 12, 2021. It is now read-only.

CI: checks: go-no-os-exit may not be functioning #477

@grahamwhaley

Description

@grahamwhaley

Description of problem

Hand running 'make check V=1' locally in the runtime repo hangs up. Adding some debug to the Makefile, it looks like the issue is in:
https://github.com/kata-containers/runtime/blob/master/.ci/go-no-os-exit.sh

bash -x .ci/go-no-os-exit.sh
+ go_packages=.
++ go list -f '{{.Dir}}/*.go' .
can't load package: package github.com/kata-containers/runtime: no Go files in /home/gwhaley/gopath/src/github.com/kata-containers/runtime
+ candidates=
+ egrep -n '\<os\.Exit\>'

The problem being the go list finds no dirs to process, and then the egrep ends up looking at stdin, forever.
I have a feeling we don't see this in the CIs maybe as they don't have a tty associated with them, so maybe they silently fail.

Expected result

I expect it to run the check on all the .go files, or fail gracefully at least - both on the CI and if run by hand.

Action

Probably:

  1. Add an echo so we know that test is being run
  2. Add a check for 'no files to process', echo that status out, and fail gracefully
  3. Decide/check that finding 'no go files' in the runtime is the right action - as it is quite possibly not - it should probably be checking all files in virtcontainers and the cli dirs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions