Return-Path: X-Original-To: apmail-aurora-reviews-archive@minotaur.apache.org Delivered-To: apmail-aurora-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E64CF196E7 for ; Wed, 6 Apr 2016 19:29:41 +0000 (UTC) Received: (qmail 65725 invoked by uid 500); 6 Apr 2016 19:29:41 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 65674 invoked by uid 500); 6 Apr 2016 19:29:41 -0000 Mailing-List: contact reviews-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.apache.org Delivered-To: mailing list reviews@aurora.apache.org Received: (qmail 65636 invoked by uid 99); 6 Apr 2016 19:29:41 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Apr 2016 19:29:41 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 9064F2AC84F; Wed, 6 Apr 2016 19:29:33 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4175357694617048746==" MIME-Version: 1.0 Subject: Re: Review Request 45816: Add support for automated DB migrations and rollbacks when restoring from dbScript stored in a snapshot. From: Joshua Cohen To: Bill Farner , Maxim Khutornenko Cc: Joshua Cohen , Aurora Date: Wed, 06 Apr 2016 19:29:33 -0000 Message-ID: <20160406192933.20107.83141@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Joshua Cohen X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/45816/ X-Sender: Joshua Cohen References: <20160406192702.20106.69897@reviews.apache.org> In-Reply-To: <20160406192702.20106.69897@reviews.apache.org> X-ReviewBoard-Diff-For: src/main/java/org/apache/aurora/scheduler/storage/db/MigrationManager.java X-ReviewBoard-Diff-For: src/main/java/org/apache/aurora/scheduler/storage/db/views/MigrationChangelogEntry.java X-ReviewBoard-Diff-For: src/test/java/org/apache/aurora/scheduler/storage/db/MigrationManagerIT.java X-ReviewBoard-Diff-For: src/main/java/org/apache/aurora/scheduler/storage/db/MigrationMapper.java X-ReviewBoard-Diff-For: src/main/resources/org/apache/aurora/scheduler/storage/db/MigrationMapper.xml X-ReviewBoard-Diff-For: src/test/java/org/apache/aurora/scheduler/storage/db/testmigration/V001_TestMigration.java Reply-To: Joshua Cohen X-ReviewRequest-Repository: aurora --===============4175357694617048746== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45816/#review127427 ----------------------------------------------------------- config/checkstyle/suppressions.xml (lines 24 - 25) Bill: I decided to stick w/ the `JavaMigrationLoader` rather than creating a new `ClasspathMigrationLoader` this was done for two reasons: 1. As I mentioned originally, I find overloading a single sql file to contain both upgrade and downgrade scripts to be sub-optimal. 2. It didn't seem worth carrying the extra logic for classpath loading of script files when the logic already exists for loading classes. If you feel strongly opposed, I can revisit. - Joshua Cohen On April 6, 2016, 7:27 p.m., Joshua Cohen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/45816/ > ----------------------------------------------------------- > > (Updated April 6, 2016, 7:27 p.m.) > > > Review request for Aurora, Maxim Khutornenko and Bill Farner. > > > Bugs: AURORA-1648 > https://issues.apache.org/jira/browse/AURORA-1648 > > > Repository: aurora > > > Description > ------- > > Add support for automated DB migrations and rollbacks when restoring from dbScript stored in a snapshot. > > > Diffs > ----- > > build.gradle ad5ec5c4afe4dd5c2189d0680692a7409f0417a9 > config/checkstyle/suppressions.xml 50a53e0d96cb365b2182b78769c1749b7e3558a9 > src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java 60b66e85f83edd3c18c97e3938816cb875249d4e > src/main/java/org/apache/aurora/scheduler/storage/backup/TemporaryStorage.java 5c7d92f00ddda0a1f366ba1ca33b61829fa16ad9 > src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java baf460e987d0a6ba2810507695fe118b6b502f87 > src/main/java/org/apache/aurora/scheduler/storage/db/DbUtil.java 6f4e6710863a301238043edbb7bed1c7923a0720 > src/main/java/org/apache/aurora/scheduler/storage/db/MigrationManager.java PRE-CREATION > src/main/java/org/apache/aurora/scheduler/storage/db/MigrationMapper.java PRE-CREATION > src/main/java/org/apache/aurora/scheduler/storage/db/views/MigrationChangelogEntry.java PRE-CREATION > src/main/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImpl.java 6fee2510d044515e0704cf20ec0ba77231050ec4 > src/main/resources/org/apache/aurora/scheduler/storage/db/MigrationMapper.xml PRE-CREATION > src/test/java/org/apache/aurora/scheduler/storage/db/MigrationManagerIT.java PRE-CREATION > src/test/java/org/apache/aurora/scheduler/storage/db/testmigration/V001_TestMigration.java PRE-CREATION > src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplIT.java d93eed925d289381cdac547ad1bce749c397a07f > > Diff: https://reviews.apache.org/r/45816/diff/ > > > Testing > ------- > > ./gradlew build -Pq > > end to end tests. > > Also manually verified that migrations and rollbacks are correctly performed in vagrant. > > > Thanks, > > Joshua Cohen > > --===============4175357694617048746==--