It appears that pulumi has started disregarding my...
# general
c
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
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
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
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
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
Glad you got it figured out! Sounds good.