java icon indicating copy to clipboard operation
java copied to clipboard

Example code to list all pods results in Java error in IntelliJ

Open Simpson99091 opened this issue 2 years ago • 4 comments
trafficstars

Describe the bug Example code to list all pods results in Java error in IntelliJ.

Client Version 15.0.1

Kubernetes Version n/a

Java Version Java 11

To Reproduce

  1. Start a new maven project in IntelliJ. Include dependency in POM:
<dependency>
    <groupId>io.kubernetes</groupId>
    <artifactId>client-java</artifactId>
    <version>15.0.1</version>
</dependency>
  1. Copy the example code from https://github.com/kubernetes-client/java/wiki/3.-Code-Examples "list all pods:" into a new Java class.

Expected behavior I expected to be able to compile the example code from https://github.com/kubernetes-client/java/wiki/3.-Code-Examples to list all pods and run it. However, the IDE reports this as an error.

listPodForAllNamespaces(java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.Integer, java.lang.String, java.lang.String, ...)' in 'io.kubernetes.client.openapi.apis.CoreV1Api' cannot be applied to '(null, null, null, null, null, null, null, null, null)

Note: I was able to get it to work by adding an extra "null" to the parameter list! But I'm not able to edit the Wiki.

Simpson99091 avatar Aug 15 '23 18:08 Simpson99091

Yes, one null parameter is absent in the example code, this may confuse the starters. Is it really hard to change the wiki?

Mert18 avatar Nov 18 '23 08:11 Mert18

The wiki probably shouldn't contain sample code, it's really hard to keep it up to date. Instead we should point people to the example code which is checked into the repository, that's validated with CI/CD.

@yue9944882 wdyt?

brendandburns avatar Nov 23 '23 15:11 brendandburns

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Feb 21 '24 15:02 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Mar 22 '24 16:03 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Apr 21 '24 17:04 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

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.

k8s-ci-robot avatar Apr 21 '24 17:04 k8s-ci-robot