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

Difficulties debugging GitHub actions that use nix-shell #556

Closed
micahhausler opened this issue Nov 15, 2021 · 2 comments · Fixed by #727
Closed

Difficulties debugging GitHub actions that use nix-shell #556

micahhausler opened this issue Nov 15, 2021 · 2 comments · Fixed by #727
Labels
area/ci-cd-release kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Comments

@micahhausler
Copy link
Contributor

Expected Behaviour

When contributing to Tinkerbell, it should be easy to debug and fix failing CI tests for PRs.

Current Behaviour

The ci-checks.sh script uses nix-shell, which is not a standard shell in most Linux distributions. For developers using macOS or common Linux distributions, it is not clear how to debug CI failures. When you try to run the ci-checks.sh script without nix-shell installed, you'll get the following output

$ ./ci-checks.sh 
/usr/bin/env: ‘nix-shell’: No such file or directory

Possible Solution

I think we have at least two options:

  • Switch from nix-shell to more standard toling
  • Provide documentation on how to debug failing nixos tests. I ran the following to produce the
docker run -it --rm \
  -v `pwd`:/go/src/github.com/tinkerbell/tink \
  -w /go/src/github.com/tinkerbell/tink \
  nixos/nix nix-shell ci-checks.sh

Your Environment

  • Operating System and version (e.g. Linux, Windows, MacOS): I'm developing on macOS and also on Linux (Ubuntu 20.04).
@mmlb
Copy link
Contributor

mmlb commented Nov 15, 2021

Thanks @micahhausler , should this go under https://github.com/tinkerbell/tink/blob/main/CONTRIBUTING.md#nix ( something along the lines of "or you can try it with docker" ) or specifically in its own section for CI?

@tstromberg tstromberg added triage/discuss Indicates a PR or issue that requires discussion kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Nov 16, 2021
@jacobweinstock jacobweinstock removed the triage/discuss Indicates a PR or issue that requires discussion label Nov 30, 2021
@jacobweinstock
Copy link
Member

Providing documentation would definitely be the quicker route. Documentation around this might be something we want regardless.

@mergify mergify bot closed this as completed in #727 May 10, 2023
mergify bot added a commit that referenced this issue May 10, 2023
## Description


This allows us to check for nix-shell and use docker if nix-shell is not installed. Update CI to use the make target.

## Why is this needed



Fixes: #556 

## How Has This Been Tested?





## How are existing users impacted? What migration steps/scripts do we need?





## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci-cd-release kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants