Keep relevant Jes metadata events #1304

Merged
merged 6 commits into from Aug 18, 2016

Conversation

Projects
None yet
4 participants
Contributor

ruchim commented Aug 18, 2016

Creating a list of acceptable events and filtering the rest out of Jes metadata.

@ruchim @ruchim ruchim filter jes metadata events by specific events
4f953dd

ruchim added the in review label Aug 18, 2016

@ruchim @ruchim ruchim use the filtered list
1afe809
Contributor

cjllanwarne commented Aug 18, 2016 edited

👍

Approved with PullApprove

@mcovarr mcovarr commented on an outdated diff Aug 18, 2016

.../src/main/scala/cromwell/engine/backend/jes/Run.scala
@@ -119,13 +119,16 @@ object Run {
} toSeq
} else Seq.empty
+ val acceptableEvents = Set("start", "pulling-image", "localizing-files", "running-docker", "delocalizing-files", "ok", "fail", "start-shutdown")
@mcovarr

mcovarr Aug 18, 2016

Contributor

This could go up to the top of the Run class and become a constant (no need to make a new copy of this for every invocation of this method).

@mcovarr mcovarr commented on an outdated diff Aug 18, 2016

.../src/main/scala/cromwell/engine/backend/jes/Run.scala
@@ -119,13 +119,16 @@ object Run {
} toSeq
} else Seq.empty
+ val acceptableEvents = Set("start", "pulling-image", "localizing-files", "running-docker", "delocalizing-files", "ok", "fail", "start-shutdown")
+ val filteredEventsList: Seq[EventStartTime] = { eventsList filter { i => acceptableEvents.contains(i.name) } }
@mcovarr

mcovarr Aug 18, 2016

Contributor

could do without the outer curlies

Contributor

mcovarr commented Aug 18, 2016 edited by cjllanwarne

👍

Approved with PullApprove

@ruchim @ruchim ruchim pr changes
002de00

@cjllanwarne cjllanwarne assigned ruchim and unassigned mcovarr and cjllanwarne Aug 18, 2016

@mcovarr mcovarr commented on an outdated diff Aug 18, 2016

.../src/main/scala/cromwell/engine/backend/jes/Run.scala
@@ -26,6 +26,7 @@ object Run {
lazy val MaximumPollingInterval = Duration(ConfigFactory.load.getConfig("backend").getConfig("jes").getInt("maximumPollingInterval"), "seconds")
val InitialPollingInterval = 5 seconds
val PollingBackoffFactor = 1.1
+ val acceptableEvents = Set("start", "pulling-image", "localizing-files", "running-docker", "delocalizing-files", "ok", "fail", "start-shutdown")
@mcovarr

mcovarr Aug 18, 2016

Contributor

capitalize constants in companion object

ruchim added some commits Aug 18, 2016

@ruchim @ruchim ruchim capitals
e964af4
@ruchim @ruchim ruchim fix RunSpec
32c2478
@ruchim @ruchim ruchim rename properly
3419b45

@ruchim ruchim merged commit 42b47c1 into 0.19_hotfix Aug 18, 2016

1 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details
code-review/pullapprove Approved by cjllanwarne, mcovarr
Details

ruchim removed the in review label Aug 18, 2016

ruchim deleted the rm_jesEvents branch Aug 18, 2016

@mbookman mbookman commented on the diff Sep 2, 2016

.../test/scala/cromwell/engine/backend/jes/RunSpec.scala
x.startTime.getMillis should be (new DateTime("2015-12-05T00:00:01.000Z").getMillis)
x.endTime.getMillis should be (new DateTime("2015-12-05T00:01:00.000Z").getMillis)
}
+ }
+
+ "JES Run" should "not parse unwated events from Operation metadata" in {
@mbookman

mbookman Sep 2, 2016

Nit: s/unwated/unwanted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment