Skip to content

Commit

Permalink
Release cosmos patch v0.5.2 (#721)
Browse files Browse the repository at this point in the history
* Handle the case when the env var is null in marathon json during uninstall (#719)
* Bump version to 0.5.2
  • Loading branch information
takirala authored Feb 26, 2018
1 parent 8c04507 commit 43e4685
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import com.twitter.finagle.http.Status
import com.twitter.util.Future
import io.circe.Json
import io.circe.JsonObject
import io.circe.syntax._
import org.slf4j.Logger

private[cosmos] final class UninstallHandler(
Expand Down Expand Up @@ -170,15 +171,13 @@ private[cosmos] final class UninstallHandler(
}

private[this] def setMarathonUninstall(appJson: JsonObject): JsonObject = {
// Note, Marathon appends extraneous fields when you fetch the current configuration.
// Those are removed here to ensure the Marathon update succeeds.
// Presently, those fields are:
// - uris
// - version
appJson.add(
envJsonField,
Json.fromJsonObject(
appJson(envJsonField).get.asObject.get.add(SdkUninstallEnvvar, Json.fromString("true"))
appJson(envJsonField)
.flatMap(_.asObject)
.getOrElse(JsonObject())
.add(SdkUninstallEnvvar, "true".asJson)
)
)
}
Expand Down
2 changes: 1 addition & 1 deletion project/Deps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ object Deps {

object V {
val projectScalaVersion = "2.12.3"
val projectVersion = "0.5.1"
val projectVersion = "0.5.2"

val bijection = "0.9.6"
val circe = "0.9.0-M1"
Expand Down

0 comments on commit 43e4685

Please sign in to comment.