Skip to content

Mila/new types #9133

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

Closed
wants to merge 93 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
0716bd7
Add new BSON types to public API (#330)
milaGGL Mar 10, 2025
3c743b2
Implement indexing for bson types (#331)
milaGGL Mar 11, 2025
82f32ca
rename BsonTimestampValue class to BsonTimestamp (#333)
milaGGL Mar 14, 2025
1df3d26
Fix Data Connect Types (#8898)
maneesht Apr 4, 2025
66a09f2
test(vertexai): update mock responses to v8 (#8904)
dlarocque Apr 8, 2025
b332825
Fix: display WebChannel error message (#8907)
milaGGL Apr 9, 2025
4e0f630
test(vertexai): add `backendName` param to mock response getters (#8906)
dlarocque Apr 9, 2025
ed0803a
fix: remove `null` value inclusion from `!=` and `not-in` filter resu…
milaGGL Apr 11, 2025
e055e90
Add assertion IDs that will be included in production log statements …
MarkDuckworth Apr 14, 2025
8bb66c2
docs(vertexai): remove HTML `<code>` tags (#8900)
dlarocque Apr 15, 2025
0cbff6b
test(vertexai): update developerapi mock response dir to googleai (#8…
dlarocque Apr 15, 2025
1363ecc
Fix languageCode parameter in action_code_url (#8912)
pashanka Apr 16, 2025
a0bcc9a
Merge main into release
google-oss-bot Apr 22, 2025
20b45d3
test(vertexai): update mock responses to v10 (#8959)
dlarocque Apr 23, 2025
b204e71
Version Packages (#8956)
google-oss-bot Apr 24, 2025
9952dbc
Merge branch 'release'
dlarocque Apr 24, 2025
fbf7222
Port BSON code updates from other sdks (#341)
milaGGL Apr 25, 2025
0e2558a
Improve the integration test coverage for online vs offline compariso…
ehsannas Apr 28, 2025
dd6a8f0
fix(vertexai): add missing quote to chat role error message (#8979)
dlarocque Apr 29, 2025
ea1f913
Auto Enable SSL for Firebase Studio (#8980)
maneesht Apr 29, 2025
0e12766
Add support for running the emulators in Cloud Workstation (#8968)
maneesht Apr 30, 2025
080a90d
Add Cookie Support For Firebase Studio (#8986)
maneesht May 1, 2025
ac59a1c
Remove FieldValue factory methods (#342)
milaGGL May 1, 2025
8cfdc53
Merge remote-tracking branch 'origin/main' into bson-feature
ehsannas May 2, 2025
4600a34
Create seven-actors-kneel.md
ehsannas May 2, 2025
136bb73
Merge main into release
google-oss-bot May 5, 2025
cbba951
resolve TODOs
milaGGL May 5, 2025
6a02778
Fix Auth Port for Firebase Studio (#8998)
maneesht May 5, 2025
3789b5a
Change automaticDataCollectionEnabled to default to true. (#8999)
hsubox76 May 7, 2025
f7ec278
Merge main into release
google-oss-bot May 7, 2025
d5428f3
Version Packages (#8997)
google-oss-bot May 7, 2025
51e7b48
Roll back #8999 (#9007)
hsubox76 May 7, 2025
9900a6a
Merge main into release
google-oss-bot May 7, 2025
f8334ea
Version Packages (#9008)
google-oss-bot May 7, 2025
050c1b6
fix(vertexai): pass `GenerativeModel`'s `BaseParams` to `ChatSession`…
dlarocque May 8, 2025
e99683b
feat(vertexai): Gemini multimodal output (#8922)
dlarocque May 8, 2025
88584fd
test: Clean up vscode launch file and add vertexai debug config (#9000)
dlarocque May 8, 2025
8a03143
Fix encoding of CSI keys in Safari (#8993)
MarkDuckworth May 9, 2025
6be75f7
Restore #8999 (#9010)
hsubox76 May 12, 2025
d5082f9
feat(ai): Migrate to `AI` and add GoogleAI support (#8931)
dlarocque May 12, 2025
72852e1
Add Emulator Overlay (#8977)
maneesht May 12, 2025
39505cc
Rename `@firebase/vertexai` package to `@firebase/ai` (#9011)
dlarocque May 12, 2025
8593fa0
Add Emulator Overlay (#8977) (#9031)
hsubox76 May 13, 2025
bf8c3d1
add temporary release branch (#9032)
hsubox76 May 13, 2025
f92069a
Allow custom branch for release (#9033)
hsubox76 May 13, 2025
3a203e6
Merge at-11-7-1 into release
google-oss-bot May 13, 2025
799de59
restore Vertex token for temp publish (#9036)
hsubox76 May 13, 2025
9338d9d
Version Packages (manual PR) (#9034)
hsubox76 May 14, 2025
9bcd1ea
Fixed scroll behavior (#9043)
maneesht May 14, 2025
1e91c24
Merge at-11-7-1 into release
google-oss-bot May 14, 2025
8601ecb
Version Packages (manual PR) (#9044)
hsubox76 May 14, 2025
a5bacaf
Merge branch 'release' into ch-release-merge
hsubox76 May 15, 2025
5b53905
Remove redundant changeset
hsubox76 May 15, 2025
3d9291f
Merge pull request #9049 from firebase/ch-release-merge
hsubox76 May 15, 2025
880110b
Update e2e tests to reflect AI package and new API (#9017)
hsubox76 May 15, 2025
e4297f7
Merge main into release
google-oss-bot May 15, 2025
2fe7547
Version Packages (#9016)
google-oss-bot May 20, 2025
35ad526
Revert "Fixed scroll behavior (#8977)" (#9053)
maneesht May 20, 2025
e96410a
Merge main into release
google-oss-bot May 20, 2025
b5df4ae
Updated to only show banner when calling connect*Emulator (#9055)
maneesht May 21, 2025
4ead831
Merge main into release
google-oss-bot May 21, 2025
770e455
Version Packages (#9054)
google-oss-bot May 22, 2025
9964849
Close webchannel instances on terminate (#9041)
MarkDuckworth May 22, 2025
d5e5795
Reorder reporters to prevent log message duplication in CI (#9040)
MarkDuckworth May 22, 2025
ec91a86
docs(ai): Fix 'occured' typo in error codes (#9021)
dlarocque May 27, 2025
8cb21ff
feat(ai): Add `HarmBlockThreshold.OFF` (#9050)
dlarocque May 27, 2025
40be2db
feat(ai): Schema `title`, `maximum`, `minimum`, and `propertyOrdering…
dlarocque May 27, 2025
1933324
feat(ai): Add support for `minItems` and `maxItems` to `Schema` (#9026)
dlarocque May 28, 2025
af9f8b5
Build out e2e subdirectories (#9065)
hsubox76 May 30, 2025
30de503
Added test project to fdc (#8924)
maneesht May 30, 2025
9be10d9
Merge main into release
google-oss-bot Jun 3, 2025
89051ca
Version Packages (#9073)
google-oss-bot Jun 5, 2025
d590889
test(ai): add integration tests (#8853)
dlarocque Jun 5, 2025
5871fd6
Update issue template to rename VertexAI > AI (#9074)
hsubox76 Jun 5, 2025
6cc9a07
ci: Fix Firefox error and streamline cross-browser tests (#9015)
hsubox76 Jun 5, 2025
c0617a3
Fixed issue where requestSts wasn't including the Studio cookie in it…
maneesht Jun 5, 2025
0f891d8
Fix issue where we ping an endpoint that hasn't been implemented (#9059)
maneesht Jun 6, 2025
2306920
Updated firebase auth changeset (#9088)
maneesht Jun 9, 2025
db2c5a5
Merge main into release
google-oss-bot Jun 10, 2025
a058309
build(all): Version Packages v11.9.1 (#9089)
google-oss-bot Jun 10, 2025
7fb64dd
test(ai): Upgrade mock responses to v14 (#9091)
dlarocque Jun 13, 2025
13e6cce
Feat/google3 typings support (#9085)
eranc-google Jun 17, 2025
b97eab3
fix(ai): Add deprecation tag to `totalBillableCharacters` (#9090)
dlarocque Jun 18, 2025
41e3c4c
test(ai): Add `gemini-2.5-flash` to integration tests (#9110)
dlarocque Jun 20, 2025
f73e08b
firestore: minor refactor of listener registration of "versionchange"…
dconeybe Jun 20, 2025
42ac401
Fixed issue where storage wasn't passing cookies when using firebase …
maneesht Jun 23, 2025
bb57947
fix: Add "react-native" entry point to @firebase/app (#9112)
hsubox76 Jun 23, 2025
7ae5b12
Feat(Firestore) JSON serialization of types to improve SSR support. (…
DellaBitta Jun 23, 2025
86155b3
chore(Firestore) add changeset for PR #8926 (#9115)
DellaBitta Jun 23, 2025
3d44792
Update Fireperf logging to use sendBeacon only if the payload is unde…
raymondlam Jun 26, 2025
b640454
Add decimal128 to new types (#344)
milaGGL Jun 27, 2025
38faba5
Merge remote-tracking branch 'origin-public/main' into mila/new-types
ehsannas Jun 27, 2025
60fd076
Fix merge conflicts.
ehsannas Jun 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Close webchannel instances on terminate (#9041)
Explicitly close any unclosed WebChannel instances on Firestore#terminate()
  • Loading branch information
MarkDuckworth authored May 22, 2025
commit 9964849e9540f08d02fa3825ecec32c1bfedc62d
5 changes: 5 additions & 0 deletions .changeset/spotty-ghosts-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@firebase/firestore": patch
---

Clean up leaked WebChannel instances when the Firestore instance is terminated.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ export class WebChannelConnection extends RestConnection {
private readonly useFetchStreams: boolean;
private readonly longPollingOptions: ExperimentalLongPollingOptions;

/** A collection of open WebChannel instances */
private openWebChannels: WebChannel[] = [];

constructor(info: DatabaseInfo) {
super(info);
this.forceLongPolling = info.forceLongPolling;
Expand Down Expand Up @@ -239,6 +242,7 @@ export class WebChannelConnection extends RestConnection {
request
);
const channel = webchannelTransport.createWebChannel(url, request);
this.addOpenWebChannel(channel);

// WebChannel supports sending the first message with the handshake - saving
// a network round trip. However, it will have to call send in the same
Expand Down Expand Up @@ -321,6 +325,7 @@ export class WebChannelConnection extends RestConnection {
`RPC '${rpcName}' stream ${streamId} transport closed`
);
streamBridge.callOnClose();
this.removeOpenWebChannel(channel);
}
});

Expand Down Expand Up @@ -427,4 +432,32 @@ export class WebChannelConnection extends RestConnection {
}, 0);
return streamBridge;
}

/**
* Closes and cleans up any resources associated with the connection.
*/
terminate(): void {
// If the Firestore instance is terminated, we will explicitly
// close any remaining open WebChannel instances.
this.openWebChannels.forEach(webChannel => webChannel.close());
this.openWebChannels = [];
}

/**
* Add a WebChannel instance to the collection of open instances.
* @param webChannel
*/
addOpenWebChannel(webChannel: WebChannel): void {
this.openWebChannels.push(webChannel);
}

/**
* Remove a WebChannel instance from the collection of open instances.
* @param webChannel
*/
removeOpenWebChannel(webChannel: WebChannel): void {
this.openWebChannels = this.openWebChannels.filter(
instance => instance === webChannel
);
}
}