Skip to content

Commit d241de9

Browse files
tido64facebook-github-bot
authored andcommitted
Fix app bundle size diff not always being compared against latest commit (#28368)
Summary: - Timestamp of entries in our Firebase instance sometimes get stored as number. This means that we may not always be diffing against the latest master commit. - Size report of Android and iOS gets overwritten depending on which build finishes first. ## Changelog [Internal] [Fixed] - App bundle size diff not always being compared against latest commit [Internal] [Fixed] - Android and iOS app bundle size diff overwrite each other Pull Request resolved: #28368 Test Plan: - We are now using Firebase's own [firebase.firestore.Timestamp.now](https://firebase.google.com/docs/reference/js/firebase.firestore.Timestamp#now) to ensure that we always get a timestamp in the preferred format. This has been tested locally but can only be verified when merged to master and we start getting new data. In the meantime, I'll manually fix up all the entries in the store. - There should be one app bundle size comment for Android and one for iOS in this PR. Reviewed By: cpojer Differential Revision: D20601620 Pulled By: hramos fbshipit-source-id: 0c3e4b78a74cbd659f1957a6aa74322b016e0646
1 parent 14b423e commit d241de9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bots/datastore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function getBinarySizesCollection(firestore) {
8989
function createOrUpdateDocument(collection, sha, data) {
9090
const stampedData = {
9191
...data,
92-
timestamp: Date.now(),
92+
timestamp: firebase.firestore.Timestamp.now(),
9393
};
9494
const docRef = collection.doc(sha);
9595
return docRef.update(stampedData).catch(async error => {

bots/report-bundle-size.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function report(target) {
163163
'android-jsc-x86': android_getApkSize('jsc', 'x86'),
164164
'android-jsc-x86_64': android_getApkSize('jsc', 'x86_64'),
165165
},
166-
'| android | hermes | arm',
166+
'\\| android \\| hermes \\| arm',
167167
);
168168
break;
169169

@@ -174,7 +174,7 @@ function report(target) {
174174
'RNTester/build/Build/Products/Release-iphonesimulator/RNTester.app/RNTester',
175175
),
176176
},
177-
'| ios | - | universal |',
177+
'\\| ios \\| - \\| universal \\|',
178178
);
179179
break;
180180

0 commit comments

Comments
 (0)