Skip to content

Question -> cloud event support could possibly break the API during CF update #30

Closed
@lwsanty

Description

@lwsanty

First of all sorry for a confusing question, but we experience a weird behavior during using terraform since yesterday hashicorp/terraform-provider-google#6662

What happens is that terraform uses gcp api to update the cloud function that is triggered by pub sub, however during the build there's an error referencing to the wrong function handler signature: unexpectedly it requires http handler

Error: Error waiting for Updating CloudFunctions Function: Error code 3, message: Build failed: # serverless_function_app/main
src/serverless_function_app/main/main.go:24:38: cannot use metadata.SlackNotifyFunc (type func(context.Context, *pubsub.Message) error) as type func(http.ResponseWriter, *http.Request) in argument to funcframework.RegisterHTTPFunction; Error ID: 6191efcd
  on main.tf line 595, in resource "google_cloudfunctions_function" "slack_notify":
 595: resource "google_cloudfunctions_function" "slack_notify" {

googling this error and funcframework.RegisterHTTPFunction led us to this repo.

Question Is there any chance that this PR #29 could have an aforementioned impact on that build error? If yes, how can we fix it from the api caller side? If not, could you please suggest us any other directions to investigate?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions