-
Notifications
You must be signed in to change notification settings - Fork 383
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
GoogleAuth#getProjectId vs. GoogleAuth#getDefaultProjectId #389
Comments
IOW, this test (#388) makes sense to pass for |
@JustinBeckwith it seems like the behaviour of |
Yikes. You're totally right. In the spirit of semver, what do you think makes the most sense here? I broke the behavior in a semver minor change. Would it be semver minor to change it back? Or does it make more sense to do a major rev? |
IMO fixing the bug would be a semver-patch. Opinions might differ if the bug existed for a very long time and people expected the buggy behavior to be the actual behavior. That's not the case here. |
Taking a closer look here - I don't think having a method that just gets the default projectId is actually valuable. Happy to hear scenarios if you think it is 🤷♂️ Given that, I prefer just deleting the |
👍 on removing |
Fixed in #402 |
These are synonyms of each other, but given then name, these should NOT be.
I would intuit that
getDefaultProjectId
always gives the default project Id as per the environment (GCLOUD_PROJECT, GOOGLE_APPLICATION_CREDENTIALS, fetch from metadata service, etc.) and never the configured one. As named, it is intuitively incorrect for it to return the configured projectId.I don't see a reason why both of these names should exist, unless we want to support both behaviours.
IMO,
getDefaultProjectId
should be dropped. If we want to keep both names, they should do what their names say they do.The text was updated successfully, but these errors were encountered: