Skip to content

WIP Undici migration p2#2813

Draft
davidgamero wants to merge 5 commits intokubernetes-client:mainfrom
davidgamero:undici-migration-p2
Draft

WIP Undici migration p2#2813
davidgamero wants to merge 5 commits intokubernetes-client:mainfrom
davidgamero:undici-migration-p2

Conversation

@davidgamero
Copy link
Copy Markdown
Contributor

@davidgamero davidgamero commented Mar 26, 2026

node-fetch removals

  • rips out node-fetch and @types/node-fetch, uses native fetch (undici) everywhere
  • drops nock, migrates all test mocking to undici MockAgent
  • rewrite health, log, watch to use fetch() + Readable.fromWeb() for streaming
  • rename integration_test.ts → fullrequest_test.ts since it's a unit test

auth

  • removes applyToFetchOptions from kubeconfig (dead after migration)
  • cleans up dead tls config in applySecurityAuthentication (was set then immediately overwritten)

watch

  • treat watch TimeoutError as reconnectable in informer, add exponential backoff on reconnect
  • normalize timeout errors in watch.ts (fixes Node 23 mid-stream AbortError vs TimeoutError inconsistency)
  • add integration test for watch

informer

  • add informer reconnect integration test

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 26, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidgamero

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 26, 2026
@cjihrig
Copy link
Copy Markdown
Contributor

cjihrig commented Mar 26, 2026

This is really great progress on modernizing the project. Thanks for working on it.

@davidgamero
Copy link
Copy Markdown
Contributor Author

This is really great progress on modernizing the project. Thanks for working on it.

thanks! i was trying to remove nock so we can consolidate testing into undici mockagent and it snowballed

@davidgamero davidgamero force-pushed the undici-migration-p2 branch from 60b46b0 to 7a25b4f Compare March 27, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants