question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IntOrString type broke in 0.16.2

See original GitHub issue

Describe the bug It seems that in the latest tag 0.16.2 intOrString type is broken again. In the 0.16.1 tag the IntOrString type was fixed. Related issues:

Seems like this commit https://github.com/kubernetes-client/javascript/commit/1f79306db6d70d336319d1cb60941cd24eed300a undid the work done in this commit https://github.com/kubernetes-client/javascript/commit/d44fa64da440559b55f0b70f30271b9d3097f3d2

** Client Version ** 0.16.2

To Reproduce

  1. Install version 0.16.1 and check file @kubernetes/client-node/dist/gen/model/v1PodDisruptionBudgetSpec.d.ts V1PodDisruptionBudgetSpec should look like this:
export declare class V1PodDisruptionBudgetSpec {
    'maxUnavailable'?: IntOrString;
    'minAvailable'?: IntOrString;
}
  1. Install version 0.16.2 and check file @kubernetes/client-node/dist/gen/model/v1PodDisruptionBudgetSpec.d.ts V1PodDisruptionBudgetSpec now looks like this, which removes the fixed type in 0.16.1
export declare class V1PodDisruptionBudgetSpec {
    'maxUnavailable'?: object;
    'minAvailable'?: object;
}

Expected behavior Generated type should be:

export declare class V1PodDisruptionBudgetSpec {
    'maxUnavailable'?: IntOrString;
    'minAvailable'?: IntOrString;
}

Environment (please complete the following information):

  • OS: MacOs
  • NodeJS Version 16

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brendandburnscommented, Feb 9, 2022

0.16.3 has been pushed out to NPM.

1reaction
brendandburnscommented, Feb 1, 2022

Weird, not sure what happened here, but I will fix it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

V1ServicePort with wrong type for targetPort #666 - GitHub
Describe the bug The "targetPort" type is defined as "object" while the possibility of values can be both number and string.
Read more >
himenon/openapi-typescript-code-generator - npm package
This library provides TypeScript type definitions and extracted parameters from OpenAPI v3.0.x compliant specifications. TypeScript AST is used to generate ...
Read more >
intstr - Go Packages
This method returns a scaled value from an IntOrString type. If the IntOrString is a percentage string value it's treated as a percentage...
Read more >
Change log for 4.6.52
Merge of IntOrString type #83956; feat(scheduler): implement NodePreferAvoidPods as ... Update to rules_go 0.16.2 and gazelle 0.15.0 #70456 ...
Read more >
@kubernetes/client-node: Versions | Openbase
Support for Kubernetes 1.22.x; Bug fix to support IntOrString types; Add List method to ... 0.16.2. 1 year ago ... Warning Breaking Changes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found