basho / cuttlefish

never lose your childlike sense of wonder baby cuttlefish, promise me?
Apache License 2.0
205 stars 124 forks source link

Address nested-translation errors + refactor #171

Closed seancribbs closed 9 years ago

seancribbs commented 9 years ago

In an effort to discover the nested errors that can/do occur in Riak's schemas, this substantially refactors the code in cuttlefish_generator.

This PR targets develop but should also be backported/merged to 2.0 branch for the next patch release.

One source of the problem (as shown in the backtrace in basho/riak#590) was that "extended" datatypes that failed to parse halted all attempts to parse other datatypes in the list. This meant that when calling cuttlefish_generator:map/2, if something was already coerced to a valid datatype, it might fail to parse as the extended type and result in the nested configuration failing.

The main refactors are:

hazen commented 9 years ago

Now that my EQC is back online:

All 288 tests passed.
hazen commented 9 years ago

:+1: 2edaf38

seancribbs commented 9 years ago

@javajolt Even though it passed this time, I should probably fix it so it doesn't randomly fail again. Hold on.

hazen commented 9 years ago

Looks like repeated test runs are now passing:

All 288 tests passed.
hazen commented 9 years ago

:+1: 52041cd

seancribbs commented 9 years ago

@borshop merge