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

fix(dts-plugin): hold the broker server if the remote not start locally #3202

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

2heal1
Copy link
Member

@2heal1 2heal1 commented Nov 11, 2024

Description

capture connection failure event, hold the broker server if the remote not start locally

Related Issue

#3201

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

Copy link

changeset-bot bot commented Nov 11, 2024

🦋 Changeset detected

Latest commit: 3d39737

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@module-federation/dts-plugin Patch
@module-federation/enhanced Patch
@module-federation/manifest Patch
@module-federation/rspack Patch
@module-federation/modern-js Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/rsbuild-plugin Patch
@module-federation/storybook-addon Patch
@module-federation/modernjsapp Patch
@module-federation/runtime Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/devtools Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/retry-plugin Patch
@module-federation/data-prefetch Patch
@module-federation/error-codes Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch
website-new Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Nov 11, 2024

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 3d39737
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/6731c251288e5900084f5085
😎 Deploy Preview https://deploy-preview-3202--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@squadronai squadronai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

The pull request introduces a fix to the dts-plugin package, addressing an issue where the broker server would not hold if the remote failed to start locally. The changes capture the connection failure event and hold the broker server, providing a more informative error message to the user.

The key changes include:

  • Implementing a new error handling mechanism in the ModuleFederationDevServer class to capture the connection failure event.
  • Holding the broker server if the remote fails to start locally, ensuring a better user experience.
  • Updating the documentation to reflect the new changes.

These improvements to the dts-plugin package will enhance the overall reliability and usability of the Module Federation core functionality.

File Summaries
File Summary
packages/dts-plugin/src/server/DevServer.ts The code changes introduce a new error handling mechanism for the remote connection in the ModuleFederationDevServer class. It captures the connection failure event and holds the broker server if the remote fails to start locally, providing a more informative error message to the user.

Copy link
Contributor

@squadronai squadronai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incremental Review

Comments posted: 0

Configuration

Squadron Mode: essential

Commits Reviewed

1a80706ba5c93baff5a880ff401540835d48e897...3d39737b434076fbef301871bf52e1e5fcb22217

Files Reviewed
  • packages/dts-plugin/src/server/DevServer.ts
Files Ignored

These files were ignored due to the filter in the squadron.yaml file.

  • .changeset/fair-plums-live.md

@zhoushaw zhoushaw merged commit 85990e2 into main Nov 11, 2024
17 checks passed
@zhoushaw zhoushaw deleted the fix/catch-failed-ws-connect branch November 11, 2024 10:01
@KyrieLii KyrieLii mentioned this pull request Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants