-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Master values is always empty - doesn't compare to master size #155
Comments
Hi, thanks for taking the time to write a detailed issue 🙂 bundlesize sets the master values on the first merge/push event on master.
We can definitely improve the messaging to help out with this, suggestions welcome! |
Thanks for the response @siddharthkp ! I tried merging the PR into master and then opening a new PR. It still compares to the defined threshold only, but does not compare the PR size to master. I do have Travis enabled for 'Build branch updates' and 'Build pull request updates' -- those are the two options I see closest to enabling for push events on master. |
Yes, I was only seeing '3.6kb < 4kb', but not '(0.2kb larger than master...)'. I've got it working now -- I had to push directly to master (rather than merge a PR into master) to get the master values to save. So does that mean the master values will only get updated if pushing directly to master? |
No, merge commits should work as well 🤔 Does your |
My .travis.yml only runs the build steps and runs bundlesize, no checks for branch. Hm, I'm looking at my Travis logs from this morning. Here are the bundlesize debug results, in order of build:
Let me know if there's any specific info from the debug results that might be helpful. Thanks! |
I'm out of ideas here. In step 1, when I'm afraid, because of whatever is wrong, your next PR will also not updates the values 😢 What's the user/repo that you are talking about, I'll check my API logs for errors |
erichdev/office-ui-fabric-react. I appreciate your help 👍 |
Hey, as far as I can see.. These are the last 2 commits:
Am I looking at the wrong commits? Is there a merge commit before |
Yes those are the last two commits to master. After merge commit Edit: To clarify, |
Check this timeline out:
I don't think the jobs ran in the same order you commited them 😄 |
This is a rare but very interesting edge case, I have no idea what should we do here 😅 |
I thought I had waited to see the bundlesize command get run in the Travis log of the merge commit before I opened the new PR, but maybe not. I probably did get the timing wrong 🤦♂️ This edge case probably became obvious only because I didn't have any master values previously saved. If a merge is committed right after a new PR is submitted, I guess the user could always restart the Travis build if they want to ensure that bundlesize compares to the latest version of master. I really appreciate all your help! This package is awesome and could provide great insight. |
Sadly, I don' think folks will realise that they ended up looking at an outdated comparison, especially in the case of multiple people working on a team 🤔 I don't think I have a fix off the top of my head. Do you mind opening a new issue about this race condition detailing what happened? We would like to circle back to this sometime in the future. |
Do you want to request a feature or report a bug?
Bug?
What is the current behavior?
When I submit a pull request to master, I want bundlesize to compare the PR size to master size and include the message 'smaller than master, good job'. But master values from
api.get()
always comes back empty.api.enabled
istrue
. Could it be that maybeapi.set()
never gets called? If so, I'm unsure why - current branch is master and current event is push.bundlesize successfully posts the Github status, but it does not include the comparison to master.
If the current behavior is a bug, please provide the steps to reproduce.
I have BUNDLESIZE_GITHUB_TOKEN saved in Travis environment, bundlesize settings in my package.json. I push a commit to a branch and make a PR to master.
What is the expected behavior?
bundlesize compares the size of PR to master.
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information.
The text was updated successfully, but these errors were encountered: