fix(ops): restore the ops/client subpath and IngressRoute.ingressClassName - #41
Merged
Conversation
Restore @kubernetesjs/ops/client as a re-export of the core transport, and patch spec.ingressClassName back onto the Traefik IngressRoute definition.
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Review complete. No issues found — approved ✅. This PR extends the generated Traefik IngressRoute type with an optional
The only candidate finding (a low-confidence suggestion to guard the injection against an already-present field) fell below the confidence threshold and was not retained. Reviewed commit: 01aa7b4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two regressions in the published
@kubernetesjs/ops@1.2.1, both found by typecheckingconstructive-dbagainst it.1.
@kubernetesjs/ops/clientdisappeared. #40 deletedpackages/ops/src/client.tsbecause the generated index no longer imports it — but the file was also a public entry point, soconstructive-db's reconciler broke withTS2307: Cannot find module '@kubernetesjs/ops/client'. The file comes back as a re-export only, so the transport still lives once, inkubernetesjs:The generated index keeps importing
kubernetesjs/clientdirectly (unchanged codegen config); nothing routes through the shim except consumers that already imported that subpath.2.
IngressRoute.spec.ingressClassNameis missing from the generated types. Traefik added it in traefik/traefik#12313, butscripts/swagger.jsonis a snapshot of one cluster's CRDs, and that cluster ran an older Traefik — soops@1.1.0had the field (its snapshot came from a newer cluster) and1.2.1silently dropped it, breakingspec.ingressClassName = …in the reconciler's http-route handler. Rather than depend on which cluster the spec was last fetched from, codegen now pins the field:Like the existing
IntOrStringpatch, this is idempotent and survives a re-fetch of the spec from either an older or a newer cluster.Regenerated output is exactly one added line (
ingressClassName?: string;onTraefikIoV1alpha1IngressRoute);pnpm buildandpnpm lintpass, anddist/client.{js,d.ts}is emitted again so the subpath resolves in the published tarball.Link to Devin session: https://app.devin.ai/sessions/95f4ed628067485ebab80535c50d6e88
Requested by: @pyramation