Proposed addition to code review guidelines

Tim Penhey tim.penhey at canonical.com
Wed Jul 20 02:26:05 UTC 2016


Hi folks,

With model migration entering the world as a first class citizen, we 
need to ensure that all fields and documents added to state have 
appropriate migrations done for them.

In particular when adding a field it is likely that the 
state/migrations_internal_test.go will have a failing test as it checks 
the public fields of the documents.

We should add a code review check that ensures that no fields are added 
to that test without the appropriate additions to 
state/migration_export.go and state/migration_import.go otherwise it is 
just a lie, and the migration result will not reflect the new database 
state.

Tim



More information about the Juju-dev mailing list