mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
OSS CI: skip bundle size reporting for *-stable branches
Summary: The size information is currently not used for release branches. Further, the CI step failed because there is no PR associated with commits in RC branch. This commit fixed that error by skipping the entire work altogether. Sample error: https://app.circleci.com/pipelines/github/facebook/react-native/10161/workflows/3625732a-531f-435d-83b6-1dbc638e1bab/jobs/215405/parallel-runs/0/steps/0-125 In theory, we should be storing RC bundle sizes as well, but the current backing Firebase DB has not been configured with proper index: ``` Error [FirebaseError]: The query requires an index. ... ``` Changelog: [Internal] Reviewed By: lunaleaps Differential Revision: D31705912 fbshipit-source-id: 26757174f7937cb23d8e55066b833ae15ec011e3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f3eb675d23
commit
f319c1aa61
@@ -47,6 +47,7 @@ async function reportSizeStats(stats, replacePattern) {
|
||||
);
|
||||
const collection = datastore.getBinarySizesCollection(store);
|
||||
|
||||
// Collect the current sizes for main branch only.
|
||||
if (GITHUB_REF === 'main') {
|
||||
// Ensure we only store numbers greater than zero.
|
||||
const validatedStats = Object.keys(stats).reduce((validated, key) => {
|
||||
@@ -65,6 +66,8 @@ async function reportSizeStats(stats, replacePattern) {
|
||||
validatedStats,
|
||||
);
|
||||
}
|
||||
} else if (GITHUB_REF.endsWith('-stable')) {
|
||||
console.log(`Skipping bundle size reporting for branch: ${GITHUB_REF}`);
|
||||
} else {
|
||||
const document = await datastore.getLatestDocument(collection);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user