fulcrumgenomics / dagr

A scala based DSL and framework for writing and executing bioinformatics pipelines as Directed Acyclic GRaphs
MIT License
69 stars 14 forks source link

Bump com.fulcrumgenomics.commons version to 1.2.0 #399

Closed mjhipp closed 3 years ago

mjhipp commented 3 years ago

There seems to be an incompatibility in PathUtil.sanitizeFileName when using newer versions of fgbio with this version of dagr (after https://github.com/fulcrumgenomics/commons/pull/67 added a parameter and https://github.com/fulcrumgenomics/fgbio/pull/702 updated version)

codecov-commenter commented 3 years ago

Codecov Report

Merging #399 (aa3d641) into master (d4abcdd) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #399   +/-   ##
=======================================
  Coverage   91.40%   91.40%           
=======================================
  Files          31       31           
  Lines        1187     1187           
  Branches       83       69   -14     
=======================================
  Hits         1085     1085           
  Misses        102      102           
Flag Coverage Δ
unittests 91.40% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d4abcdd...aa3d641. Read the comment docs.

nh13 commented 3 years ago

@mjhipp can you elaborate?

mjhipp commented 3 years ago

@nh13 I am still trying to figure out the exact issue, but I am running a dagr workflow and I hit this error:

[2021/10/19 11:24:52 | DagrCoreMain | Info] MikesPipeline failed. Elapsed time: 0.02 minutes.
Exception in thread "main" java.lang.NoSuchMethodError: com.fulcrumgenomics.commons.io.PathUtil$.sanitizeFileName(Ljava/lang/String;Ljava/lang/String;Lscala/Option;)Ljava/lang/String;
    at dagr.core.execsystem.TaskManager.pathFor(TaskManager.scala:173)
    at dagr.core.execsystem.TaskManager.scriptPathFor(TaskManager.scala:177)
    at dagr.core.execsystem.TaskTracker.addTaskNoChecking(TaskTracker.scala:81)
    at dagr.core.execsystem.TaskTracker.$anonfun$addTasks$3(TaskTracker.scala:121)
    at scala.Option.getOrElse(Option.scala:201)
    at dagr.core.execsystem.TaskTracker.$anonfun$addTasks$2(TaskTracker.scala:121)
    at scala.collection.immutable.ArraySeq.$anonfun$map$1(ArraySeq.scala:71)
    at scala.collection.immutable.ArraySeq.$anonfun$map$1$adapted(ArraySeq.scala:71)
    at scala.collection.immutable.ArraySeq$.tabulate(ArraySeq.scala:288)
    at scala.collection.immutable.ArraySeq$.tabulate(ArraySeq.scala:267)
    at scala.collection.ClassTagIterableFactory$AnyIterableDelegate.tabulate(Factory.scala:664)
    at scala.collection.immutable.ArraySeq.map(ArraySeq.scala:71)
    at scala.collection.immutable.ArraySeq.map(ArraySeq.scala:35)
    at dagr.core.execsystem.TaskTracker.addTasks(TaskTracker.scala:121)
    at dagr.core.execsystem.TaskTracker.addTasks$(TaskTracker.scala:107)
    at dagr.core.execsystem.TaskManager.addTasks(TaskManager.scala:146)
    at dagr.core.execsystem.TaskTracker.addTasks(TaskTracker.scala:128)
    at dagr.core.execsystem.TaskTracker.addTasks$(TaskTracker.scala:128)
    at dagr.core.execsystem.TaskManager.addTasks(TaskManager.scala:146)
    at dagr.core.execsystem.TaskTracker.addTask(TaskTracker.scala:125)
    at dagr.core.execsystem.TaskTracker.addTask$(TaskTracker.scala:125)
    at dagr.core.execsystem.TaskManager.addTask(TaskManager.scala:146)
    at dagr.core.cmdline.DagrCoreArgs.execute(DagrCoreMain.scala:189)
    at dagr.core.cmdline.DagrCoreMain.makeItSo(DagrCoreMain.scala:237)
    at dagr.core.cmdline.DagrCoreMain.makeItSoAndExit(DagrCoreMain.scala:213)
    at dagr.core.cmdline.DagrCoreMain$.main(DagrCoreMain.scala:55)
    at dagr.core.cmdline.DagrCoreMain.main(DagrCoreMain.scala)

This didn't really make much sense to me since the code compiles in dagr, and there is definitely a function called PathUtil.sanitizeFileName. The only thing I can imagine being the issue, is that I am using a newer fulcrumgenomics.fgbio jar than the dagr dependency. Since the dagr last updated the commons dependency, sanitizeFileName was changed to add a fourth parameter. The version of fgbio that I have has incorporated this change into its own build.sbt. However, the version of commons specified in dagr build.sbt is using a version before PathUtil.sanitizeFileName was updated.

The error above says the function doesn't exist, but only specifies 3 parameters (String/String/Option) (the old version):

Exception in thread "main" java.lang.NoSuchMethodError: com.fulcrumgenomics.commons.io.PathUtil$.sanitizeFileName(Ljava/lang/String;Ljava/lang/String;Lscala/Option;)Ljava/lang/String;

The new version has 4 parameters (String/String/Option/Option).

I am currently testing my pipeline to see if this fixes it or not.