-
Notifications
You must be signed in to change notification settings - Fork 10
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
Disnix does not activate services in dependsOn order #8
Comments
Maybe this has something to do with a silly requirement that I should have stated better in the manual (or maybe implement a check for this or a more robust method). Can you check whether the 'name' property in {pkgs, system, distribution, invDistribution}:
{
serviceA = {
name = "serviceA"; # identical to attribute name
};
} and whether the deployment works properly? |
I finally got back from vacation and the holidays, and got some time to look at this. In my While I was checking that, I also noticed that I had a typo in the function that I used to generate my target specific services. The typo unfortunately was still valid code, but made my function not add anything to the On another note, maybe it would be good to add functionality to generate target specific services from a "prototype" service, or add functionality to display a graph of the |
Hi, I just implemented something in the development version now that checks whether the name attribute matches the service's attribute name. This feature becomes part of the next Disnix release, so then you will get notified if you make such a mistake again. About generating services from a prototype. I think the Nix expression language is already powerful enough to do something like this. For example, you could define an attribute set in a let-block which purpose is to be encapsulate common properties and reuse those properties somewhere in the body. |
Great! I'm very happy with anything that prevents me or my work team from making mistakes in Disnix. The Nix expression language is indeed already powerful enough to do something like this. I'm currently doing it in my |
Yes maybe you're right about making target-specific services better "first-class citizens" in the deployment models. I need to give this some more thought. In addition to the examples shown in the blog post and manual, there are other kinds of scenarios possible that I have not investigated yet. For example, there is also the theoretical possibility to make a target-specific service an inter-dependency of another service, although I have not encountered such a situation in practice yet. :) For all these scenarios it would (obviously) be nice to have a notation that allows us to neatly expresses them. |
Disnix currently does not activate services in the order established by dependsOn, but it should. For instance, if a service
a
dependsOnb
,b
should be activated beforea
.Due to this bug, I cannot deploy anything on my Disnix cluster, as activation of services fails due to them being activated in the wrong order.
The text was updated successfully, but these errors were encountered: