Git Product home page Git Product logo

write_api_service's Introduction

The Write-API allows developer to automatically create GitHub and Quay repositories for any tool encapsulated in Docker and described with a CWL descriptor on behalf of the user. It implements the proposed GA4GH Write API

This contains two parts:

  • The Write API web service that handles creation of GitHub and Quay repositories
  • The client that interacts with the web service and handles publishing of tools to Dockstore.

See their respective READMEs in the write-api-client and write-api-service directories for more details.

write_api_service's People

Contributors

denis-yuen avatar garyluu avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

codehunterdev

write_api_service's Issues

Change secondary files to a list

Currently secondary files takes a single string as an input. Thus, it will only push one file to GitHub. In many cases, there will be multiple secondary files. Changing secondary files to a list of strings will allow multiple files to be pushed.

Message unclear on Dockerfile create without valid credentials

Expected

If the webservice does not have a correct quay.io token, we should see something like the following

$ java -jar target/write-api-client-0.1-alpha.0-SNAPSHOT-shaded.jar --config ~/.dockstore/write_api_client.properties  add --Dockerfile Dockerfile --cwl-file Dockstore.cwl
14:18:07.065 [main] INFO io.dockstore.client.cli.Add - Handling add...
14:18:09.598 [main] INFO io.dockstore.client.cli.Add - Created repository on git.
14:18:11.814 [main] INFO io.dockstore.client.cli.Add - Created branch, tag, and release on git.
14:18:17.039 [main] ERROR io.dockstore.client.cli.Add - Could not create Dockerfile: {"code":403,"message":"Web service does not have permission to create quay.io repo  (ID 0dadbb28c0adc651)."}

instead we see

$ java -jar target/write-api-client-0.1-alpha.0-SNAPSHOT-shaded.jar --config ~/.dockstore/write_api_client.properties  add --Dockerfile Dockerfile --cwl-file Dockstore.cwl
14:18:07.065 [main] INFO io.dockstore.client.cli.Add - Handling add...
14:18:09.598 [main] INFO io.dockstore.client.cli.Add - Created repository on git.
14:18:11.814 [main] INFO io.dockstore.client.cli.Add - Created branch, tag, and release on git.
14:18:17.039 [main] ERROR io.dockstore.client.cli.Add - Could not create Dockerfile: {"code":500,"message":"There was an error processing your request. It has been logged (ID 0dadbb28c0adc651)."}

Add command error

Sometimes (1/500 chance, currently nondeterministic), the 'Add' command will create a GitHub repository with no README file. As a result, no files can be added to that repository, no branches can be created. The repository is unusable.

Document how to create properties files

Out of the box, running mvn clean install fails and it isn't clear from the root readme how to fix it.
Clearly list steps needed to get this to run (i.e. create tokens and place then in X file)

Release and merge to develop

As we move toward a general release, we're going to need a tag + release + merge to develop.
Hubflow may help for this

Create news blog item in the UI

Create a new item in the blog for the UI,
announce the new write API, why you would use it rather than the UI or talking to the swagger UI (e.g. it creates repos and quay.io images for you).

Odd usage alignment

Usage: client [options] [command] [command options]
  Options:
    --config
      Config file location.
      Default: /home/dyuen/.dockstore/write.api.config.properties
    --help
      Prints help for the client.
      Default: false
  Commands:
    add      Add the Dockerfile and CWL file(s) using the write API.
      Usage: add [options]
        Options:
        * --Dockerfile
            The Dockerfile to upload
        * --cwl-file
            The cwl descriptor to upload
          --cwl-secondary-file
            The optional secondary cwl descriptor to upload
          --help
            Prints help for the add command
            Default: false
          --version
            The version of the tool to upload to

    publish      Publish tool to dockstore using the output of the 'add' 
            command. 
      Usage: publish [options]
        Options:
          --help
            Prints help for the publish command.
            Default: false
        * --tool
            The json output from the 'add' command.

Note that "Add the Dockerfile" and "Publish tool to dockstore" seem misaligned

Dockstore-ui's Write-API Conversion Process Outdated

Change Dockstore-ui's Write-API Conversion Process because it is outdated. It still includes organization and repository in the properties file and the help usage is also outdated (it doesn't include the check command and also id in the other command).

Is the id fixed in the config file?

It isn't clear how to create new repos
The interface

$ java -jar target/write-api-client-0.1-alpha.0-SNAPSHOT-shaded.jar --config ~/.dockstore/write_api_client.properties 
14:13:04.303 [main] WARN io.dockstore.client.cli.Client - Expecting 'publish' or 'add' command
Usage: client [options] [command] [command options]
  Options:
    --config
      Config file location.
      Default: /home/dyuen/.dockstore/write.api.config.properties
    --help
      Prints help for the client.
      Default: false
  Commands:
    add      Add the Dockerfile and CWL file(s) using the write API.
      Usage: add [options]
        Options:
        * --Dockerfile
            The Dockerfile to upload
        * --cwl-file
            The cwl descriptor to upload
          --cwl-secondary-file
            The optional secondary cwl descriptor to upload
          --help
            Prints help for the add command
            Default: false
          --version
            The version of the tool to upload to

    publish      Publish tool to dockstore using the output of the 'add' 
            command. 
      Usage: publish [options]
        Options:
          --help
            Prints help for the publish command.
            Default: false
        * --tool
            The json output from the 'add' command.

does not match the specification. In particular, the command-line tool in the specification https://wiki.oicr.on.ca/display/SOFTENG/Dockstore+Write+API+%28Paste-bin+service%29+Specification has an "id" field that allows a user to specify the organization and repository that is created to house the documents.

It looks like the config file has these values hard-coded.

Increase Verbosity for Publish Command

When using the publish command for a tool whose Dockerfile hasn't finished building on Quay.io, the client will sleep for a while waiting for the image to be built. However, no output is displayed to the user.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.