Return-Path: X-Original-To: apmail-aurora-commits-archive@minotaur.apache.org Delivered-To: apmail-aurora-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8AD9910E9D for ; Fri, 17 Jan 2014 18:06:13 +0000 (UTC) Received: (qmail 93211 invoked by uid 500); 17 Jan 2014 18:06:12 -0000 Delivered-To: apmail-aurora-commits-archive@aurora.apache.org Received: (qmail 93181 invoked by uid 500); 17 Jan 2014 18:06:12 -0000 Mailing-List: contact commits-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.incubator.apache.org Delivered-To: mailing list commits@aurora.incubator.apache.org Received: (qmail 93172 invoked by uid 99); 17 Jan 2014 18:06:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jan 2014 18:06:12 +0000 X-ASF-Spam-Status: No, hits=-2000.1 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 17 Jan 2014 18:06:09 +0000 Received: (qmail 93096 invoked by uid 99); 17 Jan 2014 18:05:47 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jan 2014 18:05:47 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1407C1BB8B; Fri, 17 Jan 2014 18:05:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wfarner@apache.org To: commits@aurora.incubator.apache.org Message-Id: <82f5d2c1fd78475b90af760173006af6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: Revert "Add a test to encourage taking care with thrift changes." Date: Fri, 17 Jan 2014 18:05:47 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Updated Branches: refs/heads/master 621eb53f4 -> 97fba4370 Revert "Add a test to encourage taking care with thrift changes." This reverts commit 621eb53f40713b484730763860cdfbba0362e120. Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/97fba437 Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/97fba437 Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/97fba437 Branch: refs/heads/master Commit: 97fba437002ecefa7544c1c9fee1933800336c24 Parents: 621eb53 Author: Bill Farner Authored: Fri Jan 17 10:05:29 2014 -0800 Committer: Bill Farner Committed: Fri Jan 17 10:05:29 2014 -0800 ---------------------------------------------------------------------- build.gradle | 9 +-- .../org/apache/aurora/verify_thrift_checksum.sh | 79 -------------------- .../org/apache/aurora/gen/api.thrift.md5 | 1 - .../apache/aurora/gen/internal_rpc.thrift.md5 | 1 - .../org/apache/aurora/gen/storage.thrift.md5 | 1 - .../apache/aurora/gen/storage_local.thrift.md5 | 1 - .../org/apache/aurora/gen/test.thrift.md5 | 1 - .../apache/thermos/thermos_internal.thrift.md5 | 1 - 8 files changed, 1 insertion(+), 93 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/97fba437/build.gradle ---------------------------------------------------------------------- diff --git a/build.gradle b/build.gradle index 66f3482..4a0372f 100644 --- a/build.gradle +++ b/build.gradle @@ -288,11 +288,4 @@ jacocoTestReport { } } -test.finalizedBy jacocoTestReport - -task FlagSchemaChanges(type: Test) { - exec { - executable = 'bash' - args = ['src/test/org/apache/aurora/verify_thrift_checksum.sh'] - } -} +test.finalizedBy jacocoTestReport \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/97fba437/src/test/org/apache/aurora/verify_thrift_checksum.sh ---------------------------------------------------------------------- diff --git a/src/test/org/apache/aurora/verify_thrift_checksum.sh b/src/test/org/apache/aurora/verify_thrift_checksum.sh deleted file mode 100644 index fe8fc58..0000000 --- a/src/test/org/apache/aurora/verify_thrift_checksum.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -set -o nounset - -# A test to remind us that we need to exercise care when making API and -# storage schema changes. -# There are two operating modes: verify and reset. Running the script with -# no arguments will use verify mode. Reset mode will overwrite all golden -# files with the current checksum of the source files. -# In other words: immediately after running in reset mode, the test should -# pass in verify mode. - -reset_mode=false -while getopts "r" opt -do - case ${opt} in - r) reset_mode=true ;; - *) exit 1; - esac -done - -if $reset_mode -then - echo 'Warning: Operating in reset mode. Rewriting golden checksum files.' -fi - -for file in $(find src/main/thrift -type f -name '*.thrift') -do - # Using python for lack of a better cross-platform checksumming without - # adding another build-time dependency. - checksum=$(python << EOF -import hashlib -m=hashlib.md5() -m.update(open('$file', 'rb').read()) -print(m.hexdigest()) -EOF) - golden_file=src/test/resources/${file#src/main/thrift/}.md5 - if $reset_mode - then - mkdir -p $(dirname "$golden_file") - echo "$checksum" > "$golden_file" - else - if [ ! -f "$golden_file" ] - then - echo "Golden file not found for $file, expected $golden_file" - exit 1 - fi - golden_checksum=$(cat "$golden_file") - if [ "$checksum" != "$golden_checksum" ] - then - echo "Golden checksum did not match for $file" - echo "Found $checksum, expected $golden_checksum" - echo - echo $(printf '!%.0s' {1..80}) - echo 'This means you changed a thrift file.' - echo 'Please think carefully before you proceed!' - echo - echo 'If you are changing an API or a storage schema you may need to ' - echo 'take additional actions to such as providing a client and/or ' - echo 'server-side migration strategy. You may also need to bump the ' - echo 'released version ID, following the guidelines at http://semver.org' - echo - echo 'This test is not here to help you make those changes, but to ' - echo 'remind you to take appropriate follow-up actions relating to your ' - echo 'schema change.' - echo - echo 'Once you are confident that you have appropriately supported this ' - echo 'change in relevant code, you can fix this test by running ' - echo "sh $0 -r" - echo $(printf '!%.0s' {1..80}) - exit 1 - fi - fi -done - -if ! $reset_mode -then - echo "All checksums match." -fi -exit 0 http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/97fba437/src/test/resources/org/apache/aurora/gen/api.thrift.md5 ---------------------------------------------------------------------- diff --git a/src/test/resources/org/apache/aurora/gen/api.thrift.md5 b/src/test/resources/org/apache/aurora/gen/api.thrift.md5 deleted file mode 100644 index 83fd341..0000000 --- a/src/test/resources/org/apache/aurora/gen/api.thrift.md5 +++ /dev/null @@ -1 +0,0 @@ -03f6423444c34254f26f338a978d0e19 http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/97fba437/src/test/resources/org/apache/aurora/gen/internal_rpc.thrift.md5 ---------------------------------------------------------------------- diff --git a/src/test/resources/org/apache/aurora/gen/internal_rpc.thrift.md5 b/src/test/resources/org/apache/aurora/gen/internal_rpc.thrift.md5 deleted file mode 100644 index a324c5a..0000000 --- a/src/test/resources/org/apache/aurora/gen/internal_rpc.thrift.md5 +++ /dev/null @@ -1 +0,0 @@ -1a8adb98193a9a6c47e06d176d9ca691 http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/97fba437/src/test/resources/org/apache/aurora/gen/storage.thrift.md5 ---------------------------------------------------------------------- diff --git a/src/test/resources/org/apache/aurora/gen/storage.thrift.md5 b/src/test/resources/org/apache/aurora/gen/storage.thrift.md5 deleted file mode 100644 index f0b16f8..0000000 --- a/src/test/resources/org/apache/aurora/gen/storage.thrift.md5 +++ /dev/null @@ -1 +0,0 @@ -92a4b06480e9d0dfb76ef031240793e0 http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/97fba437/src/test/resources/org/apache/aurora/gen/storage_local.thrift.md5 ---------------------------------------------------------------------- diff --git a/src/test/resources/org/apache/aurora/gen/storage_local.thrift.md5 b/src/test/resources/org/apache/aurora/gen/storage_local.thrift.md5 deleted file mode 100644 index 5a0a4df..0000000 --- a/src/test/resources/org/apache/aurora/gen/storage_local.thrift.md5 +++ /dev/null @@ -1 +0,0 @@ -d2220b1eee9032472ca7b54163bd66a8 http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/97fba437/src/test/resources/org/apache/aurora/gen/test.thrift.md5 ---------------------------------------------------------------------- diff --git a/src/test/resources/org/apache/aurora/gen/test.thrift.md5 b/src/test/resources/org/apache/aurora/gen/test.thrift.md5 deleted file mode 100644 index 437a47a..0000000 --- a/src/test/resources/org/apache/aurora/gen/test.thrift.md5 +++ /dev/null @@ -1 +0,0 @@ -61adeee3eda40c06cb78418e22cd23de http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/97fba437/src/test/resources/org/apache/thermos/thermos_internal.thrift.md5 ---------------------------------------------------------------------- diff --git a/src/test/resources/org/apache/thermos/thermos_internal.thrift.md5 b/src/test/resources/org/apache/thermos/thermos_internal.thrift.md5 deleted file mode 100644 index d5a6764..0000000 --- a/src/test/resources/org/apache/thermos/thermos_internal.thrift.md5 +++ /dev/null @@ -1 +0,0 @@ -a8e77d5255804a8a745d20ca53b6aeda