Skip to content

Conversation

@gaearon
Copy link
Collaborator

@gaearon gaearon commented Dec 18, 2017

This should ensure that CI always displays correct build file difference. A prerequisite for #11865.

We might actually want to delete that file from the repo and always download it during the local build. Then we can delete it from the repo, always have accurate stats on local builds, and solve merge conflicts. But then we need to make sure we bail out gracefully if network fails.

# Update the local size measurements to the master version
# so that the size diff printed at the end of the build is
# accurate.
curl -o scripts/rollup/results.json http://react.zpao.com/builds/master/latest/results.json
Copy link
Contributor

Choose a reason for hiding this comment

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

I hesitate to bring it up, but should we move this to reactjs.org?

Not that, like, @zpao will hold our build ransom or anything :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah maybe :-) I don't care strongly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, no worries. We need to figure out static hosting for the fixtures too. Maybe we can figure this out when/if we deal with that.

@gaearon gaearon merged commit 247c524 into facebook:master Dec 18, 2017
@gaearon
Copy link
Collaborator Author

gaearon commented Dec 18, 2017

Verified it shows 0% as expected.

@sophiebits
Copy link
Collaborator

Won't this compare PRs that may not be based off master against master? Since we don't merge/rebase afaik. You want to compare against the parent commit…

@gaearon gaearon deleted the download-sizes branch December 18, 2017 19:18
@gaearon
Copy link
Collaborator Author

gaearon commented Dec 18, 2017

Yea, so I'm not sure about that. What is the thing we want to show? In my experience branching off to explore size savings I still end up wanting to compare to master since that's where the branch will ultimately go.

@sophiebits
Copy link
Collaborator

sophiebits commented Dec 18, 2017

I'm thinking of the (most common) case where PRs are independent. A big size increase lands in master. You send a one-line PR based on the commit before that. You get blamed for the size increase.

Certainly in cases where we expect two PRs to interact it's sort of relevant to compare against master, but in that case we should just rebase the PR manually anyway.

@gaearon
Copy link
Collaborator Author

gaearon commented Dec 18, 2017

Hmm. Looks like there's no easy way to get results.json by commit hash on http://react.zpao.com/. Directory names include a timestamp, e.g. http://react.zpao.com/builds/master/1513623398-247c5241706356033cd5bf1dc31197e058853e13/.

I'll chat to @zpao and see what we can do.

@sophiebits
Copy link
Collaborator

Another option could be to use the CircleCI artifacts API but it looks like that also doesn't have a trivial commit -> artifact API.

@zpao
Copy link
Member

zpao commented Dec 18, 2017

Chatted with @gaearon - The timestamp is based off the commit, so it's fairly easy to rebuild (though you do have to shell out). Here's the upload step: https://github.com/facebook/react/blob/master/scripts/circleci/upload_build.sh#L15, just need to add -r SHA to grab a specific commit.

But I'll can also make it so that we have symlinks directly into the right folder. That's a totally reasonable thing to want, I think I've wanted it before too…

@gaearon
Copy link
Collaborator Author

gaearon commented Dec 18, 2017

#11883

yenshih pushed a commit to yenshih/react that referenced this pull request Jan 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants