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

Dependency management #238

Open
ColonelPanics opened this issue Jul 1, 2019 · 3 comments
Open

Dependency management #238

ColonelPanics opened this issue Jul 1, 2019 · 3 comments

Comments

@ColonelPanics
Copy link
Member

Smart understanding of soft-linking be sure to protect things that have dependent resources. For example, don't delete a domain if there are deployed resources that have used it as a parameter.

Probably worth holding off until #221 has been implemented.

@WilliamMcCumstie
Copy link
Contributor

WilliamMcCumstie commented Jul 15, 2019

So there are two options here on how to handle dependencies. In this issue I will discussed an initial implementation and then I'll open an issue on advanced graph theory.

Now that Models::Deployment is getting retired and replaced with Models::Domain and Models::Node it makes the dependency management quasi easier. For the most part, Nodes are dependant on the Domain.

Therefore, there needs to be a new Models::Node#dependencies instance method. This method should return one of the following options:

  1. A single element array: [<#Models::Domain...>] if the node depends on the domain
  2. A empty array: [] if the node does not depend on the array

By doing this, we will cover the vast majorities of use cases where a node depends on its domain. It might be worth adding a dependencies instance method onto Models::Domain, but it should only return an empty array for the time being

EDIT: Scratch this plan - see below

@WilliamMcCumstie
Copy link
Contributor

WilliamMcCumstie commented Jul 15, 2019

Once the simplified dependencies management has been implemented, then all the dependencies need to be created before the Node is created

@WilliamMcCumstie
Copy link
Contributor

From discussions IRL, a trimmed down version will be used. Deploying a node will no longer implicitly trigger the domain (or another node) to be deployed.

Instead the dependencies list should be checked to insure all the required nodes (+domain) are running. If they are not, then an error should be raised

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants