pulumi / pulumi

Pulumi - Infrastructure as Code in any programming language 🚀
https://www.pulumi.com
Apache License 2.0
20.83k stars 1.08k forks source link

Default `vcs:` and some `gitHub:` tags missing from newly created stack. #12616

Open wtfzambo opened 1 year ago

wtfzambo commented 1 year ago

What happened?

Working on a pulumi project on the default stack (dev), I later created a new one (iam), added some code, and then ran pulumi up.

Opening the console, I noticed that the newly created stack was missing the repo info (repo name would be glue-on-pulumi):

Running pulumi stack tag ls, I notice that the new stack indeed does not have the vcs: and gitHub:repo tags set:

Expected Behavior

I expect that new stacks created in a project under a git repo to also include the various vcs: and gitHub:repo tags set.

Steps to reproduce

I'm running this in a devcontainer, using Docker Desktop and WSL2 (Ubuntu 20.04) backend and filesystem.

You can find the devcontainer template here, but it's missing pulumi so it needs to be installed manually, if you decide to test using such devcontainer.

Steps:

Output of pulumi about

Pulumi about ``` CLI Version 3.59.1 Go Version go1.20.2 Go Compiler gc Plugins NAME VERSION aws 5.33.0 python unknown Host OS amazon Version 2 Arch x86_64 This project is written in python: executable='/usr/local/bin/python3' version='3.10.2 ' Current Stack: /glue-jobs/temp TYPE URN pulumi:providers:aws urn:pulumi:temp::glue-jobs::pulumi:providers:aws::default pulumi:pulumi:Stack urn:pulumi:temp::glue-jobs::pulumi:pulumi:Stack::glue-jobs-temp pulumi:providers:aws urn:pulumi:temp::glue-jobs::pulumi:providers:aws::default_5_33_0 pulumi:providers:pulumi urn:pulumi:temp::glue-jobs::pulumi:providers:pulumi::default aws:s3/bucketObject:BucketObject urn:pulumi:temp::glue-jobs::aws:s3/bucketObject:BucketObject::slow_changing_dimensions/utils_.py aws:s3/bucketObject:BucketObject urn:pulumi:temp::glue-jobs::aws:s3/bucketObject:BucketObject::slow_changing_dimensions/scd.py pulumi:pulumi:StackReference urn:pulumi:temp::glue-jobs::pulumi:pulumi:StackReference::/glue-jobs/iam aws:glue/job:Job urn:pulumi:temp::glue-jobs::aws:glue/job:Job::slow_changing_dimensions_temp Found no pending operations associated with temp Backend Name pulumi.com URL https://app.pulumi.com/ User Organizations Dependencies: NAME VERSION chispa 0.9.2 flake8-black 0.3.6 glue-on-pulumi 0.1.0 isort 5.12.0 pip 23.0.1 pytest 7.2.2 python-dotenv 1.0.0 setuptools 67.4.0 wheel 0.38.4 Pulumi locates its logs in /tmp by default ```

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Frassle commented 1 year ago

Be in a pulumi project in a git repository Create a new stack Run pulumi stack tag ls Check that vcs: tags are missing

So that's expected, we don't lookup and set the tags until we do an update. But it sounds like from your earlier description that in this new iam stack you did run up and the tags were still missing?

wtfzambo commented 1 year ago

you did run up and the tags were still missing?

Yes sorry, I forgot to add that step. I did indeed run pulumi up, and nonetheless the tags didn't get set. I will update the description.

As a side note, I tested the same issue switching filesystem (so now the container mounts Windows files), but the same issue persists.

I thought it might be due to some UID / GID Linux shenanigans but that doesn't seem to be the case.