Skip to content

Adjust to new size analysis implementation. #4300

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

Merged
merged 1 commit into from
Jan 15, 2021
Merged

Conversation

yifanyang
Copy link
Contributor

The metrics backend for size analysis is revamped. We should be able to see some UI improvements (a demo report) in the size analysis report.

The new implementation returns 200 (OK) instead of 202 (ACCEPTED). Therefor the script should also treat 200 as success.

@changeset-bot
Copy link

changeset-bot bot commented Jan 15, 2021

⚠️ No Changeset found

Latest commit: 86f0fff

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@google-oss-bot
Copy link
Contributor

Size Analysis Report

Affected Products

No changes between base commit (02dcd92) and head commit (2f2a311).

@yifanyang
Copy link
Contributor Author

@Feiyang1 The original size report are missing. It looks like the that job (Health Metrics / Binary Size (pull_request)) actually failed with:

(node:4844) UnhandledPromiseRejectionWarning: Error: Could not resolve entry module (packages/storage/exp/dist/index.browser.cjs.js).
    at error (/home/runner/work/firebase-js-sdk/firebase-js-sdk/node_modules/rollup/dist/shared/rollup.js:5265:30)
    at ModuleLoader.loadEntryModule (/home/runner/work/firebase-js-sdk/firebase-js-sdk/node_modules/rollup/dist/shared/rollup.js:18454:20)
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
    at Object.main (/home/runner/work/firebase-js-sdk/firebase-js-sdk/node_modules/ts-node/src/bin.ts:198:14)
    at Object.<anonymous> (/home/runner/work/firebase-js-sdk/firebase-js-sdk/node_modules/ts-node/src/bin-script.ts:5:1)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

But it is still marked as success on CI. I recalled that you once had some fix for a similar issue. Is that in?

@Feiyang1
Copy link
Member

Yes, #4010. Is it a case this PR doesn't cover? @yifanyang

@@ -77,7 +77,7 @@ export function upload(
console.log(`Response status code: ${response.statusCode}`);
response.on('data', console.log);
response.on('end', () => {
if (response.statusCode !== 202) {
if (response.statusCode !== 200 && response.statusCode !== 202) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we still accept 202?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for now. The api for the old size report still returns 202. I'm planning to migrate it to 200 as well. I'll remove the 202 here (and a few other places in android repo) when that happens.

@yifanyang
Copy link
Contributor Author

Yes, #4010. Is it a case this PR doesn't cover? @yifanyang

Got it. We can probably investigate on that unhandled reject later. I'm merging this one now to unblock other developers.

@yifanyang yifanyang merged commit f53e5b9 into master Jan 15, 2021
@yifanyang yifanyang deleted the yifany/size-analysis branch January 15, 2021 19:23
@firebase firebase locked and limited conversation to collaborators Feb 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants