aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wfar...@apache.org
Subject git commit: Revert "Add a test to encourage taking care with thrift changes."
Date Fri, 17 Jan 2014 18:05:47 GMT
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 <wfarner@apache.org>
Authored: Fri Jan 17 10:05:29 2014 -0800
Committer: Bill Farner <wfarner@apache.org>
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


Mime
View raw message