Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TektonMockServer: get fails for v1alpha1, works for v1beta1 #2158

Closed
Fabian-K opened this issue Apr 22, 2020 · 6 comments
Closed

TektonMockServer: get fails for v1alpha1, works for v1beta1 #2158

Fabian-K opened this issue Apr 22, 2020 · 6 comments

Comments

@Fabian-K
Copy link
Contributor

Hi,

I´m facing a strange issue with the TektonServer mock. When I create a taskrun and try to get it afterwards, the TektonServer returns 404. This works when using v1beta1. It also works (for both v1beta1 and v1alpha1 when not getting the single task run but instead listing all taskruns.

This is using a local build of master. Any idea what is going on ?! 😲

Code:

tkn.v1alpha1().taskRuns().create(
        io.fabric8.tekton.pipeline.v1alpha1.TaskRunBuilder()
                .withNewMetadata().withName("run")
                .endMetadata()
                .build()
)
assertThat(tkn.v1alpha1().taskRuns().withName("run").get()).isNotNull

Logs:

// CREATE
INFORMATION: MockWebServer[54885] starting to accept connections
[Test worker] WARN io.fabric8.kubernetes.client.internal.VersionUsageUtils - The client is using resource type 'taskruns' with unstable version 'v1alpha1'
--> POST https://localhost:54885/apis/tekton.dev/v1alpha1/namespaces/test/taskruns
Content-Type: application/json; charset=utf-8
Content-Length: 79

{"apiVersion":"tekton.dev/v1alpha1","kind":"TaskRun","metadata":{"name":"run"}}
--> END POST (79-byte body)
INFORMATION: MockWebServer[54885] received request: POST /apis/tekton.dev/v1alpha1/namespaces/test/taskruns HTTP/1.1 and responded: HTTP/1.1 202 OK
<-- 202 OK https://localhost:54885/apis/tekton.dev/v1alpha1/namespaces/test/taskruns (112ms)
Content-Length: 79

{"apiVersion":"tekton.dev/v1alpha1","kind":"TaskRun","metadata":{"name":"run"}}
<-- END HTTP (79-byte body)

// GET
--> GET https://localhost:54885/apis/tekton.dev/v1alpha1/namespaces/test/taskruns/run
--> END GET
<-- 404 Client Error https://localhost:54885/apis/tekton.dev/v1alpha1/namespaces/test/taskruns/run (3ms)
Content-Length: 0
<-- END HTTP (0-byte body)
INFORMATION: MockWebServer[54885] received request: GET /apis/tekton.dev/v1alpha1/namespaces/test/taskruns/run HTTP/1.1 and responded: HTTP/1.1 404 Client Error
@rohanKanojia
Copy link
Member

@rohanKanojia
Copy link
Member

Are you facing this issue in real server too?

Fabian-K added a commit to Fabian-K/kubernetes-client that referenced this issue Apr 23, 2020
Fabian-K added a commit to Fabian-K/kubernetes-client that referenced this issue Apr 24, 2020
@rohanKanojia
Copy link
Member

@Fabian-K : Shall we close this issue?

@Fabian-K
Copy link
Contributor Author

Fabian-K commented May 4, 2020

Yes, this is now resolved in master :)

@Fabian-K Fabian-K closed this as completed May 4, 2020
@rohanKanojia
Copy link
Member

@Fabian-K : We have released a new version of Fabric8 Kubernetes client which contains your fix for this. See twitter announcement[0]. Thanks a lot for your work on these extensions. Bdw, Did we get your Twitter username right?

[0] https://twitter.com/fabric8io/status/1257266173005254656

@Fabian-K
Copy link
Contributor Author

Fabian-K commented May 4, 2020

Awesome, thanks for this! 🤩 Updating the dependencies in my projects now... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants