https://pulumi.com logo
Title
f

freezing-memory-87554

04/13/2021, 8:48 PM
Hi guys! A quick question, maybe someone already investigated it. Suppose we have two pulumi stacks, A and B, self-hosted backend. B uses StackReference to get some outputs from A. With new (awesome!) PULUMI_SELF_MANAGED_STATE_LOCKING=1 we can be sure that if we try run concurrently updates for A or B, we won't get into trouble because the state of particular stack would be locked. However the question is, would we be protected from this kind of trouble if we run updates at the same time for A and B (which uses values from A)? Would really appreciate some insight on the matter, because I didn't find any info in docs 🙂
b

brave-planet-10645

04/16/2021, 8:38 AM
So the state locking is on a per-stack basis so yes you can run them both at the same time even with this turned on. However, if you make a change to stack A that stack B is reliant on, and stack B (for whatever reason) has an older version of whatever comes from stack A, then it'll continue to use that value. I would recommend running them one after the other, rather than concurrently
p

proud-art-41399

04/16/2021, 9:55 AM
How can you ensure this, however? Imagine the two stacks relate to two standalone apps, both living in their own repository and being developed by different teams. They are deployed automatically using some CI/CD (e.g. GitHub Actions) completely unaware from each other.
b

brave-planet-10645

04/16/2021, 10:41 AM
In the same way that you would treat any application that had a dependency on another, communication and ensuring that the old value will still work
👍 2
f

freezing-memory-87554

04/16/2021, 11:52 AM
Thank you so much for the answer! Really helpful.