Skip to content

Commit

Permalink
WX-843 Workflow failure reason should accurately indicate issues open…
Browse files Browse the repository at this point in the history
…ing blob filesystem (#6965)
  • Loading branch information
aednichols authored Dec 16, 2022
1 parent 2242b74 commit dce3fe7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/main/scala/cromwell/core/io/IoCommand.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ trait IoCommand[+T] {

def commandDescription: String

/**
* IO commands side-effect and/or have exceptions. We don't want that when evaluating identity, e.g. to check presence in cache.
* @return Hash code based on the description, which captures file path & action
*/
override def hashCode(): Int = commandDescription.hashCode

def logIOMsgOverLimit(message: => String): Unit = {
val millis: Long = java.time.Duration.between(creation, OffsetDateTime.now).toMillis
if (millis > IoCommand.IOCommandWarnLimit.toMillis) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import scala.concurrent.duration.FiniteDuration
object IoPromiseProxyActor {
case class IoCommandWithPromise[A](ioCommand: IoCommand[A], timeout: FiniteDuration = defaultTimeout) {
val promise = Promise[A]()

override def hashCode(): Int = ioCommand.hashCode()
}
def props(ioActor: ActorRef) = Props(new IoPromiseProxyActor(ioActor))
}
Expand Down

0 comments on commit dce3fe7

Please sign in to comment.