Skip to content

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

Merged
merged 3 commits into from
Oct 9, 2020
Merged

Conversation

ace-n
Copy link

@ace-n ace-n commented Oct 7, 2020

No description provided.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 7, 2020
@ace-n ace-n marked this pull request as ready for review October 7, 2020 04:20
@ace-n ace-n requested review from grant and a team as code owners October 7, 2020 04:20
@ace-n ace-n added the automerge Merge the pull request once unit tests and other checks pass. label Oct 7, 2020
@gcf-merge-on-green
Copy link
Contributor

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

@product-auto-label product-auto-label bot added api: cloudfunctions Issues related to the Cloud Run functions API. samples Issues that are directly related to samples. labels Oct 7, 2020
@gcf-merge-on-green
Copy link
Contributor

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.

@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 7, 2020
@@ -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')
Copy link
Contributor

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

Copy link
Author

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?

Copy link
Collaborator

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.

@tmatsuo tmatsuo merged commit cfae128 into master Oct 9, 2020
@tmatsuo tmatsuo deleted the fix-b151080185 branch October 9, 2020 17:15
craiglabenz pushed a commit that referenced this pull request Nov 2, 2020
Co-authored-by: Takashi Matsuo <tmatsuo@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudfunctions Issues related to the Cloud Run functions API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants