Skip to content

Commit

Permalink
Merge branch 'develop' into release-2.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
commandlinegirl committed May 18, 2022
2 parents 7e07b69 + 4dc45c0 commit 7432519
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
sudo apt-get install -y apt-transport-https wget git openssh-server tree python3 python3-pip python3-venv
cwltool=`jq -r '.execDepends.cwl[0].name' scripts/bundled_dependencies.json`
pip3 install --upgrade pip setuptools pyOpenSSL
pip3 install termcolor dxpy $cwltool
pip3 install termcolor dxpy==0.323.0 $cwltool
# install dxda
sudo wget -O/usr/local/bin/dx-download-agent https://github.com/dnanexus/dxda/releases/download/v0.5.7/dx-download-agent-linux
sudo chmod +x /usr/local/bin/dx-download-agent
Expand Down
11 changes: 2 additions & 9 deletions compiler/src/main/scala/dx/compiler/WorkflowCompiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -569,14 +569,8 @@ case class WorkflowCompiler(separateOutputs: Boolean,
if (app.kind.getClass == classOf[ExecutableKindWfFragment]) =>
"do not override"
case static: StaticInstanceType => instanceTypeDb.apply(static.req).name
case DefaultInstanceType => {
logger.trace(
s"Using default instance type for child process. Going to use `${None}`"
)
"do not override"
}

case _ => instanceTypeDb.defaultInstanceType.name
case DefaultInstanceType => "do not override"
case _ => instanceTypeDb.defaultInstanceType.name
}
if (instanceType == "do not override") {
None
Expand All @@ -592,7 +586,6 @@ case class WorkflowCompiler(separateOutputs: Boolean,

case _ => None
}
logger.trace(s"systemRequirements is ${systemRequirements}")
JsObject(
Vector(
Some("id" -> JsString(stage.dxStage.id)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ case class RuntimeTranslator(wdlVersion: WdlVersion,
resolution: InstanceTypeSelection.InstanceTypeSelection
): InstanceType = {
runtime.safeParseInstanceType match {
case Some(InstanceTypeRequest.empty) if resolution == InstanceTypeSelection.Dynamic =>
DynamicInstanceType
case Some(InstanceTypeRequest.empty) => DefaultInstanceType
case Some(req: InstanceTypeRequest)
if resolution == InstanceTypeSelection.Dynamic && req.dxInstanceType.isDefined =>
Expand Down
13 changes: 1 addition & 12 deletions compiler/src/test/scala/dx/translator/TranslatorTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,7 @@ class TranslatorTest extends AnyFlatSpec with Matchers {
}
applet.instanceType
}
compile("static") shouldBe StaticInstanceType(
InstanceTypeRequest(None,
None,
None,
None,
None,
None,
None,
None,
None,
Some(ExecutionEnvironment("Ubuntu", "20.04", Vector("0"))))
)
compile("static") shouldBe DefaultInstanceType
compile("dynamic") shouldBe DynamicInstanceType
}

Expand Down
5 changes: 4 additions & 1 deletion core/src/main/scala/dx/core/languages/wdl/Runtime.scala
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,19 @@ case class Runtime(wdlVersion: WdlVersion,
case other =>
throw new Exception(s"unexpected ${WdlRuntime.GpuKey} value ${other}")
}
val aa = runtimeAttrs.runtime
val _ = aa
val usedGpuDefault: Boolean = gpu match {
case Some(b) => false
case None => true
}
val usedOtherSysDefaults: Boolean = {
runtimeAttrs.runtime.map(_.isDefaultSystemRequirements) match {
case Some(b) => b
case None => false
case None => true
}
}

if (usedOtherSysDefaults && usedGpuDefault) {
InstanceTypeRequest.empty
} else {
Expand Down
4 changes: 3 additions & 1 deletion scripts/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@
]

static_only = [
"apps_1177_native_indirect_override"
"apps_1177_native_indirect_override",
"apps_1128_frag_native_instance_type_override",
"apps_1197_native_frag_default"
]

# docker image tests
Expand Down

0 comments on commit 7432519

Please sign in to comment.