Git Product home page Git Product logo

argo-client-gen's People

Contributors

alexec avatar crenshaw-dev avatar tamil07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

argo-client-gen's Issues

java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING when using non-object withItems

To reproduce:

# Submit a workflow where withItems is an array of strings.
argo submit https://raw.githubusercontent.com/argoproj/argo/master/examples/loops-dag.yaml

# Grab my branch with the test modified to just list workflows.
git clone https://github.com/mac9416/argo-client-gen
cd argo-client-gen
git checkout withitems-bug

# Build and test.
make java
make test-java

You should receive the following error:

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 758 path $.items[0].spec.templates[0].dag.tasks[1].withItems[0]
        at io.argoproj.workflow.SmokeIT.testArgoServerAPI(SmokeIT.java:39)

Ideally fixing argoproj/argo-workflows#2790 would fix this. But I suspect that bug will require using Swagger's oneOf feature, which it looks like openapi-generator does not yet support.

Assuming we can't find a swagger spec that satisfies openapi-generator, maybe the next best solution is to override withItems to be simply a list of objects. That would allow proper posting of workflows. It may even permit proper retrieval, assuming the client can cast to a known type.

To go that route, we'd probably want to create a named, synthetic type in swagger.json to represent the type of withItems. That would allow easily overriding the type by name in openapi-generator. If the type info were embedded directly in the withItems block, I'm not sure it could be overridden so easily.

`make java` failes with "Cannot find symbol... IoArgoprojV1alpha1WorkflowStep"

Here's the failure in the build logs:

[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/mcrenshaw/src/argo-client-gen/java/src/main/java/io/argoproj/workflow/models/Template.java:[28,35] cannot find symbol
  symbol:   class IoArgoprojV1alpha1WorkflowStep
  location: package io.argoproj.workflow.models
[ERROR] /home/mcrenshaw/src/argo-client-gen/java/src/main/java/io/argoproj/workflow/models/Template.java:[169,21] cannot find symbol
  symbol:   class IoArgoprojV1alpha1WorkflowStep
  location: class io.argoproj.workflow.models.Template
[ERROR] /home/mcrenshaw/src/argo-client-gen/java/src/main/java/io/argoproj/workflow/models/Template.java:[891,35] cannot find symbol
  symbol:   class IoArgoprojV1alpha1WorkflowStep
  location: class io.argoproj.workflow.models.Template
[ERROR] /home/mcrenshaw/src/argo-client-gen/java/src/main/java/io/argoproj/workflow/models/Template.java:[897,37] cannot find symbol
  symbol:   class IoArgoprojV1alpha1WorkflowStep
  location: class io.argoproj.workflow.models.Template
[ERROR] /home/mcrenshaw/src/argo-client-gen/java/src/main/java/io/argoproj/workflow/models/Template.java:[912,20] cannot find symbol
  symbol:   class IoArgoprojV1alpha1WorkflowStep
  location: class io.argoproj.workflow.models.Template
[ERROR] /home/mcrenshaw/src/argo-client-gen/java/src/main/java/io/argoproj/workflow/models/Template.java:[917,34] cannot find symbol
  symbol:   class IoArgoprojV1alpha1WorkflowStep
  location: class io.argoproj.workflow.models.Template

Must have been a recent change in swagger.json. I'm looking into it, but @alexec if anything jumps to mind let me know.

Misleading README - official clients are only for workflows

There is no support for Argo CD in official clients, so README should be updated to include the information, that the clients are for Argo Workflows.

Readme in clients could be also updated to state it clearly.
Name of the repository also suggest, that the client is generic for all Argo projects, not just workflows.

`make java` failing to pull in argo-client-java submodule

$ make java
git submodule update --init java
fatal: remote error: upload-pack: not our ref d9290f9a560f41cbcdf870ae4ccbcfcdeff916eb
Fetched in submodule path 'java', but it did not contain d9290f9a560f41cbcdf870ae4ccbcfcdeff916eb. Direct fetching of that commit failed.

I don't know what that hash refers to. I'm able to clone the argo-client-java repo, so I'm not sure why submodules would fail.

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.