-
Notifications
You must be signed in to change notification settings - Fork 6.6k
chore(functions/pubsub): use consistent param names #4823
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
Conversation
Your PR has attempted to merge for 3 hours. Please check that all required checks have passed, you have an automerge label, and that all your reviewers have approved the PR |
Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, or one of your required reviews was not approved. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot. |
@@ -22,7 +22,7 @@ | |||
|
|||
# Instantiates a Pub/Sub client | |||
publisher = pubsub_v1.PublisherClient() | |||
PROJECT_ID = os.getenv('GCP_PROJECT') | |||
PROJECT_ID = os.getenv('GOOGLE_CLOUD_PROJECT') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these point to the same thing in the Functions environment? https://cloud.google.com/functions/docs/env-var#nodejs_6_nodejs_8_python_37_and_go_111
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch - @grayside I assume this is still the right env var to use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GOOGLE_CLOUD_PROJECT
is the generally correct variable to use and present in some of the older runtimes. It must be user-supplied on deployment for newer runtimes, the current practice is to use the metadata server to get the current projectID.
Co-authored-by: Takashi Matsuo <tmatsuo@google.com>
No description provided.