Skip to content

skip dnp if its dependencies fail#2278

Merged
pablomendezroyo merged 15 commits intodevelopfrom
marc/skipdappget
Oct 14, 2025
Merged

skip dnp if its dependencies fail#2278
pablomendezroyo merged 15 commits intodevelopfrom
marc/skipdappget

Conversation

@Marketen
Copy link
Copy Markdown
Contributor

@Marketen Marketen commented Sep 30, 2025

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.


  • Added a new cleanupDnps function 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.
  • Enhanced error handling in aggregateDependencies to remove versions that fail to fetch dependencies or have sub-dependencies that cannot be resolved, with detailed debug logging for troubleshooting.

  • Expanded unit tests in aggregateDependencies.test.ts to cover scenarios including: fully resolvable trees, direct and deep unresolvable dependencies, circular dependencies, and DNPs with both valid and invalid versions.

@Marketen Marketen requested a review from a team as a code owner September 30, 2025 09:03
@Marketen Marketen requested a review from Copilot September 30, 2025 09:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@github-actions github-actions bot temporarily deployed to commit September 30, 2025 09:04 Inactive
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 30, 2025

@github-actions github-actions bot temporarily deployed to commit October 1, 2025 07:44 Inactive
@github-actions github-actions bot temporarily deployed to commit October 1, 2025 13:30 Inactive
@Marketen Marketen requested a review from Copilot October 1, 2025 13:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

@github-actions github-actions bot temporarily deployed to commit October 1, 2025 13:41 Inactive
Marketen and others added 2 commits October 1, 2025 15:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to commit October 1, 2025 13:44 Inactive
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to commit October 1, 2025 13:45 Inactive
@github-actions github-actions bot temporarily deployed to commit October 1, 2025 13:46 Inactive
@github-actions github-actions bot temporarily deployed to commit October 1, 2025 13:54 Inactive
@github-actions github-actions bot temporarily deployed to commit October 1, 2025 14:00 Inactive
@Marketen Marketen requested a review from Copilot October 1, 2025 14:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Marketen and others added 2 commits October 1, 2025 16:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot temporarily deployed to commit October 1, 2025 14:31 Inactive
@github-actions github-actions bot temporarily deployed to commit October 1, 2025 14:43 Inactive
@github-actions github-actions bot temporarily deployed to commit October 3, 2025 14:03 Inactive
@github-actions github-actions bot temporarily deployed to commit October 8, 2025 09:05 Inactive
@github-actions github-actions bot temporarily deployed to commit October 14, 2025 07:34 Inactive
@pablomendezroyo pablomendezroyo merged commit 75e7cdf into develop Oct 14, 2025
9 checks passed
@pablomendezroyo pablomendezroyo deleted the marc/skipdappget branch October 14, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants