skip dnp if its dependencies fail#2278
Merged
pablomendezroyo merged 15 commits intodevelopfrom Oct 14, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements error handling to skip DApp packages when their dependencies fail to be fetched, rather than failing the entire operation. It adds a safety check to ensure at least one package was successfully aggregated.
- Wraps dependency fetching in try-catch to gracefully skip packages with failed dependencies
- Adds validation to throw an error if no packages were successfully aggregated
- Updates error handling comments to reflect the new behavior
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/installer/src/dappGet/aggregate/index.ts | Adds validation to ensure at least one package was successfully aggregated |
| packages/installer/src/dappGet/aggregate/aggregateDependencies.ts | Implements try-catch error handling to skip packages when dependency fetching fails |
packages/installer/src/dappGet/aggregate/aggregateDependencies.ts
Outdated
Show resolved
Hide resolved
packages/installer/src/dappGet/aggregate/aggregateDependencies.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
packages/installer/src/dappGet/aggregate/aggregateDependencies.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pablomendezroyo
approved these changes
Oct 14, 2025
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.
This PR makes
aggregateDependencies()method handle fails, timeouts, etc while fetching IPFS content of dependencies so the error doesnt bubble up to dappGet.This lets the user install a package when at least 1 version of all its dependencies (and sub-dependencies) are available and satisfy the version range, even if some other valid versions are not available through IPFS.
cleanupDnpsfunction that iteratively removes DNPs with no available versions and versions with missing dependencies, ensuring the dependency graph is stable and only contains fully resolvable packages. This function is called after the aggregation process completes.aggregateDependenciesto remove versions that fail to fetch dependencies or have sub-dependencies that cannot be resolved, with detailed debug logging for troubleshooting.aggregateDependencies.test.tsto cover scenarios including: fully resolvable trees, direct and deep unresolvable dependencies, circular dependencies, and DNPs with both valid and invalid versions.