-
Notifications
You must be signed in to change notification settings - Fork 66
Pubsub msgs lost during redeployment when event_trigger_service is pubsub #419
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
Comments
Hi @TheRealVincentVanGogh - we're calling the Cloud Functions API here, which says "service" is for gen_1 functions only. |
Ahh gotcha, thanks! I wonder if the I see 2 references to deploy-cloud-functions/src/main.ts Line 95 in 043573c
deploy-cloud-functions/src/main.ts Line 153 in 043573c
|
Hi @TheRealVincentVanGogh - there are many changes between the v1 and v2 API (and gen1 vs gen2). Part of the reason we released a new major version was that the migration path and deprecation warnings were a minefield of untestable spaghetti code. Are you able to confirm that things work as-expected when |
Yup 👍 everything works as-expected when
but that leaving that parameter in does have an undocumented effect on the gen 2 deployment process (loss of queued up / retrying pubsub msgs) All in all though, it's a small thing-- just wanted to leave a clear paper trail in case someone else bumps into this issue. And yes! adding some validations sounds like a good idea. Thanks! |
Oh, that's quite odd. GitHub Action is supposed to reject undeclared inputs in the action.yml. |
TL;DR
If the event_trigger_service is filled out for Gen 2 cloud function redeploy as
event_trigger_service: pubsub.googleapis.com
, the eventarc trigger is deleted and recreated. This causes pubsub message loss during the trigger recreation process, and any msgs that are processing during deployment may not retry on failure.Expected behavior
If an existing eventarc subscription exists, and
event_trigger_service: pubsub.googleapis.com
, the existing eventarc subscription should be used.Observed behavior
The existing eventarc subscription is deleted and recreated, causing pubsub message loss.
workaround: delete the event_trigger_service variable from the workflow file-- what is this for? it's not in the documentation but it is used in your action.
Action YAML
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: