Discussions are not presented for MR diffs (race condition with diffs batch load)

There's one scenario with diffs_batch_load feature flag on that doesn't load the discussions (even though it shows there are unresolved discussions):

Screen_Shot_2019-12-09_at_11.21.41

It only happens when the discussions.json responds faster than the diffs_batch.json request:

Screen_Shot_2019-12-09_at_11.18.29

Note that the request order is right, but that's not enough to avoid the issue, given the discussions.json can respond faster. I had to give it a few reloads in order to reproduce the bug.

Important: The same bug happens if we open the MR (Overview tab), then click the Changes tab.

That's a blocker to enable the diffs batch loading at GitLab.com

@andr3 @iamphill @jboyson

Edited by Oswaldo Ferreira