-
Notifications
You must be signed in to change notification settings - Fork 45
feat: add exponential backoff retry logic to loadApp call #664
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
Merged
Conversation
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
to avoid failing SystemJS imports by timeout or other issues
stas-nc
reviewed
Aug 26, 2025
ilc/client/BundleLoader.ts
Outdated
| #sdkFactoryBuilder; | ||
|
|
||
| constructor(configRoot, moduleLoader, sdkFactoryBuilder) { | ||
| #cache = new WeakMap<AppBundle, ILCAdapter>(); |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like incomplete rewrite to TS (missing private)
stas-nc
approved these changes
Aug 26, 2025
Coverage ReportIlc/serverCommit SHA:41472128e42158f350a824f690e9c22523cf9cc3 Test coverage results 🧪File details
Ilc/clientCommit SHA:41472128e42158f350a824f690e9c22523cf9cc3 Test coverage results 🧪File details
RegistryCommit SHA:41472128e42158f350a824f690e9c22523cf9cc3 Test coverage results 🧪File details
|
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
This PR refactors the existing
BundleLoaderclass from JavaScript to TypeScript and adds exponential retry functionality for improved reliability when loading micro-frontend applications. The refactoring provides better type safety and enhanced error handling capabilities.Changes
Files Changed
ilc/client/BundleLoader.ts- Refactored from JavaScript to TypeScriptilc/client/BundleLoader.spec.ts- New comprehensive test suiteilc/client/utils/exponentialRetry.ts- New utility for exponential backoff retry logicKey Improvements
🔄 NEW: Exponential Retry Mechanism
exponential-backofflibrary for reliable retry logic📝 TypeScript Refactoring
ModuleLoader,AppConfig,LoadAppOptions)🎯 Enhanced API
LoadAppOptionsinterface for configurable loading behaviorinjectGlobalCssflag for CSS injection controlretryOptionsparameter for customizing retry behaviorKey Changes
Exponential Retry Integration
Type Definitions
Backward Compatibility
✅ Fully backward compatible - All existing
BundleLoaderAPIs remain unchanged. The refactoring maintains the same public interface while adding optional retry functionality through the newoptionsparameter.Migration Notes
BundleLoaderhas been replaced with this TypeScript versionBundleLoaderoptionsparameterFiles Changed:
ilc/client/BundleLoader.ts(refactored from JS to TS)ilc/client/BundleLoader.spec.ts(new comprehensive test suite)ilc/client/utils/exponentialRetry.ts(new utility)New Dependencies:
exponential-backofflibrary for retry logicExisting Dependencies:
ILCAdapter,DecoratedApp,CssTrackedApp)