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

NixOS package missing version and git commit #304

Closed
3 tasks done
abiosoft opened this issue May 22, 2022 · 15 comments
Closed
3 tasks done

NixOS package missing version and git commit #304

abiosoft opened this issue May 22, 2022 · 15 comments

Comments

@abiosoft
Copy link
Owner

Describe the Issue

Running colima version on nixpkg shows wrong version and git commit.

Version

N/A

Colima Version:

What is the output of colima version

colima version development
git commit: unknown

Lima Version:

What is the output of limactl --version

N/A

Qemu Version

What is the output of qemu-img --version

N/A

Operating System

  • macOS Intel
  • macOS m1
  • Linux

To Reproduce

Steps to reproduce the behavior:

  1. Install Colima via nixpkgs
  2. Run colima version

Expected behavior

Colima shows version and revision

Additional context

cc @aaschmid @Atemu

@abiosoft
Copy link
Owner Author

@aaschmid re #301 (comment), are there any file permission restriction on the environment? That is among the likely causes.

The test is basically testing a background daemon and creates a pid file in the process. I was trying to mimic an actual use as much as possible.

Anyways, I am already looking at stubbing it out as it seems to be an issue here.

@aaschmid
Copy link
Contributor

aaschmid commented May 22, 2022

I am not aware of any special permissions, though.

In addition, the PR for v0.4.2 (see NixOS/nixpkgs#174013) does also have failed build, see e.g. https://github.com/NixOS/nixpkgs/pull/174013/checks?check_run_id=6545228494.

@aaschmid
Copy link
Contributor

As a workaround we could just disable the tests for now... (ugly but effective to get the new version available).

@abiosoft
Copy link
Owner Author

That is fine by me.

But how easy would it be to re-enable it? I would definitely be looking to get it fixed before the next release.

@abiosoft
Copy link
Owner Author

I made a new change that should simply skip the test on failure. You can try the branch once again and see.
If it passes this time, I can push a new release just for this. If otherwise, let us skip the tests for this version.

Thanks.

@Atemu
Copy link

Atemu commented May 23, 2022

This issue seems to be about the upgrade to the newest version. The missing version is already fixed by NixOS/nixpkgs#173914.

It's better to track these kinds of issues in Nixpkgs though. This isn't related to this app's code, just our packaging of it.

@abiosoft
Copy link
Owner Author

I finally reproduced this error #301 (comment). It required me setting up Nix and running in a pure nix shell nix-shell --pure with this shell.nix.

Not a big issue and tests can be skipped for v0.4.2. It will be properly addressed ahead of future releases.

PS: current master should no longer fail the tests.

@aaschmid
Copy link
Contributor

aaschmid commented May 29, 2022

PS: current master should no longer fail the tests.

You mean main from 4 days ago?

@abiosoft
Copy link
Owner Author

You mean main from 4 days ago?

Oops yeah, I meant main.

@aaschmid
Copy link
Contributor

Test seems to be skipped but now on my machine the following fails:

=== RUN   Test_config_Mounts
=== RUN   Test_config_Mounts/0
time="2022-05-29T18:56:33Z" level=fatal msg="cannot make required directory: mkdir /homeless-shelter: read-only file system"
FAIL    github.com/abiosoft/colima/environment/vm/lima  0.264s
FAIL

Where is the directory try to be created?

P.S.: the output for the skipped test

ok      github.com/abiosoft/colima/cmd  0.327s
=== RUN   TestStart
    daemon_test.go:31: pidfile /private/tmp/nix-build-colima-0.4.2.drv-0/TestStart2548514758/001/daemon.pid
    daemon_test.go:46: start successful
    daemon_test.go:53: daemon not supported: context deadline exceeded
--- SKIP: TestStart (5.01s)
PASS

@abiosoft
Copy link
Owner Author

This has been fixed for 0.3.4. after upgrading to Nix 2.8.1.

$ nix --version
nix (Nix) 2.8.1

$ nix shell nixpkgs#colima

$ colima version
colima version 0.3.4
git commit: 5a4a70481ca8d1e794677f22524e3c1b79a9b4ae

$ which colima
/nix/store/nygq9gxi21b939dyvkdg2w0f5xix7gng-colima-0.3.4/bin/colima

@aaschmid should we close the issue and track the failing tests on nixpkgs repo?

@aaschmid
Copy link
Contributor

We can track the failing tests on nixpkgs repo also, yes. As you prefer, I am flexible ;-)
Thanks for your effort anyways!

@abiosoft
Copy link
Owner Author

@aaschmid as a side node, what resources do I use to keep up with Nix?

I gave Nix a second try due to this issue (tried it before, gave up and reverted to Brew) and I think I finally got a hang of it. Only to check out flakes which led me to 2.0 commands, and now I am totally lost.

My use case was generally covered with nix-shell, nix-shell -p ... and home-manager. But now there's a million and one new commands that sounds like they all do the same thing. 😕

I keep seeing flakes everywhere and sounds like it is the direction Nix is heading, but there is not as much documentation compared to what I am used to with the tools I generally use. And much of docs assume you're already a Nix expert.

Anyways, enough of the rant. Closing the issue.

@Atemu
Copy link

Atemu commented May 31, 2022

https://discourse.nixos.org/c/announcements/8 is a pretty good place.

The new stuff with the new nix CLI, flakes etc. is still experimental and subject to change. If you use-cases are covered by nix-shell and hm, that's absolutely fine and you should keep using them. That's how my usage looks like too.

Official and non-official docs are sparse but if you have any suggestions on the official ones, feel free to open issues on Nix and Nixpkgs.

@aaschmid
Copy link
Contributor

aaschmid commented May 31, 2022

The new stuff with the new nix CLI, flakes etc. is still experimental and subject to change. If you use-cases are covered by nix-shell and hm, that's absolutely fine and you should keep using them. That's how my usage looks like too.

I totally agree with @Atemu.
And to be honest, I steered clear of flakes for a while now. This is becausae of a available time reason but first of all the not found obvious benefit / requirement of flakes for me.

keep seeing flakes everywhere and sounds like it is the direction Nix is heading, but there is not as much documentation compared to what I am used to with the tools I generally use. And much of docs assume you're already a Nix expert.

Yes, I am quite familiar with the usage of nix, nix-darwin and home-manager but the learning curve was rather steep. For the creation of packages there is a bunch of additional things to learn which I try on demand - and I always learn new things ;-)

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

No branches or pull requests

3 participants