galaxyproject / galaxyproject/dockstore-galaxy-interface

NPE Parsing a workflow

Open
#26 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Dockstore is failing to register this [workflow](https://github.com/nebiolabs/neb-galaxy-workflows/blob/f3ab079e9b365794727c13a5da3daea064a26513/nebnext-immune-sequencing/presto_immune_sequencing_v3.20.ga) from this repo: https://github.com/nebiolabs/neb-galaxy-workflows

I tried debugging it a little, and this plugin is throwing an NPE, so there's not even an error message that the end-user sees.

Here's the stack trace I see when running in the plugin locally (I added a test in my local repo, hence the `testPrestoImmuneValidation` method which doesn't exist in this repo:

```
java.lang.NullPointerException
at org.galaxyproject.gxformat2.v19_09.utils.LoadingOptions.expandUrl(LoadingOptions.java:93)
at org.galaxyproject.gxformat2.v19_09.utils.UriLoader.expandUrl(UriLoader.java:26)
at org.galaxyproject.gxformat2.v19_09.utils.UriLoader.load(UriLoader.java:48)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.load(Loader.java:16)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.loadField(Loader.java:85)
at org.galaxyproject.gxformat2.v19_09.WorkflowStepInputImpl.(WorkflowStepInputImpl.java:149)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.galaxyproject.gxformat2.v19_09.utils.RecordLoader.load(RecordLoader.java:23)
at org.galaxyproject.gxformat2.v19_09.utils.RecordLoader.load(RecordLoader.java:6)
at org.galaxyproject.gxformat2.v19_09.utils.UnionLoader.load(UnionLoader.java:26)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.load(Loader.java:16)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.loadField(Loader.java:85)
at org.galaxyproject.gxformat2.v19_09.utils.ArrayLoader.load(ArrayLoader.java:27)
at org.galaxyproject.gxformat2.v19_09.utils.ArrayLoader.load(ArrayLoader.java:6)
at org.galaxyproject.gxformat2.v19_09.utils.OptionalLoader.load(OptionalLoader.java:20)
at org.galaxyproject.gxformat2.v19_09.utils.OptionalLoader.load(OptionalLoader.java:5)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.load(Loader.java:16)
at org.galaxyproject.gxformat2.v19_09.utils.IdMapLoader.load(IdMapLoader.java:51)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.load(Loader.java:16)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.loadField(Loader.java:85)
at org.galaxyproject.gxformat2.v19_09.WorkflowStepImpl.(WorkflowStepImpl.java:476)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.galaxyproject.gxformat2.v19_09.utils.RecordLoader.load(RecordLoader.java:23)
at org.galaxyproject.gxformat2.v19_09.utils.RecordLoader.load(RecordLoader.java:6)
at org.galaxyproject.gxformat2.v19_09.utils.UnionLoader.load(UnionLoader.java:26)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.load(Loader.java:16)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.loadField(Loader.java:85)
at org.galaxyproject.gxformat2.v19_09.utils.ArrayLoader.load(ArrayLoader.java:27)
at org.galaxyproject.gxformat2.v19_09.utils.ArrayLoader.load(ArrayLoader.java:6)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.load(Loader.java:16)
at org.galaxyproject.gxformat2.v19_09.utils.IdMapLoader.load(IdMapLoader.java:51)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.load(Loader.java:16)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.loadField(Loader.java:85)
at org.galaxyproject.gxformat2.v19_09.GalaxyWorkflowImpl.(GalaxyWorkflowImpl.java:311)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.galaxyproject.gxformat2.v19_09.utils.RecordLoader.load(RecordLoader.java:23)
at org.galaxyproject.gxformat2.v19_09.utils.RecordLoader.load(RecordLoader.java:6)
at org.galaxyproject.gxformat2.v19_09.utils.UnionLoader.load(UnionLoader.java:26)
at org.galaxyproject.gxformat2.v19_09.utils.Loader.documentLoad(Loader.java:41)
at org.galaxyproject.gxformat2.v19_09.utils.RootLoader.loadDocument(RootLoader.java:18)
at org.galaxyproject.gxformat2.v19_09.utils.RootLoader.loadDocument(RootLoader.java:23)
at org.galaxyproject.gxformat2.v19_09.utils.RootLoader.loadDocument(RootLoader.java:27)
at org.galaxyproject.gxformat2.Format2Linter.lint(Format2Linter.java:10)
at org.galaxyproject.gxformat2.Lint.lint(Lint.java:20)
at org.galaxyproject.dockstore_galaxy_interface.language.GalaxyWorkflowPlugin$GalaxyWorkflowPluginImpl.validateWorkflowSet(GalaxyWorkflowPlugin.java:115)
at org.galaxyproject.dockstore_galaxy_interface.language.GalaxyWorkflowLanguagePluginTest.testPrestoImmuneValidation(GalaxyWorkflowLanguagePluginTest.java:173)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with LoadingOptions.expandUrl and the surrounding UriLoader.load path shown in the stack trace, then inspect GalaxyWorkflowPluginImpl.validateWorkflowSet and GalaxyWorkflowLanguagePluginTest. Reproduce the linked workflow failure and confirm that parsing no longer produces an unhandled NullPointerException and instead exposes an error to the end user.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.