-
Notifications
You must be signed in to change notification settings - Fork 63
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
Ability to create 2nd Gen functions #304
Comments
Thanks for the FR @vishnumenon |
@bharathkkb Sounds good, I'll give that approach a try! Thanks! |
@bharathkkb Is there an update on when this Action will support the ability to set it to deploy using Gen2? |
Hi @jwilksy Cloud Functions are still in Preview (https://cloud.google.com/functions/docs/2nd-gen/overview). |
Has someone information about release date 2ng generation? |
This is now in GA - https://cloud.google.com/blog/products/serverless/cloud-functions-2nd-generation-now-generally-available Can the maintainers provide an update on if/when this will be supported? Thanks! |
I created this PR to see if we can have this available through this action. I'm available to contribute to this. Please let me know what else is necessary here. |
This feature would be tremendously helpful. Any ETA on this? |
+1 would be super helpful to have this as part of the existing github action |
@sethvargo +100500 this is also extremely useful feature (and this #350) It is unclear when Google Cloud Repositories will support Cloud Functions gen 2 |
Right now i see errors related to Functions gen 2 like: cannot create a function because it already exists in gen 2 |
We do not currently support Cloud Functions gen2. If you need support for gen2, you can use the |
@sethvargo I think most of us in this thread understand this is not currently supported and the possible alternative(s). I think we'd more like to know if this would be available in the near future vs. later (next weeks vs. months/years), so we can accordingly plan to rewrite our pipelines or simply hold off until the feature becomes available within github actions itself. |
If you are interested in Cloud Functions gen 2 and perhaps you write in Go,
and your deployment command might look like having configured alternatives, i could say that options above are much easier to configure than others. |
2gen is no longer beta yes? :) |
yes, they are good for production now. |
Any news? |
@maxpain i would suggest you use |
I made its working by using Here is an example:
|
The existing deploy-cloud-functions GHA is limited to only running CloudFunction V1. This attempts to run the deploy command directly from gcloud instead and deploys the function in multiple regions Github Issue: google-github-actions/deploy-cloud-functions#304
* feat: Deploy cloud function in multiple regions The existing deploy-cloud-functions GHA is limited to only running CloudFunction V1. This attempts to run the deploy command directly from gcloud instead and deploys the function in multiple regions Github Issue: google-github-actions/deploy-cloud-functions#304 * ci(stage-build): fix function deployment Fixes typos and splits the --set-env-vars/--set-secrets options. * Update .github/workflows/stage-build.yml Co-authored-by: Claas Augner <[email protected]> * Update stage-build.yml * Update .github/workflows/stage-build.yml Co-authored-by: Claas Augner <[email protected]> --------- Co-authored-by: Claas Augner <[email protected]> Co-authored-by: Claas Augner <[email protected]>
@sethvargo @bharathkkb are you planning to add support for this in the (near) future? |
So I have to use a workaround to deploy a gen2 function? It shouldn't be this hard to add CD to a cloud function. |
+1 i'd be very interested on this too 😄 |
above you can find solutions for Golang and Node, nothing difficult to use that for other runtimes. |
can we still have the curl for testing the output URL? |
It's not pretty, but you should be able to get the URL via the For example - nam: Get url
id: get-url
run: echo "url=$(gcloud functions describe function-name-here --gen2 --region europe-west2 --format json | jq .url -r)" >> $GITHUB_OUTPUT Just make sure you get the name and region right The above step will store the url of the function under "url" which you can reference like this
|
Any ETA on 2nd gen support? |
I would love to contribute to the gen2 feature support if it's just a concern of bandwidth and no other technical or roadmap limitations @sethvargo @bharathkkb. Let us know, please. |
Nudge on the 2nd gen pls…or I guess if you can point to a interim solution, thank you |
+1 on this too, support for 2nd gen would help us a lot |
Alright, so here's the situation with 2nd generation Cloud Functions... Creating second generation cloud functions is only available via the v2 Cloud Functions API (cloudfunctions.googleapis.com/v2), which is significantly different from the v1 endpoint. For example, compare the resource definitions of functions:
In addition to new fields, there are remove fields between the two API versions (as is expected in major version revisions). It's possible to deploy both 1st generation and 2nd generation Cloud Functions via the v2 endpoint, but the entire surface of this GitHub Action needs to change to support that, given the significantly different fields and structure (see #409). Given the relatively little overlap, it's difficult to create an "interim" release that supports both the v1 and v2 APIs, so I think the only path forward is to do major breaking changes to the surface for the GitHub Action that supports the v2 APIs (and thus 2nd generation functions). Thoughts? |
@sethvargo Sounds about right to me. I would expect a major version update to come with breaking changes (that's the point) so any related tooling may also break. I'm in favour of whatever makes it easier and faster for you to ship this, especially since there's currently no "official" way to deploy a v2 Function via GH Actions. |
This PR moves everything to use the `v2` API and adopts the "GEN_2" function type. This is a major breaking change that should be released as v3. As per our support policy, we will support v2 and v3, with v2 receiving critical bug fixes. We will drop support for v1. - Fixes #304 - Closes #384 (N/A in GEN_2) - Fixes #373 - Closes #399 (Cloud Functions recommends against CI/CD systems controlling IAM permissions) - Closes #9 (N/A)
Finally? Wow! |
TL;DR
I'd love to take advantage of the new 2nd Gen cloud functions, and it'd be great to deploy them with github actions. Ideally, I'd like to specify the generation of the cloud function as an input in the yaml. Is there currently any way to deploy a 2nd Gen cloud function with a github action, using this repo or another one?
Detailed design
Additional information
No response
The text was updated successfully, but these errors were encountered: