HomeMesosphereNo notifications. 4 unresolved issues.

MarathonSchedulerActor now respects launch queue tasks when scaling app
ClosedAll Users

Authored by zen-dog on Dec 6 2016, 11:33 AM.

Diff Detail

Repository
rMARATHON marathon
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Changes from before your most recent comment are hidden. Show Older Changes
jeschkies accepted this revision.Dec 6 2016, 12:11 PM

Thanks : )

This revision is now accepted and ready to land.Dec 6 2016, 12:11 PM
meichstedt requested changes to this revision.Dec 6 2016, 12:27 PM
meichstedt added a reviewer: meichstedt.
meichstedt added a subscriber: meichstedt.

Thanks, LGTM – 2 minor comments that should be addressed though.

src/main/scala/mesosphere/marathon/MarathonSchedulerActor.scala
540–541

Can you please rename *task* to *instance*?

src/test/scala/mesosphere/marathon/MarathonSchedulerActorTest.scala
268 ↗(On Diff #1092)

Thanks for the test! How about a test that also verifies that no instances are added to the launch queue when either

  • the queued instance count is equal to toStart, or
  • the queued instance count is bigger than toStart.

The latter is clearly a failure scenario, probably of another component. Yet adding -3 to the launch queue wouldn't make sense so we should verify that it works for that scenario as well.

This revision now requires changes to proceed.Dec 6 2016, 12:27 PM
aquamatthias updated this object.Dec 6 2016, 2:09 PM
zen-dog updated this revision to Diff 1106.Dec 6 2016, 3:48 PM
  • Add "ScaleApp with too many tasks in launch queue" MarathonSchedulerActor test
  • Add "ScaleApp with enough tasks in launch queue" MarathonSchedulerActor test
  • Rename some variables form "*task*" to "*instance*"
zen-dog marked 2 inline comments as done.Dec 6 2016, 3:49 PM

Implemented feedback

aquamatthias accepted this revision.Dec 6 2016, 3:54 PM

Thanks.
Let's wait what Jenkins says to that.

zen-dog updated this revision to Diff 1108.Dec 6 2016, 4:13 PM

Fix failing SchedulerActionsTest with a forgotten mock call

Thanks.
Let's wait what Jenkins says to that.

Fails due to MigrationTest

zen-dog updated this revision to Diff 1109.Dec 6 2016, 4:43 PM

Rebased on master

meichstedt requested changes to this revision.Dec 6 2016, 6:23 PM
meichstedt added inline comments.
src/test/scala/mesosphere/marathon/MarathonSchedulerActorTest.scala
293 ↗(On Diff #1109)

This means it will wait for 5 seconds to verify queue.add wasn't called. Following the pattern these (older) tests normally use, please write noMoreInteractions(queue).

Yet, why does this code test the actor anyways? the def scale(runSpec: RunSpec): Unit is defined in the SchedulerActions class, so you can should test this in the associated SchedulerActionsTest – sorry for not realizing this earlier. Benefit is it doesn't use an actor system.

This revision now requires changes to proceed.Dec 6 2016, 6:23 PM
zen-dog updated this revision to Diff 1119.Dec 7 2016, 11:00 AM

Moved new tests to SchedulerActionsTest

zen-dog marked an inline comment as done.Dec 7 2016, 11:02 AM
zen-dog added inline comments.
src/test/scala/mesosphere/marathon/MarathonSchedulerActorTest.scala
293 ↗(On Diff #1109)

Oh, I didn't see those. Yes, SchedulerActionsTest is a much better place for these tests.

meichstedt accepted this revision.Dec 7 2016, 12:50 PM

Thanks!

This revision is now accepted and ready to land.Dec 7 2016, 12:50 PM
zen-dog updated this revision to Diff 1124.Dec 7 2016, 1:34 PM
zen-dog marked an inline comment as done.

Rebased on master

zen-dog updated this revision to Diff 1132.Dec 7 2016, 3:53 PM

Fix failing pod test

This revision was automatically updated to reflect the committed changes.