You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2018/05/08 17:03:10 UTC

[1/2] mesos git commit: Added an option to keep downloaded patches to apply-reviews.py.

Repository: mesos
Updated Branches:
  refs/heads/master 25176ed1b -> 86523d315


Added an option to keep downloaded patches to apply-reviews.py.

By default, the apply-reviews.py script will delete all patch files
it downloads. However, when a patch fails to apply, it might be
desired to edit and apply it manually. This change will make it easier
to do so.

Review: https://reviews.apache.org/r/67004/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/6d97f68e
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/6d97f68e
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/6d97f68e

Branch: refs/heads/master
Commit: 6d97f68e5a4bbd22a0b72cf7c2c1826e45142de4
Parents: 25176ed
Author: Benno Evers <be...@mesosphere.com>
Authored: Tue May 8 19:00:53 2018 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Tue May 8 19:00:53 2018 +0200

----------------------------------------------------------------------
 support/apply-reviews.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/6d97f68e/support/apply-reviews.py
----------------------------------------------------------------------
diff --git a/support/apply-reviews.py b/support/apply-reviews.py
index b6801b9..0c744a9 100755
--- a/support/apply-reviews.py
+++ b/support/apply-reviews.py
@@ -155,8 +155,9 @@ def apply_review(options):
     # We store the patch ID in a local variable to ensure the lambda
     # captures the current patch ID.
     patch_file = '%s.patch' % patch_id(options)
-    atexit.register(
-        lambda: os.path.exists(patch_file) and os.remove(patch_file))
+    if not options["keep_patches"]:
+        atexit.register(
+            lambda: os.path.exists(patch_file) and os.remove(patch_file))
 
     fetch_patch(options)
     apply_patch(options)
@@ -382,6 +383,9 @@ def parse_options():
     parser.add_argument('-d', '--dry-run',
                         action='store_true',
                         help='Perform a dry run.')
+    parser.add_argument('-k', '--keep-patches',
+                        action='store_true',
+                        help="Do not delete downloaded patch files.")
     parser.add_argument('-n', '--no-amend',
                         action='store_true',
                         help='Do not amend commit message.')
@@ -409,6 +413,7 @@ def parse_options():
 
     options['review_id'] = args.review_id
     options['dry_run'] = args.dry_run
+    options['keep_patches'] = args.keep_patches
     options['no_amend'] = args.no_amend
     options['github'] = args.github
     options['chain'] = args.chain


[2/2] mesos git commit: Fixed flakyness in 'MasterAPITest.MasterFailover'.

Posted by al...@apache.org.
Fixed flakyness in 'MasterAPITest.MasterFailover'.

This test used to be sporadically segfault as described in MESOS-8687.
The suspected cause is that a in a master actor, the `httpSequence`
field was lazily initialized in `ProcessBase::consume()` and afterwards
a call to `ProcessBase::_consume()` was dispatched, where it was
assumed that `httpSequence` is already initialized.

However, during this test the master actor would be destroyed and a
new actor would be spawned with the same PID. The dispatched method
would be called on this new actor and find `httpSequence` to be not
initialized, leading to a crash.

This patch introduces a call to `Clock::settle()` after the master
is shut down to ensure the outstanding `_consume()` gets discarded
before starting the new master actor.

Review: https://reviews.apache.org/r/66799/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/86523d31
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/86523d31
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/86523d31

Branch: refs/heads/master
Commit: 86523d3157d36bdaf4f7ce8fe001ae241e690a5f
Parents: 6d97f68
Author: Benno Evers <be...@mesosphere.com>
Authored: Tue May 8 19:02:51 2018 +0200
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Tue May 8 19:02:51 2018 +0200

----------------------------------------------------------------------
 src/tests/api_tests.cpp | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/86523d31/src/tests/api_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/api_tests.cpp b/src/tests/api_tests.cpp
index 1ed26a7..00cd91c 100644
--- a/src/tests/api_tests.cpp
+++ b/src/tests/api_tests.cpp
@@ -2472,6 +2472,8 @@ TEST_P(MasterAPITest, MasterFailover)
   mesos.reset();
   master->reset();
 
+  Clock::settle();
+
   // Restart the master.
   master = StartMaster(masterFlags);
   ASSERT_SOME(master);