BuildSize icon indicating copy to clipboard operation
BuildSize copied to clipboard

Never getting a comment

Open tusbar opened this issue 7 years ago • 7 comments

Hey,

When are comments created? I just added BuildSize to a repo, and pushed some artifacts on CircleCI on this PR: https://github.com/etalab/geo.data.gouv.fr/pull/553 but I’m not getting a comment.

Also another issue I’ve seen on other repos: if the build finishes before the PR is opened, a comment is never created either.

tusbar avatar Dec 08 '17 15:12 tusbar

And on this PR https://github.com/etalab/geo.data.gouv.fr/pull/563, I opened the PR before the build finished, didn’t get a comment.

Updated something and forced push, and now I have one.

tusbar avatar Dec 08 '17 17:12 tusbar

Did the exact same thing on this PR: https://github.com/etalab/geo.data.gouv.fr/pull/566 never got a comment at all.

tusbar avatar Dec 08 '17 21:12 tusbar

Thanks for the bug report, I'll try to look into this soon :)

Daniel15 avatar Dec 09 '17 04:12 Daniel15

I just added BuildSize to a repo, and pushed some artifacts on CircleCI on this PR: https://github.com/etalab/geo.data.gouv.fr/pull/553 but I’m not getting a comment.

For this particular one, the base commit (https://github.com/etalab/geo.data.gouv.fr/commit/c7f7fea48fbfc39a1defeb2caf2756482047fe54) was not processed by BuildSize, and thus it had nothing to compare to. Comments are only posted if a comparison is available (that is, if the base commit was processed using BuildSize). Was the base commit from before BuildSize was enabled?

And on this PR etalab/geo.data.gouv.fr#563, I opened the PR before the build finished, didn’t get a comment. Updated something and forced push, and now I have one.

Oh yeah, this one sounds like a race condition. I'll need to rethink how some of the data is processed. The CircleCI build won't have any pull request data (so BuildSize doesn't know it's a pull request), and then when the PR is submitted, CircleCI doesn't rebuild it.

Daniel15 avatar Dec 10 '17 23:12 Daniel15

Ah yeah, you’re right about the first one. Sorry for the ultra large PR, I should have picked a smaller one to enable this on 😄.

Unfortunately I’m not really familiar with CircleCI/GitHub APIs, but I like how codecov does it. Their comment is posted after the PR is created (if they already have build data), or when the first build finishes (the PR already exists); then updated whenever another build completes.

tusbar avatar Dec 11 '17 11:12 tusbar

t. Their comment is posted after the PR is created (if they already have build data), or when the first build finishes (the PR already exists); then updated whenever another build completes.

BuildSize almost works like this. It does update the comment when another build completes. The only thing it doesn't handle at the moment is posting a comment when a PR is created if the build was completed before the PR was opened. That's something I'd like to implement, but my free time is pretty limited these days.

Daniel15 avatar Dec 24 '17 05:12 Daniel15

I opened a new issue to track that particular issue (submitting PR after the build has completed): https://github.com/Daniel15/BuildSize/issues/27

Daniel15 avatar Dec 24 '17 06:12 Daniel15