-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16986/
-----------------------------------------------------------

(Updated Jan. 17, 2014, 8:02 p.m.)


Review request for Aurora, Kevin Sweeney, Maxim Khutornenko, and Brian Wickman.


Changes
-------

Fixed build break, i neglected to realize that api.thrift changed on master 
since the original golden files were generated.  AFAICT this works fine.


Repository: aurora


Description
-------

Add a test to encourage taking care with thrift changes.

We have more to do w.r.t. automating detection and proper handling of schema 
changes (specifically in the scheduler).  However, i see this as low-hanging 
fruit to at least serve as a reminder.


Diffs (updated)
-----

  build.gradle 4a0372fc0939e845657f32a606fed93d308cefea 
  src/test/resources/org/apache/aurora/gen/api.thrift.md5 PRE-CREATION 
  src/test/resources/org/apache/aurora/gen/internal_rpc.thrift.md5 PRE-CREATION 
  src/test/resources/org/apache/aurora/gen/storage.thrift.md5 PRE-CREATION 
  src/test/resources/org/apache/aurora/gen/storage_local.thrift.md5 
PRE-CREATION 
  src/test/resources/org/apache/aurora/gen/test.thrift.md5 PRE-CREATION 
  src/test/resources/org/apache/thermos/thermos_internal.thrift.md5 
PRE-CREATION 
  src/test/sh/org/apache/aurora/verify_thrift_checksum.sh PRE-CREATION 

Diff: https://reviews.apache.org/r/16986/diff/


Testing
-------

Simulating a mis-matched md5:
    $ echo 'foobar' > 
src/test/resources/org/apache/thermos/thermos_internal.thrift.md5
    
    $ ./gradlew build
    make: Nothing to be done for `all'.
    Golden checksum did not match for 
src/main/thrift/org/apache/thermos/thermos_internal.thrift
    Found a8e77d5255804a8a745d20ca53b6aeda, expected foobar

    
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    This means you changed a thrift file.
    Please think carefully before you proceed!

    If you are changing an API or a storage schema you may need to
    take additional actions to such as providing a client and/or
    server-side migration strategy.  You may also need to bump the
    released version ID, following the guidelines at http://semver.org

    This test is not here to help you make those changes, but to
    remind you to take appropriate follow-up actions relating to your
    schema change.

    Once you are confident that you have appropriately supported this
    change in relevant code, you can fix this test by running
    sh src/test/sh/verify_thrift_checksum.sh -r
    
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    FAILURE: Build failed with an exception.

    * Where:
    Build file '/Users/wfarner/Code/aurora/build.gradle' line: 292

    * What went wrong:
    A problem occurred evaluating root project 'aurora'.
    > Process 'command 'sh'' finished with non-zero exit value 1

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or 
--debug option to get more log output.

    BUILD FAILED

    Total time: 5.783 secs

Fixing the break:

    $ sh src/test/sh/verify_thrift_checksum.sh -r
    Warning: Operating in reset mode.  Rewriting golden checksum files.

    $ ./gradlew build
    make: Nothing to be done for `all'.
    All checksums match.
    :about
    :bootstrapThrift UP-TO-DATE
    :generateSources UP-TO-DATE
    :compileGeneratedJava UP-TO-DATE
    :processGeneratedResources UP-TO-DATE
    :generatedClasses UP-TO-DATE
    :compileJava UP-TO-DATE
    :processResources UP-TO-DATE
    :classes UP-TO-DATE
    :jar
    :assemble
    :checkstyleMain UP-TO-DATE
    :compileTestJava UP-TO-DATE
    :processTestResources UP-TO-DATE
    :testClasses UP-TO-DATE
    :checkstyleTest UP-TO-DATE
    :test UP-TO-DATE
    :jacocoTestReport UP-TO-DATE
    :check UP-TO-DATE
    :build

    BUILD SUCCESSFUL

    Total time: 15.495 secs


Thanks,

Bill Farner

Reply via email to