Skip to content

Commit

Permalink
Update message when users try to update from 1st to 2nd Gen function (#…
Browse files Browse the repository at this point in the history
…7611)

* Update message when users try to update from 1st to 2nd Gen function using the same function name.

CLI has always block the transition 1st Gen to 2nd Gen in the CLI - change here simply update the product name and point users to our public doc that documents changes necessary to transition to 2nd gen function.

Aside: Cloud Run functions doesn't allow for 1st and 2nd gen functions to share the same name.

* messaging nit.

* Say 'see' instead of 'please'.

---------

Co-authored-by: joehan <joehanley@google.com>
  • Loading branch information
taeold and joehan committed Sep 11, 2024
1 parent 4beac36 commit c6defcb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/deploy/functions/release/planner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,8 @@ export function checkForIllegalUpdate(want: backend.Endpoint, have: backend.Endp
export function checkForV2Upgrade(want: backend.Endpoint, have: backend.Endpoint): void {
if (want.platform === "gcfv2" && have.platform === "gcfv1") {
throw new FirebaseError(
`[${getFunctionLabel(
have,
)}] Upgrading from GCFv1 to GCFv2 is not yet supported. Please delete your old function or wait for this feature to be ready.`,
`[${getFunctionLabel(have)}] Upgrading from 1st Gen to 2nd Gen is not yet supported. ` +
"See https://firebase.google.com/docs/functions/2nd-gen-upgrade before migrating to 2nd Gen.",
);
}
}

0 comments on commit c6defcb

Please sign in to comment.