travis-ci/travis-core — pull request #384 by drogus (2014-08-14 22:35:48+00:00)
Title: Send all records data with pusher

I was talking with @svenfuchs the other day and he asked why do we even need partial updates support on the client. To anyone who's not familiar with our setup: partial updates support allows us to create a record on the client without all of the fields and load missing data when it's needed. So for example we can load a build with only an `id` and a `number` and we will load the rest of the fields if any other field is accessed. This sounds pretty neat, but unfortunately it needs quite some amount of code on the client. One of the reasons of switching from Ember Data to Ember Model was the fact that Ember Data didn't have that feature and extending it was quite hard.

After thinking about that for a while, the amount of work which needs to be put to support partial data loading is quite big and we're not gaining much - a bit less data sent with pusher. This PR adds missing data for jobs and builds, so we can drop support for partial loading on the client.

The only problem I have at this point is config field. Till now it was a part of build's payload, but we didn't send it for jobs. In both cases it can exceed 10kB pusher limit (although it's not probably very common). I'm not sure what's the best solution for that. 2 possibilities:

1) Send config only if it's less than 8kB or so (to leave place also for other fields) and then load config for records which lack it.
* it's the easiest approach
* it may be confusing to potential users of our pusher API, I'm not sure if there is any nice way of indicating that a field exists, but it's skipped
* it's still better than the current version for builds - messages for builds with large configs aren't sent at all
2) Send config for all of the records, but split messages
* this seems quite complicated and possibly the most obtrusive change, so I don't really like this options