You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For docs on the public preview, see the firebase docs. Upgrading to v2 would allow for easier cors configuration, but more importantly it adds support for concurrency which might save a lot on cold start times; for API especially, I'm not sure keeping one instance always warm is enough to eliminate huge startup costs on multiple requests.
The issue for WATT is that we can't adopt the gradual upgrade strategy described in the docs where v1 and v2 functions exist in the same codebase because sgyAuth and sgyFetch rely on functions.config(), a method that is removed in v2 in favor of secrets and environment variables. Updating those functions to v2 would require moving .runtimeconfig.json to .env.local like
SGY_KEY=...
SGY_SECRET=...
and rewriting sgyOAuth to use process.env.SGY_KEY and process.env.SGY_SECRET (this might require making a new instance of oauth per request due to secrets being function-scoped). However, sgyAuth and sgyFetch are all callable functions and suffer from caveats while v2 functions are in beta that require changing
and because v2 function URLs are non-deterministic this URL would need to be updated every time the function is changed and redeployed.
If cold starts end up becoming a huge deal, we might want to upgrade to v2 despite these limitations, but otherwise we can wait until cloudfunctions.net URLs are supported.
The text was updated successfully, but these errors were encountered:
For docs on the public preview, see the firebase docs. Upgrading to v2 would allow for easier
cors
configuration, but more importantly it adds support for concurrency which might save a lot on cold start times; for API especially, I'm not sure keeping one instance always warm is enough to eliminate huge startup costs on multiple requests.The issue for WATT is that we can't adopt the gradual upgrade strategy described in the docs where v1 and v2 functions exist in the same codebase because
sgyAuth
andsgyFetch
rely onfunctions.config()
, a method that is removed in v2 in favor of secrets and environment variables. Updating those functions to v2 would require moving.runtimeconfig.json
to.env.local
likeand rewriting
sgyOAuth
to useprocess.env.SGY_KEY
andprocess.env.SGY_SECRET
(this might require making a new instance of oauth per request due to secrets being function-scoped). However,sgyAuth
andsgyFetch
are all callable functions and suffer from caveats while v2 functions are in beta that require changingto something like
and because v2 function URLs are non-deterministic this URL would need to be updated every time the function is changed and redeployed.
If cold starts end up becoming a huge deal, we might want to upgrade to v2 despite these limitations, but otherwise we can wait until
cloudfunctions.net
URLs are supported.The text was updated successfully, but these errors were encountered: