Implement solution to replace error messages with error codes, instead of removing error messages.
🦋 Changeset detected
Latest commit: 833f972f6680f88aadbb39da62bdca517d480187
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 3 packages
| Name | Type |
|---|---|
| @firebase/firestore | Patch |
| firebase | Patch |
| @firebase/firestore-compat | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Changeset File Check :white_check_mark:
- No modified packages are missing from the changeset file.
- No changeset formatting errors detected.
Size Report 1
Affected Products
@firebase/data-connectType Base (933ba9d) Merge (8d4a221) Diff browser 21.4 kB 21.4 kB +5 B (+0.0%) main 23.6 kB 23.7 kB +51 B (+0.2%) module 21.4 kB 21.4 kB +5 B (+0.0%) @firebase/firestoreType Base (933ba9d) Merge (8d4a221) Diff browser 382 kB 384 kB +2.48 kB (+0.6%) main 591 kB 594 kB +3.22 kB (+0.5%) module 382 kB 384 kB +2.48 kB (+0.6%) react-native 382 kB 384 kB +2.47 kB (+0.6%) @firebase/firestore-liteType Base (933ba9d) Merge (8d4a221) Diff browser 113 kB 114 kB +984 B (+0.9%) main 155 kB 157 kB +1.42 kB (+0.9%) module 113 kB 114 kB +984 B (+0.9%) react-native 113 kB 114 kB +984 B (+0.9%) bundle15 size changes
Type Base (933ba9d) Merge (8d4a221) Diff firestore (CSI Auto Indexing Disable and Delete) 272 kB 274 kB +1.95 kB (+0.7%) firestore (CSI Auto Indexing Enable) 272 kB 274 kB +1.95 kB (+0.7%) firestore (Persistence) 304 kB 306 kB +2.18 kB (+0.7%) firestore (Query Cursors) 250 kB 251 kB +1.31 kB (+0.5%) firestore (Query) 248 kB 249 kB +1.31 kB (+0.5%) firestore (Read data once) 236 kB 237 kB +1.28 kB (+0.5%) firestore (Read Write w Persistence) 328 kB 330 kB +2.24 kB (+0.7%) firestore (Realtime updates) 238 kB 239 kB +1.30 kB (+0.5%) firestore (Transaction) 215 kB 216 kB +1.25 kB (+0.6%) firestore (Write data) 214 kB 216 kB +1.20 kB (+0.6%) firestore-lite (Query Cursors) 104 kB 104 kB +702 B (+0.7%) firestore-lite (Query) 99.9 kB 101 kB +702 B (+0.7%) firestore-lite (Read data once) 75.4 kB 75.9 kB +543 B (+0.7%) firestore-lite (Transaction) 101 kB 101 kB +786 B (+0.8%) firestore-lite (Write data) 85.0 kB 85.5 kB +572 B (+0.7%) firebaseType Base (933ba9d) Merge (8d4a221) Diff firebase-compat.js 794 kB 797 kB +2.42 kB (+0.3%) firebase-data-connect.js 17.6 kB 17.9 kB +358 B (+2.0%) firebase-firestore-compat.js 340 kB 342 kB +2.43 kB (+0.7%) firebase-firestore-lite.js 131 kB 132 kB +984 B (+0.7%) firebase-firestore.js 440 kB 443 kB +2.42 kB (+0.5%)
Test Logs
IMO adding 2.4 kB to the bundle size is questionable if it's worth it.
Size Analysis Report 1
This report is too large (723,339 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs
IMO adding 2.4 kB to the bundle size is questionable if it's worth it.
@dconeybe, in your opinion, what increase in bundle size would be acceptable?
It's <=1% increase, which seems like a reasonable tradeoff for making production issues more debuggable. But I'm seeing if I can make the impact smaller.
IMO adding 2.4 kB to the bundle size is questionable if it's worth it.
@dconeybe, in your opinion, what increase in bundle size would be acceptable?
It's <=1% increase, which seems like a reasonable tradeoff for making production issues more debuggable. But I'm seeing if I can make the impact smaller.
I'd hope it would be less than 1kB. But this is just one man's opinion. Please don't take it as gospel truth.
Please let the team know about the 1% increase in code bundle size and make sure they're ok with it. The "firestore (Read Write w Persistence)" bundle increased by 2.77 kB which is probably worth it, but I'd make sure the team knows.
Also, please add a change set with a minor version bump and a change log entry.
FWIW I much prefer the "hashes" you had before over error codes numerically incrementing from zero. The reason is that hashes have much better "SEO" because of their uniqueness. Firstly, the improved SEO allows customers to search for the error code and find relevant bug reports, stack overflow posts, etc. If they search for error code "3" they won't likely get anything useful, but if they search for "jszxcbe37k" they'll likely get results that relate directly to the error that they are experiencing. Likewise, when we as Firestore SDK developers get a bug report with error code "3" it's much more difficult to find its place in the source code than searching for "jszxcbe37k".
For Data Connect I chose this alphabet: [23456789abcdefghjkmnopqrstuvwxyz](https://github.com/firebase/firebase-android-sdk/blob/a0a02a73f67f6447c739d920f614c8bd5331c591/firebase-dataconnect/src/main/kotlin/com/google/firebase/dataconnect/util/AlphanumericStringUtil.kt#L31C45-L31C79) (a length of 32). This alphabet is most of the English lowercase letters and most digits, with those that "look alike" removed (e.g. zero "0" and lowercase-o "o"). This leads to incredibly unique 6-digit strings.
Vertex AI Mock Responses Check :warning:
A newer major version of the mock responses for Vertex AI unit tests is available. update_vertexai_responses.sh should be updated to clone the latest version of the responses: v10.0