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

get_service_account() always cries "warning: etag is deprecated: Deprecated. Do not use." #867

Open
lazcamus opened this issue Apr 25, 2023 · 1 comment
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec

Comments

@lazcamus
Copy link

What happened?

any call to iam.v1.get_service_account() will result in a warning "warning: etag is deprecated: Deprecated. Do not use."

The GetServiceAccountResult complains about a non-None value returned from google for etag at

pulumi.log.warn("""etag is deprecated: Deprecated. Do not use.""")

There's no way to work around this ... Google is providing the etag in the response

Expected Behavior

It shouldn't warn for something that is outside of the caller's control

Steps to reproduce

Call get_service_account() with any valid arguments and receive a result. Observe the warning in the pulumi log.

I'm using this as a workaround for a gcp-native issue where it's difficult to safely handle lookups of service accounts that don't exist

Output of pulumi about

% pulumi about 
CLI          
Version      3.62.0
Go Version   go1.20.2
Go Compiler  gc

Plugins
NAME           VERSION
datadog        4.16.0
docker         4.1.2
gcp            6.53.0
google-native  0.29.0
kubernetes     3.24.3
python         unknown
random         4.12.1

Host     
OS       ubuntu
Version  22.04
Arch     aarch64

This project is written in python: executable='/home/builder/.cache/bazel/_bazel_builder/058865b9fa5c86d53bd0ab6ab265124e/execroot/ritta/bazel-out/aarch64-dbg/bin/infra/pulumi/pulumi.runfiles/python3_10_aarch64-unknown-linux-gnu/bin/python3' version='3.10.9
'

Backend        
Name           1fe8cf7224a1
URL            gs://<redacted>/core
User           builder
Organizations  

Dependencies:
NAME                         VERSION
absl-py                      1.0.0
google-cloud-asset           3.18.0
google-cloud-bigquery        3.9.0
google-cloud-secret-manager  2.12.3
grpcio-status                1.51.3
pip                          22.3.1
pulumi-datadog               4.16.0
pulumi-docker                4.1.2
pulumi-gcp                   6.53.0
pulumi-google-native         0.29.0
pulumi-kubernetes            3.24.3
pulumi-policy                1.5.0
pulumi-random                4.12.1
setuptools                   65.6.3

Pulumi locates its logs in /tmp by default
warning: Failed to get information about the current stack: No current stack

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).

@lazcamus lazcamus added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Apr 25, 2023
@rquitales
Copy link
Contributor

@lazcamus Thanks for reporting this issue and we apologize for the inconvenience caused by this deprecation message. Unfortunately we're not in a position to actively work on this provider right now as we're focusing on the pulumi-gcp provider while this provider is only in preview mode currently. We'll keep this issue open and on our backlog once we can start working on this.

As a follow-up, the etag field is marked as deprecated by the Google Cloud API (https://cloud.google.com/iam/docs/reference/rest/v1/projects.serviceAccounts#ServiceAccount) which results in us auto-generating the deprecation warning message. We'll need to ensure that the deprecation message only occurs when users specify etag when they create a service account, rather than when listing them.

@rquitales rquitales added impact/usability Something that impacts users' ability to use the product easily and intuitively and removed needs-triage Needs attention from the triage team labels Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants