Coder Social home page Coder Social logo

Comments (18)

polygonhell avatar polygonhell commented on July 17, 2024 1

Thanks, no real rush on this.
I already had a workaround, in order to deal with the transition to web socket in the exec query I have to add a bunch of headers to the query anyway.
I just noticed this as dealing with that.

from haskell.

jonschoning avatar jonschoning commented on July 17, 2024 1

ok i'll put in an update to the generator

from haskell.

jonschoning avatar jonschoning commented on July 17, 2024

It looks like the (-&-) operator currently only allows setting a single value.

I might change the generator to have (-&-) default to appending values instead of replacing values, but will have to think about the the right default is.

In the meantime, you can use the setQuery function directly to set a list of parameters with the same name at the same time, and they will all be output in the final querystring.

CoreV1.connectGetNamespacedPodExec (Accept MimeAny) name namespace
  `setQuery` (toQuery ("command", Just "ls") ++ toQuery ("command", Just "/"))
  -&- (Stdout True)
  -&- (Stderr True) 

from haskell.

polygonhell avatar polygonhell commented on July 17, 2024

One additional point, that might influence which way you decide to go with a solution this came up again with label selectors.

from haskell.

jonschoning avatar jonschoning commented on July 17, 2024

ah, good to know. I think part of what exacerbates this is that in the kubernetes swagger spec it looks like labelSelector is typed as a string query parameter for many of these operations, so the generator doesn't know that this can accept multiple values

but i think it may make more sense to append rather than replace, since the use-case for replacing doesn't seem like something that would come up very often

from haskell.

polygonhell avatar polygonhell commented on July 17, 2024

Yes, the problem is one common way collections are passed in query strings is to just repeat them in query.
Which leaves the swagger specs under defined.
One option if your not comfortable changing (-&-) would be to add a second operator (-&&-) that has the add's rather than replaces.
Yes I can't imagine when the replace would matter.

from haskell.

jonschoning avatar jonschoning commented on July 17, 2024

@polygonhell Is the spec actually asking for a CSV list instead of multiple instances of the query parameter here? or do both work?

https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#list-and-watch-filtering

that would be compatible with the string type in the swagger spec.

Still might change the generator to append, but I wonder if building the CSV list as a string and setting that as a single parameter also works for you.

from haskell.

polygonhell avatar polygonhell commented on July 17, 2024

I think both work, my test seemed to work with multiple instances.
But it wasn't exactly exhaustive, I'll try again later when I have access to the machine

from haskell.

polygonhell avatar polygonhell commented on July 17, 2024

My error it looks like if you pass 2 labelSelectors it's just ignoring the second one, the correct syntax is as you state comma separated.

from haskell.

jonschoning avatar jonschoning commented on July 17, 2024

/close

from haskell.

k8s-ci-robot avatar k8s-ci-robot commented on July 17, 2024

@jonschoning: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from haskell.

jonschoning avatar jonschoning commented on July 17, 2024

Please re-open if the problem still persists

from haskell.

polygonhell avatar polygonhell commented on July 17, 2024

/re-open
Sorry to clarify the command problem still exists, the labelselector issue does not.

from haskell.

akshaymankar avatar akshaymankar commented on July 17, 2024

/reopen

from haskell.

k8s-ci-robot avatar k8s-ci-robot commented on July 17, 2024

@akshaymankar: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from haskell.

jonschoning avatar jonschoning commented on July 17, 2024

OpenAPITools/openapi-generator#7805

from haskell.

jonschoning avatar jonschoning commented on July 17, 2024

/close
resolved with #79

from haskell.

k8s-ci-robot avatar k8s-ci-robot commented on July 17, 2024

@jonschoning: Closing this issue.

In response to this:

/close
resolved with OpenAPITools/openapi-generator#7805

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from haskell.

Related Issues (20)

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.