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

1.0.0 released - where are the migration docs? #2117

Open
klippx opened this issue Dec 19, 2024 · 3 comments
Open

1.0.0 released - where are the migration docs? #2117

klippx opened this issue Dec 19, 2024 · 3 comments

Comments

@klippx
Copy link

klippx commented Dec 19, 2024

Describe the bug

HttpError is no longer exported in 1.0.0

** Client Version **
1.0.0

To Reproduce
Prior to 1.0.0:

import * as k8s from '@kubernetes/client-node';

try {
  // do something with k8s
} catch (e) {
  if (e instanceof k8s.HttpError) {
    console.error(e.body);
  }
}

Expected behavior
If HttpError is not exported, I would be happy to see any upgrade docs state what the replacement is.

@brendandburns
Copy link
Contributor

1.0.0 marks a major switch in the HTTP backend from request which has been deprecated for years to node-fetch which is still supported.

Unfortunately, there's breaking changes all over the place as a result of this switch. We would definitely love help in authoring a migration guide, at this point the best thing to do is to look at the examples in the release-1.x branch:

https://github.com/kubernetes-client/javascript/tree/release-1.x/examples

@brendandburns
Copy link
Contributor

There's also fairly extensive discussion here:

#414

@cjihrig
Copy link
Contributor

cjihrig commented Dec 19, 2024

HttpError is no longer exported in 1.0.0

It looks like the new generator does have an HttpException class. However, it doesn't appear to actually be used anywhere in the code.

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

3 participants