question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Files endpoint fails for hosted published workflow with test parameter json

See original GitHub issue

Bug Report

When viewing a published hosted workflow that has a test parameter JSON, there is an error fetching the version’s files using the GA4GH API. If the hosted workflow has no JSON, then there is no error.

Interestingly, although I see the error in Chrome, I haven’t found yet how the UI’s behavior has changed. 😦

This endpoint also fails in production, but the UI in production never invokes that API.

Steps to reproduce the behaviour

  1. curl 'https://staging.dockstore.org/api/api/ga4gh/v2/tools/%23workflow%2Fdockstore.org%2Fcoverbeck%2Fhelloworld/versions/4/CWL/files'
  2. Yields {"code":500,"message":"There was an error processing your request. It has been logged (ID 0ead45002d64e786)."}

On the server side:

ERROR [2019-02-05 18:50:10,919] io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request: 9e9b2bcd57255637
! java.lang.IllegalArgumentException: 'other' is different type of Path
! at sun.nio.fs.UnixPath.relativize(UnixPath.java:416)
! at sun.nio.fs.UnixPath.relativize(UnixPath.java:43)
! at io.swagger.api.impl.ToolsApiServiceImpl.lambda$getToolFiles$9(ToolsApiServiceImpl.java:722)
! at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
! at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1380)
! at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
! at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
! at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
! at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
! at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
! at io.swagger.api.impl.ToolsApiServiceImpl.getToolFiles(ToolsApiServiceImpl.java:727)
! at io.swagger.api.impl.ToolsApiServiceImpl.toolsIdVersionsVersionIdTypeFilesGet(ToolsApiServiceImpl.java:652)
! at io.swagger.api.ToolsApi.toolsIdVersionsVersionIdTypeFilesGet(ToolsApi.java:201)
! at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
! at java.lang.reflect.Method.invoke(Method.java:498)
! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)

┆Issue is synchronized with this Jira Bug ┆Fix Versions: Dockstore 1.6 ┆Issue Number: DOCK-254 ┆Sprint: Backlog ┆Issue Type: Bug

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
garyluucommented, Feb 5, 2019

The UI needs to call that endpoint in order to get the wget command in the launch tab. The call is done so in develop and staging whereas production currently may end up with an incorrect command.

0reactions
coverbeckcommented, Mar 26, 2019

Confirmed that it is fixed in 1.6.0-rc.0; curling the endpoint now returns a JSON object:

curl "https://staging.dockstore.org/api/api/ga4gh/v2/tools/%23workflow%2Fdockstore.org%2Fcoverbeck%2Fhelloworld/versions/3/CWL/files"
[{"file_type":"PRIMARY_DESCRIPTOR","path":"Dockstore.cwl"},{"file_type":"TEST_FILE","path":"test.cwl.json"}]
Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON formatting with jq and CI/CD linting automation - GitLab
Learn how to filter in JSON data structures and interact with the REST API. Use the GitLab API to lint your CI/CD configuration...
Read more >
Create Standard workflows in single-tenant Azure Logic Apps ...
Create Standard logic app workflows that run in single-tenant Azure Logic Apps to automate integration tasks across apps, data, services, ...
Read more >
REST API Testing Strategy: What Exactly Should You Test?
Here's a technical look at how we test our APIs. ... Check valid JSON body and correct field names, types, and values —...
Read more >
Using the JSON format in AWS Glue
You can use AWS Glue to read JSON files from Amazon S3, as well as bzip and gzip ... JSON file that we...
Read more >
Using CSV and JSON Data Files in the Postman Collection ...
The request uses the username variable as a URL parameter. 4. Open the test script editor. It'll show you the following snippet: tests["Body ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found