toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

Migrate from @azure/core-http to @azure/core-rest-pipeline and upgrade undici to v7

Open Copilot opened this issue 2 months ago • 6 comments

Migration Plan: Replace @azure/core-http with @azure/core-rest-pipeline

  • [x] Update artifact package dependencies
    • [x] Remove @azure/core-http dependency from package.json
    • [x] Add @azure/core-rest-pipeline dependency
  • [x] Update artifact package code
    • [x] Replace import from @azure/core-http-compat to @azure/core-rest-pipeline in blob-upload.ts
  • [x] Update package-lock.json
    • [x] Run npm install to update lockfiles
  • [x] Verify no other usages of @azure/ms-rest-js exist
  • [x] Build and test changes
    • [x] Build the artifact package
    • [x] Run tests for artifact package (all 106 tests passed)
  • [x] Initial verification
    • [x] Run linter
    • [x] Security checks
  • [x] Update undici to version 7
    • [x] Update http-client package to use undici ^7.0.0
    • [x] Update github package to use undici ^7.0.0
    • [x] Update attest package to use undici ^7.0.0
    • [x] Update github package to depend on http-client ^3.0.0
    • [x] Update core package @types/node to ^24.1.0 for compatibility
    • [x] Build all packages successfully
  • [x] Final verification
    • [x] Run tests for updated packages (github: 16 passed, attest: 26 passed)
    • [x] Build all packages successfully
    • [x] Run linter (passed)
    • [x] Security checks (CodeQL: no alerts, gh-advisory: no vulnerabilities)
    • [x] Ensure package symlinks are correct for monorepo development
  • [x] Version bumps and documentation
    • [x] Bump http-client version to 3.1.0
    • [x] Bump github version to 6.1.0
    • [x] Bump attest version to 2.2.0
    • [x] Update RELEASES.md for http-client
    • [x] Update RELEASES.md for github
    • [x] Update RELEASES.md for attest
  • [x] Fix CI build failures
    • [x] Add undici ^7.0.0 to npm overrides in root package.json
    • [x] Clean rebuild and test all packages
    • [x] Verify TypeScript compilation succeeds

Summary

Successfully migrated from deprecated Azure SDK packages and upgraded undici to v7:

  • ✅ Removed @azure/core-http from artifact package
  • ✅ Upgraded to @azure/core-rest-pipeline
  • ✅ Upgraded undici from v5/v6 to v7 across http-client, github, and attest packages
  • ✅ Bumped package versions and updated release notes
  • ✅ Fixed CI build failures by adding undici override
  • ✅ All tests passing
  • ✅ No security vulnerabilities
  • ✅ TypeScript compilation successful
Original prompt

This section details on the original issue you should resolve

<issue_title>migrate off @azure/ms-rest-js and @azure/core-http</issue_title> <issue_description>Consider move to the more modern @azure/core-rest-pipeline

  • https://github.com/search?q=repo%3Aactions%2Ftoolkit+%40azure%2Fcore-http&type=code
  • https://github.com/search?q=repo%3Aactions%2Ftoolkit%20%40azure%2Fms-rest-js&type=code

</issue_description>

Comments on the Issue (you are @copilot in this section)

  • Fixes actions/toolkit#1836

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot avatar Dec 10 '25 23:12 Copilot