Skip to content

Fix/ipfs stability#484

Merged
rmlearney-digicatapult merged 10 commits intomainfrom
fix/ipfs-stability
Feb 27, 2026
Merged

Fix/ipfs stability#484
rmlearney-digicatapult merged 10 commits intomainfrom
fix/ipfs-stability

Conversation

@rmlearney-digicatapult
Copy link
Copy Markdown
Contributor

@rmlearney-digicatapult rmlearney-digicatapult commented Feb 20, 2026

Pull Request

Checklist

  • Have you read Digital Catapult's Code of Conduct?
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

PR Type

Please delete options that are irrelevant.

  • Bug Fix

Linked tickets

High level description

Improve IPFS peering at startup

Detailed description

  • Remove IPFS Cluster from testnet
  • Deterministic full-mesh peering at startup: node publishes PeerID, configures Peering.Peers from peer metadata
  • Improve cloudagent IPFS client behaviour by adding explicit timeouts for cat/add requests

Describe alternatives you've considered

Operational impact

Additional context

Biggest changes are to the IPFS unit test suite to match the format of the other cloudagent unit tests. All tests still present, now extended for new timeout logic.

Copilot AI review requested due to automatic review settings February 20, 2026 21:37
@rmlearney-digicatapult rmlearney-digicatapult requested a review from a team as a code owner February 20, 2026 21:37
@rmlearney-digicatapult rmlearney-digicatapult added the v:patch Change requires a semver patch version change label Feb 20, 2026
Copy link
Copy Markdown

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 improves IPFS network stability by removing the IPFS Cluster dependency and implementing deterministic peer discovery with explicit timeouts for IPFS operations.

Changes:

  • Added 15-second timeout handling to IPFS client methods (getFile and uploadFile) using AbortController
  • Replaced IPFS Cluster with deterministic full-mesh static peering via shared peer metadata volume
  • Updated IPFS startup script to configure DHT routing, static peering, and wait for all nodes before starting
  • Removed all IPFS Cluster containers and volumes from docker-compose-testnet.yml
  • Modified IPFS health checks to verify daemon readiness and peer connectivity

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 10 comments.

File Description
src/ipfs/index.ts Added AbortController-based timeout handling (15s) for getFile and uploadFile operations with improved error messages
docker/ipfs/ipfs-startup.sh Implemented deterministic peer discovery using shared volume for peer IDs, configured full-mesh static peering, and enabled accelerated DHT
docker/ipfs/Dockerfile Created /ipfs-peerdata directory with proper permissions for peer metadata sharing
docker-compose-testnet.yml Removed IPFS Cluster containers (cluster0, cluster1, cluster2), added ipfs-peerdata volume, updated health checks, and added IPFS_NODE_NAME environment variables

Comment thread src/ipfs/index.ts Outdated
Comment thread docker/ipfs/ipfs-startup.sh Outdated
Comment thread docker-compose-testnet.yml Outdated
Comment thread src/ipfs/index.ts Outdated
Comment thread src/ipfs/index.ts
Comment thread docker/ipfs/ipfs-startup.sh Outdated
Comment thread docker/ipfs/ipfs-startup.sh Outdated
Comment thread docker/ipfs/ipfs-startup.sh Outdated
Comment thread docker-compose-testnet.yml Outdated
Comment thread src/ipfs/index.ts Outdated
Copy link
Copy Markdown

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 5 out of 6 changed files in this pull request and generated 6 comments.

Comment thread docker-compose-testnet.yml Outdated
Comment thread docker-compose-testnet.yml Outdated
Comment thread src/ipfs/index.ts Outdated
Comment thread src/ipfs/index.ts Outdated
Comment thread src/ipfs/index.ts Outdated
Comment thread docker/ipfs/ipfs-startup.sh Outdated
Copy link
Copy Markdown

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 11 out of 12 changed files in this pull request and generated 6 comments.

Comment thread docker-compose-testnet.yml Outdated
Comment thread src/ipfs/index.ts Outdated
Comment thread src/ipfs/index.ts Outdated
Comment thread src/ipfs/index.ts Outdated
Comment thread docker/ipfs/ipfs-startup.sh
Comment thread docker/ipfs/ipfs-startup.sh
@rmlearney-digicatapult rmlearney-digicatapult marked this pull request as ready for review February 23, 2026 11:23
@rmlearney-digicatapult rmlearney-digicatapult merged commit 8dea357 into main Feb 27, 2026
15 checks passed
@rmlearney-digicatapult rmlearney-digicatapult deleted the fix/ipfs-stability branch February 27, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v:patch Change requires a semver patch version change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants