-
Notifications
You must be signed in to change notification settings - Fork 29
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
Does not work on platforms aside from x86_64-linux #12
Comments
It's possibly due to docker images not being able to be built on darwin (at least not without extra work setting up a remote builder). However manifest generation should work just fine (as long as you don't use the docker module). |
Agreed. Also what about aarch64-linux systems? |
any architecture supported by |
Thanks for the report, @khaled (and for the added details @adrian-gierakowski). I'm not entirely certain as the commit which introduced that change has no details. However, the parent commit introduced new checks and failed its CI execution which was then fixed by the commit in question. So, if I had to guess, the |
Thanks @hall. Sounds like a good guess! With the line un-commented: x86_64-linux:
x86_64-darwin:
Wondered why the x86_64-linux checks are doing anything with aarch64, and found this. Haven't made sense of the darwin failure yet. |
Good find. First I'm hearing of IFD but that certainly appears to be the case as Not yet sure what a decent resolution is here. No idea on the darwin failure though; no surprise that it evaluates fine on linux: nix-repl> builtins.match "( |)+" ""
[ "" ] Presumably it's using a different regex engine but will have to do some work before I can get to a place to test. |
Just to clarify, the
The way to get rid of |
Ah! Thanks, that makes sense. A quick search doesn't reveal much in the way of complete parsers in pure There is a recent MR inflight to implement I'm tempted to just disable the |
👍 |
Thanks @hall and @adrian-gierakowski! |
Yeah, feel free to open another issue for that. Best I can do is help you debug on darwin. The idea is that regex is removing "empty" lines (where that includes whitespace characters). It appears to be a known issue that there are inconsistencies between platforms. You might try the following diff 🤷 (this line also appears in the istio generator in the same parent directory) ❯ git diff jobs/generators/k8s/
diff --git a/jobs/generators/k8s/default.nix b/jobs/generators/k8s/default.nix
index 43ec4b9..e712742 100644
--- a/jobs/generators/k8s/default.nix
+++ b/jobs/generators/k8s/default.nix
@@ -21,7 +21,7 @@ with lib; let
then "null"
else builtins.toString value;
- removeEmptyLines = str: concatStringsSep "\n" (filter (l: (builtins.match "( |)+" l) == null) (splitString "\n" str));
+ removeEmptyLines = str: concatStringsSep "\n" (filter (l: (builtins.match "[[:space:]]*" l) != []) (splitString "\n" str));
mkOption = {
description ? null, You can either test in |
I am trying to implement a change to the Helm module we discussed (implement filtering/modifying the objects). I am trying to get the currently commented out test working on my machine, a aarch64-darwin but with If I understand correctly the commented out tests prevent running the checks even on What I am unsure about though is what the expectation is about Darwin:
|
Since the commented out tests use IFD, it forces evaluation on every platform the flake supports (i.e., the ones defined by Ideally, we'd remove the use of IFD and You're saying that existing integration tests don't support darwin? It's unclear to me in general how well nix is supported on darwin. Which tests? Can you provide an example or links to docs? I haven't tried running the checks for a specific platform; maybe |
Hmm, are you sure that this is really true? Wouldn't it also mean that it would try to evaluate
I think that sounds like a good idea as it seems that IFD is sort of a discouraged. Maybe this might also reduce resource usage of kubenix? I previously tried running
I don't know to be honest. But I assume so? Because the integration tests actually test against a real Kubernetes cluster running in a VM I assume? Using NixOS VM testing capability? Or is that assumption wrong? NixOS VM tests currently don't work properly on macOS as they are optimized for speed: they share the I haven't looked through all tests but those that are currently commented out due to IFD are definitely integration test, right? Are there any other integration tests that aren't commented out? As of right now
I would say Darwin support is very good already and only getting better (partly due to e.g. https://opencollective.com/nix-macos) We use it as an alternative to If I stumble into a random For working with NixOS servers though you most of the time need to have a Linux remote builder configured. In my case this was a container running in Docker for Desktops VM but I am in the process of migrating that into the "official"
|
see: NixOS/nix#4265
Helm module does IFD, there is no other way to do what it does and we definitely want tests to cover it. The other place I'm aware of IFD being used is converting json to yaml (as mentioned above). This is not an essential feature imho. Anyway, with the fix mentioned above we can stop worrying about IFD
I don't think that is related to IFD, but rather the fact that it spins up nixos tests which run in a VM
That is correct.
I believe this has been solved recently.
yes |
Makes sense!
True, that is more likely to be the reason. I just remember playing around with IFD myself sometime ago and running into very slow evaluation times as well but I may have jumped to conclusions here 😄
Ah yeah, that's right. Hmm, I think I remember though that building the SquashFS for the root partition can be quite slow. If a Linux builder is available, the edit-test-cycle is probably quicker using that, compared to always having to build a whole new image. I will try to get the Helm integration test working on Darwin when I have time 😃
But a prerequisite for re-enabling that test would be to find a different workaround than disabling the test, right? I'll play around with that as well. |
This line seems to prevent this from working on other systems.
Any reason why it is this way? I tried cloning the repo, uncommenting the line, and building the example on x86_86-darwin. Seemed to work just fine.
The text was updated successfully, but these errors were encountered: