Rework apps, update admin, remove lodash#1144
Merged
inlined merged 3 commits intolaunch.nextfrom Jun 27, 2022
Merged
Conversation
colerogers
requested changes
Jun 21, 2022
Contributor
colerogers
left a comment
There was a problem hiding this comment.
Couple leftover comments
src/common/app.ts
Outdated
| import { | ||
| App, | ||
| applicationDefault, | ||
| // getApp as getAppNamed, |
src/common/app.ts
Outdated
| export function getApp(): App { | ||
| // if (typeof cache === 'undefined') { | ||
| // cache = getAppNamed(/* default */); | ||
| // } |
taeold
approved these changes
Jun 21, 2022
| logger, | ||
| }; | ||
|
|
||
| export const app = { setEmulatedAdminApp }; |
Contributor
There was a problem hiding this comment.
sigh I wish I knew why this function is needed for the emulator to work.
(I have a theory that this is just a historical artifact before admin sdk natively supported the emulator)
| * N.B. For clarity for use in testing this name has no mention of emulation, but | ||
| * it must be exported from index as app.setEmulatedAdminApp or we break the emulator. | ||
| * We can remove this export when: | ||
| * A) We complete the new emulator and no longer depend on monkeypatching |
Contributor
There was a problem hiding this comment.
actively researching this. I think recent versions of the admin sdk doesn't rely on this monkey patching, and I'll try to confirm/deny this.
Member
Author
|
@colerogers You left this with a change request. Does uncommenting those lines fix everything? |
colerogers
approved these changes
Jun 27, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change involved a number of small things that kinda got smushed together. Sorry.
beforeandafterinmakeCloudFunction. Importantly, we will now share the default app if it already exists when we need it. This should help consolidate network connections/caches. OTOH, it could lead to subtle bugs. Push back if you think this optimization is too dangerous.launch.nextalready, I switched over to the v10 syntax so that we load fewer files on demand.