-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add --runtime argument to gcloud deploy in README. #1595
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
👋 @emilyaherbert thanks for opening a pull request. @ace-n Could you have a look please. Thanks. |
@labtopia what are your thoughts on this? (We'd have to keep this file up to date.) @emilyaherbert thanks for the PR! If @labtopia is in favor of this change, would you mind updating the other files listed here as well? 🙂 cc @grant as FYI, too. |
The README is inaccurate as is, so I'm in favor of fixing it. The problem with listing a specific runtime flag is that they can quickly go out of date. If you want to future-proof it, you could put a variable there instead of a hard-coded value. See what we did here: https://cloud.google.com/functions/docs/deploying/filesystem#deploy_using_the_gcloud_tool In the table below, we also link to the gcloud reference for the complete list of valid values for --runtime. You might want to do something like that. |
Changing all |
Cool beans, I'll work on this PR! |
Updated! |
@emilyaherbert Thanks for updating the other files! @labtopia would it be better to use explicit runtime versions here, given that GitHub docs are usually more focused on "getting things working" than a full conceptual explanation? |
It's a tradeoff. You know this audience better than I do. Specifying explicit runtimes is fine; it just means the docs will go out of date more frequently, and users won't necessarily know where to look for more info when that happens. |
gcloud requires a
--runtime
argument when deploying new functions, otherwise the user sees:ERROR: (gcloud.functions.deploy) Missing required argument [runtime]: Flag
--runtimeis required for new functions.
This addition is consistent with the tutorial (https://cloud.google.com/functions/docs/tutorials/http).