Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config setting to disable the global project warning isn't working #2829

Closed
pierskarsenbarg opened this issue Jan 8, 2025 · 1 comment · Fixed by #2831
Closed

Config setting to disable the global project warning isn't working #2829

pierskarsenbarg opened this issue Jan 8, 2025 · 1 comment · Fixed by #2831
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@pierskarsenbarg
Copy link
Member

Describe what happened

There is a provider config setting disableGlobalProjectWarning (env var is PULUMI_GCP_DISABLE_GLOBAL_PROJECT_WARNING) that was added last month (PR)

When it is set to be true and you don't have the gcp:project setting in your stack config the warning still appears.

Sample program

  1. Use one of the GCP templates: pulumi new gcp-python -y
  2. Run PULUMI_GCP_DISABLE_GLOBAL_PROJECT_WARNING=true pulumi up (warning should appear)
  3. Run pulumi config set gcp:disableGlobalProjectWarning true
  4. Run pulumi up (warning should appear)

Log output

https://gist.github.com/pierskarsenbarg/678836b38f57134301bdbf0ce2904b20

Affected Resource(s)

n/a

Output of pulumi about

❯ pulumi about
CLI
Version      3.144.1
Go Version   go1.23.4
Go Compiler  gc

Plugins
KIND      NAME    VERSION
resource  gcp     8.13.0
language  python  3.144.1

Host
OS       darwin
Version  15.1.1
Arch     arm64

This project is written in python: executable='/Users/piers/go/src/github.com/pierskarsenbarg/scratchpad/gcp-python-globalproject/venv/bin/python' version='3.13.1'

Current Stack: pierskarsenbarg/gcp-python-globalproject/dev

Found no resources associated with dev

Found no pending operations associated with dev

Backend
Name           pulumi.com
URL            https://app.pulumi.com/pierskarsenbarg
User           pierskarsenbarg
Organizations  pierskarsenbarg, team-ce, demo, ai-demo
Token type     personal

Dependencies:
NAME        VERSION
pulumi_gcp  8.13.0
setuptools  75.7.0
wheel       0.45.1

Pulumi locates its logs in /var/folders/x8/cdd9j87s607fwpy0q62mfmmw0000gn/T/ 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).

@pierskarsenbarg pierskarsenbarg added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 8, 2025
@iwahbe iwahbe self-assigned this Jan 8, 2025
@iwahbe iwahbe removed the needs-triage Needs attention from the triage team label Jan 8, 2025
iwahbe added a commit that referenced this issue Jan 8, 2025
…tWarning

The current "disableGlobalProjectWarning" check happens after the global project warning
has already been displayed, and instead serves to skip the gcloud config validation. This
PR moves the check to the correct place, and puts in tests on the logged output.

Fixes #2829
@iwahbe iwahbe closed this as completed in 3383e28 Jan 10, 2025
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Jan 10, 2025
@pulumi-bot
Copy link
Contributor

This issue has been addressed in PR #2831 and shipped in release v8.13.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants