• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zulip / zulip-mobile / 6909 / 1
47%
master: 47%

Build:
DEFAULT BRANCH: master
Ran 19 Sep 2018 12:28AM UTC
Files 363
Run time 25s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Sep 2018 12:09AM UTC coverage: 50.076%. Remained the same
COVERALLS_REPO_TOKEN=4eYQDtWoBJlDz2QkxoQ2UcnmJFcOB7zkv

push

travis-ci

gnprice
messages: Initialize new state subtrees in migrations.

Each migration should take a state that was a valid value of the old
`GlobalState` type, and return a state that is a valid value of the
new `GlobalState` type.

In particular, when we create a new state subtree (i.e. a new property
on `GlobalState`), the migration should initialize that subtree.

The reason we've largely gotten away without doing this (we've had no
migrations at all until recently, so certainly haven't been doing
this) is that only a small amount of code is exposed to any failure
here -- only REHYDRATE handlers, when handling the `payload` of the
action -- because the actual Redux state is always initialized in the
standard Redux way, by invoking the handlers with `undefined` previous
state.  In cases where this is complicated to do, we might choose to
skip it in the future too.

But here we have an actual, critical, bug that this prevents.  When
starting up the app, with a state left behind by a version from before
these migrations, we never get past the green loading screen; and the
log shows `TypeError: Object.values called on non-object` inside a
function named `rehydrate`, which must be the one in `flagsReducers`.
That's because `action.payload` has no property `messages` -- contrary
to our type annotation saying a REHYDRATE action's payload should be a
`GlobalState`.

And fixing it once and for all in these migrations (rather than worry
about future bugs if future changes we make to rehydrate code
innocently make this same assumption) is easy.  So do that.

1001 of 2095 branches covered (47.78%)

Branch coverage included in aggregate %.

1948 of 3794 relevant lines covered (51.34%)

46.97 hits per line

Source Files on job 6909.1 (COVERALLS_REPO_TOKEN=4eYQDtWoBJlDz2QkxoQ2UcnmJFcOB7zkv)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 22590
  • Travis Job 6909.1
  • 98842faf on github
  • Prev Job for COVERALLS_REPO_TOKEN=4eYQDtWoBJlDz2QkxoQ2UcnmJFcOB7zkv on master (#3457.1)
  • Next Job for COVERALLS_REPO_TOKEN=4eYQDtWoBJlDz2QkxoQ2UcnmJFcOB7zkv on master (#6912.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc