Deploying components one by one, deploys all the components each time instead of only the new components
Bug #1362744 reported by
Ryan Peters
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Murano |
Invalid
|
Critical
|
Stan Lagun |
Bug Description
To recreate:
Add app1 to an environment and deploy environment.
After that deploy finishes, add app2 to the same environment and deploy again.
It appears to be deploying both apps instead of just app2.
Changed in murano: | |
status: | New → Confirmed |
milestone: | none → juno-3 |
assignee: | nobody → Stan Lagun (slagun) |
importance: | Undecided → High |
Changed in murano: | |
importance: | High → Critical |
Changed in murano: | |
milestone: | juno-3 → none |
To post a comment you must log in.
This is expected behavior. Engine cannot just redeploy added application because it doesn't know that it is the only change you did. You could have possibly modify properties of other applications that are already deployed or want it to verify that is indeed in desired state. It is up to individual applications/ components to examine what has changed since last deployment and to adopt to that change.
There is an attributes API that helps with that. Attributes are key-value storage that is bound to a pair (class, instance) and consists of just 2 methods: getAttr(name, optionalDefault) and setAttr(name, value) where value can be of any supported primitive type.
The simplest thing you can do in your application is to have something like isDeployed, false) isDeployed, true)
If: $.getAttr(
Then:
- deploy
- your
- app
- ...
- $.setAttr(
But with such approach application will ignore any changes done to its properties after initial deployment. More advanced application will have such checks on a more granular level and will store in attribute storage previous property value rather than boolean flag