https://pulumi.com logo
#general
Title
# general
c

cold-motorcycle-78950

01/21/2020, 4:30 PM
It appears that pulumi has started disregarding my local changes to a stack. Instead, it appears to be stuck at the head of our teams integration branch. Any tips on how to resolve this would be greatly appreciated
f

future-barista-68134

01/21/2020, 5:42 PM
do you have multiple stacks setup? One for your local code and one for the integration branch for example?
also when running pulumi up, it should really only look at the code that's currently on your machine, there's no way for it to look at code in a separate branch. Unless of course you have them both checked out in different directories simple smile
c

cold-motorcycle-78950

01/21/2020, 7:51 PM
ah, that must be it. I have two versions of my team’s repo checked out on my machine (because I’m jumping back and forth between a large project restructuring and minor fixup changes). I figured that pulumi would scope itself to the version in my cwd, but it might be getting mixed up with the version in the other directory
thank you!
f

future-barista-68134

01/21/2020, 10:37 PM
I figured that pulumi would scope itself to the version in my cwd
It should work this way! Just double check that you're running pulumi up in the directory that coordinates with the stack you have selected. You can get this by running
pulumi stack ls
... the stack with the star is the one you're currently on. I.e. if you're in ~/Documents/dev-branch-code make sure you are on the dev stack.. and when you are in ~/Documents/integration-branch-code make sure you are on the integration stack. Use
pulumi stack select (desired stack)
to switch between.
c

cold-motorcycle-78950

01/22/2020, 2:10 PM
ah I see! in my case I only have one stack listed under
pulumi stack ls
so I presume I’m on the right stack. What appeared to fix my problem was ensuring that my local branch wasn’t behind the remote tracking branch. When I was a commit behind the remote, pulumi seemed ignore what I had locally and would instead run the state on the remote branch. After I
git pull
ed and my local branch was at the same commit as the remote, pulumi seemed to start running the changes that I had locally (my syntax canary died for instance). I may have been paying attention to the wrong events here, and my explanation sounds like it’s at odds with how pulumi is expected to work, so I don’t have a lot of confidence in my take. I’ll chime back in here if I run into the issue again.
f

future-barista-68134

01/22/2020, 3:59 PM
Glad you got it figured out! Sounds good.