Hi Team, I'm trying to set up Drift Detection or s...
# pulumi-deployments
p
Hi Team, I'm trying to set up Drift Detection or schedule a command like
pulumi preview
, but I'm encountering the following error:
Error: failed to get runtime: failed to select stack: chdir /deployment/iac/config: no such file or directory
What could be the cause of this issue, and what are the possible solutions? Please note that the
Pulumi.yaml
file is present at the specified location. Thanks, Vallabh
l
There is no directory
/deployment/iac/config
. If you can see that directory but whatever script you're running can't, then you need to figure out why. Perhaps you're running something in a container and the paths are different?
p
Hi @little-cartoon-10569, this directory is set as --workDir="/deployment" by Pulumi and the code is cloned successfully. This is the output I see in GetSource step for the deployment: $ /pulumi-deploy-executor getsource git --repoURL="<repoURL>" --workDir="/deployment" --username="$PULUMI_DEPLOY_USERNAME" --password="$PULUMI_DEPLOY_PASSWORD" --branch="refs/heads/drift-test" --repoDir="iac/config" Successfully cloned: <repoURL>
l
chdir /deployment/iac/config: no such file or directory
is fairly unamibiguous. It's not even a Pulumi error, it's a system error (chdir is a system call). You need to figure out what bit of your scripts and logic is calling this bit. Maybe it's happening in a different thread? Maybe it's running on a remote machine? I can't tell. But something, somewhere, cannot find that directory.