Skip to content

fix: set invoker when updating a function whose create failed - #10363

Merged
IzaakGough merged 17 commits into
mainfrom
@invertase/fix/invoker-not-set-on-update
Nov 17, 2026
Merged

IzaakGough merged 17 commits into
mainfrom
@invertase/fix/invoker-not-set-on-update

Conversation

@IzaakGough

@IzaakGough IzaakGough commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #8984.

If a v2 function's first deploy failed its health check, later deploys never set who can invoke it, so it stayed uncallable.

The next deploy now finishes that failed create, including the invoker settings.

  • Only failed creates take this path. A failed update leaves the function ACTIVE, so it updates normally, and a function with no invoker binding is not made public.
  • invoker: "private" is still respected, the same as on a normal create.

Tested on a real project: a failed create returns 200 after redeploy, and a private one stays 403.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Fabricator to set a public invoker by default for HTTPS-triggered functions during updates. The implementation simplifies the invoker assignment logic in fabricator.ts by using a falsy check, and the unit tests in fabricator.spec.ts have been updated to verify that setInvokerUpdate is called with the public role by default. I have no feedback to provide as there were no review comments to evaluate.

@cabljac
cabljac self-requested a review April 16, 2026 15:30
@cabljac
cabljac marked this pull request as ready for review April 16, 2026 15:30
…pdate

run.setInvokerUpdate now takes onlyIfUnset so an update with no invoker in
code heals a missing binding without overwriting one that was narrowed by
hand. updateV2Function and updateRunFunction pass it; the branches driven by
explicit config keep writing verbatim.

Drop the private guard from updateV1Function. "private" resolves to an empty
member list, so skipping the call left a function public after it had been
configured private.
@IzaakGough
IzaakGough marked this pull request as draft August 14, 2026 15:03
@IzaakGough
IzaakGough marked this pull request as ready for review October 2, 2026 13:52
Replace the heal-if-unbound approach. A missing binding also describes a
private function, so healing on it could make private functions public.
Instead, the planner flags GCFv2 functions that are FAILED with no service
(a failed create), and the update applies the create-time invoker logic.
@IzaakGough IzaakGough changed the title fix: set public invoker by default on httpsTrigger update fix: set invoker when updating a function whose create failed Oct 2, 2026
@CorieW
CorieW self-requested a review November 12, 2026 13:52
Comment thread src/deploy/functions/release/planner.ts Resolved
@cabljac
cabljac requested a review from wandamora November 12, 2026 17:08
Comment thread src/deploy/functions/release/planner.ts Resolved
@IzaakGough
IzaakGough merged commit c51d53c into main Nov 17, 2026
41 checks passed
@IzaakGough
IzaakGough deleted the @invertase/fix/invoker-not-set-on-update branch November 17, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(deploy-functions): Functions that failed healthcheck during initial deployment will have missing invocation permissions

3 participants