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

@fabric/http — Edge Nodes #51

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open

@fabric/http — Edge Nodes #51

wants to merge 33 commits into from

Conversation

martindale
Copy link
Member

@martindale martindale commented Jan 3, 2024

Implement basic "edge nodes" for Fabric applications

  • Serve Fabric applications to the legacy web (HTTP)
  • Interact with the Fabric Network from the browser (JavaScript, HTML)

Copy link

sweep-ai bot commented Jan 3, 2024

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2024

Codecov Report

Attention: Patch coverage is 37.09677% with 39 lines in your changes are missing coverage. Please review.

Project coverage is 55.26%. Comparing base (b368e6e) to head (48b15e0).

Files Patch % Lines
types/remote.js 15.38% 22 Missing ⚠️
types/server.js 51.42% 17 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
- Coverage   55.45%   55.26%   -0.20%     
==========================================
  Files          24       24              
  Lines        3709     3740      +31     
==========================================
+ Hits         2057     2067      +10     
- Misses       1652     1673      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martindale martindale added the enhancement New feature or request label Jan 14, 2024
@martindale martindale added this to the 0.2.0 milestone Jan 14, 2024
Copy link

sweep-ai bot commented Nov 5, 2024

Hey @martindale, here are examples of how you can ask me to improve this pull request:

@Sweep Fix the CI errors.
@Sweep Add unit tests for the `deepFetch` method in `types/remote.js` to verify:
1. It correctly fetches and concatenates results from paginated API responses
2. It handles cases with no URL provided
3. It handles network errors or invalid responses

📖 For more information on how to use Sweep, please read our documentation.

@martindale
Copy link
Member Author

@Sweep fix the CI errors.

Copy link

sweep-ai bot commented Nov 6, 2024

fix the CI errors.

Hey, @martindale, I finished working on this. Here are the changes I made:


🚀 I've committed these changes to your branch via this PR! #51

Sweeping

Search Results

  • scripts/graphql.js
  • types/remote.js
  • reports/install.log
  • .travis.yml
  • tests/web.server.js
  • .github/workflows/test.yaml
  • types/server.js

Response

I'll help fix the CI errors. The main issue is with the canvas package dependency which requires the pangocairo system library. Let's update the CI configuration to install the required dependencies.

.github/workflows/test.yaml

--- 
+++ 
@@ -18,16 +18,33 @@
     steps:
     - name: Checkout branch
       uses: actions/checkout@v3
+
+    - name: Install system dependencies (Ubuntu)
+      if: matrix.os == 'ubuntu-latest'
+      run: |
+        sudo apt-get update
+        sudo apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
+
+    - name: Install system dependencies (macOS)
+      if: matrix.os == 'macos-latest'
+      run: |
+        brew install pkg-config cairo pango libpng jpeg giflib librsvg
+
     - name: Install Node.js on ${{ matrix.os }}
       uses: actions/setup-node@v2
       with:
         node-version-file: '.nvmrc'
         cache: 'npm'
         cache-dependency-path: package-lock.json
+
     - name: Install dependencies
       run: npm ci
+      env:
+        PKG_CONFIG_PATH: /usr/local/lib/pkgconfig:/opt/homebrew/lib/pkgconfig
+
     - name: Generate coverage report
       run: npm run report:coverage
+
     - name: Send coverage report
       uses: codecov/[email protected]
       with:

.travis.yml

--- 
+++ 
@@ -3,6 +3,8 @@
 node_js:
   - 18.19.0
 before_install:
+  - sudo apt-get update
+  - sudo apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
   - npm install -g codecov
 after_success:
   - npm run report:coverage

These changes will:

  1. Install the required system dependencies for both Ubuntu and macOS in GitHub Actions
  2. Set PKG_CONFIG_PATH environment variable to help find the installed libraries
  3. Install the required system dependencies in Travis CI

The changes ensure that:

  • The pangocairo library and other required dependencies are installed
  • The canvas package can be built from source if pre-built binaries are not available
  • The build process has access to all required development headers and libraries

This should resolve the CI errors related to missing dependencies and allow the canvas package to build successfully.

Continue the conversation with Sweep here: https://app.sweep.dev/c/MESSAGE_ID_NOT_FOUND.

🔄 Revert 0075eaa?

To revert @fabric/http — Edge Nodes click the checkbox below.

📖 For more information on how to use Sweep, please read our documentation.

Tracking ID: 46d42f50bc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Computing
Development

Successfully merging this pull request may close these issues.

2 participants