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

GET for a non-existent CRD yields a kube-rs warning #1604

Open
tiagolobocastro opened this issue Oct 14, 2024 · 0 comments
Open

GET for a non-existent CRD yields a kube-rs warning #1604

tiagolobocastro opened this issue Oct 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tiagolobocastro
Copy link
Contributor

Current and expected behavior

Issuing a get for a CRD yields a tracing warn:

  2024-10-14T18:23:21.682303Z  WARN kube_client::client: Unsuccessful data error parse: 404 page not found

    at /home/tiago/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kube-client-0.85.0/src/client/mod.rs:445

Also, notice that there''s a new line in there!

Not sure what the expected behaviour should be, though this does look a little strange.

Possible solution

No response

Additional context

This is easy to reproduce:

let res = client.send(req.map(hyper::Body::from)).await.unwrap();
    println!("res: {res:#?}");
    let body_bytes = hyper::body::to_bytes(res.into_body())
        .await
        .map_err(kube::Error::HyperError)?;
    let text = String::from_utf8(body_bytes.to_vec()).map_err(kube::Error::FromUtf8)?;
    println!("body: Begin{text}End");

Which yields:

res: Response {
    status: 404,
    version: HTTP/1.1,
    headers: {
        "audit-id": "2cff0fa2-a355-443f-bf16-2c71ee944648",
        "cache-control": "no-cache, private",
        "content-type": "text/plain; charset=utf-8",
        "x-content-type-options": "nosniff",
        "x-kubernetes-pf-flowschema-uid": "d0d3e889-13d4-492e-9386-3caa9aa84922",
        "x-kubernetes-pf-prioritylevel-uid": "8db535aa-cee9-4628-8b42-fa064d872f81",
        "date": "Mon, 14 Oct 2024 18:48:41 GMT",
        "content-length": "19",
    },
    body: Body(
        Streaming,
    ),
}
body: Begin404 page not found
End

Environment

> kubectl version
Client Version: v1.30.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.9

Configuration and features

kube = { version = "0.85.0", features = ["runtime", "derive"] }
k8s-openapi = { version = "0.19.0", features = ["v1_22"] }

Affected crates

No response

Would you like to work on fixing this bug?

maybe

@tiagolobocastro tiagolobocastro added the bug Something isn't working label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@tiagolobocastro and others