Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

feat: use kubo-rpc-client #517

Merged
merged 3 commits into from
Nov 14, 2022

Conversation

SgtPooki
Copy link
Collaborator

@SgtPooki SgtPooki commented Oct 6, 2022

Tracking issue: ipfs/js-kubo-rpc-client#37
Parent issue: ipfs/js-kubo-rpc-client#6
Originating issue: ipfs/kubo#9125

This PR is intended to update examples so that users will be pointed to kubo-rpc-client instead of ipfs-http-client when using Javascript/TypeScript to talk to Kubo.

fixes ipfs/js-kubo-rpc-client#37

Things for reviewers to check:

  1. Confirm I didn't miss any areas that should be updated (old mentions that should be updated that aren't yet)
  2. Confirm the added information is accurate and desired
  3. Confirm that the language used is aligned with maintainers' intentions

@SgtPooki
Copy link
Collaborator Author

@lidel @achingbrain need workflow approvals to run here to see if there's any additional changes required to get things passing. There shouldn't be, since interop is passing, but I won't know till these run

@SgtPooki
Copy link
Collaborator Author

@hugomrdias can I get permisison to this repo so I can restart workflows in order to better troubleshoot these errors?

cc @tinytb

@hugomrdias
Copy link
Contributor

@hugomrdias can I get permisison to this repo so I can restart workflows in order to better troubleshoot these errors?

cc @tinytb

sent invite

@SgtPooki
Copy link
Collaborator Author

SgtPooki commented Oct 13, 2022

example-browser-service-worker succeeds locally

but retrying in CI doesn't seem to work.

╰─ ✔ ❯ pwd
/Users/sgtpooki/code/work/protocol.ai/ipfs-examples/js-ipfs-examples/examples/browser-service-worker

╰─ ✔ ❯ git log -1 | cat
commit 2b77d8d42d40d579832948c6d54fb4af82e69bf2
Author: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
Date:   Thu Oct 6 11:51:13 2022 -0700

    feat: use kubo-rpc-client
    
    fixes https://github.com/ipfs/js-kubo-rpc-client/issues/37
    
╰─ ✔ ❯ gh-issue-info
ProductName:    macOS
ProductVersion: 12.6
BuildVersion:   21G115
Arch: arm64
NodeJS: v16.17.1
npm: 8.15.0
yarn: 1.22.19

╰─ ✔ ❯ npm run test                              8.51   27.9G   23%   100%  ─╯

> example-browser-service-worker@1.0.0 test
> npm run build && playwright test tests


> example-browser-service-worker@1.0.0 build
> webpack --env production

assets by path *.js 1.58 MiB
  assets by chunk 1.56 MiB (id hint: vendors)
    asset 678.js 1.45 MiB [compared for emit] [minimized] [big] (id hint: vendors) 1 related asset
    asset 740.js 91.7 KiB [compared for emit] [minimized] (id hint: vendors) 1 related asset
    asset 94.js 19.5 KiB [compared for emit] [minimized] (id hint: vendors)
  asset 191.js 9.87 KiB [compared for emit] [minimized]
  asset main.js 6.48 KiB [compared for emit] [minimized] (name: main)
  asset 542.js 5.55 KiB [compared for emit] [minimized]
asset favicon.ico 33.7 KiB [compared for emit]
asset index.html 797 bytes [compared for emit]
orphan modules 2.66 MiB [orphan] 874 modules
runtime modules 9.1 KiB 27 modules
cacheable modules 4.47 MiB
  modules by path ../../node_modules/ 4.43 MiB 316 modules
  modules by path ./src/ 37.3 KiB
    ./src/main.js + 1 modules 5.23 KiB [built] [code generated]
    ./src/service.js + 1 modules 22.7 KiB [built] [code generated]
    ./src/worker.js 7.74 KiB [built] [code generated]
    ../../node_modules/css-loader/dist/cjs.js!./src/app.css 1.57 KiB [built] [code generated]
  modules by path ipfs-utils/src/files/*.js (ignored) 30 bytes
    ipfs-utils/src/files/glob-source.js (ignored) 15 bytes [built] [code generated]
    ipfs-utils/src/files/glob-source.js (ignored) 15 bytes [built] [code generated]
  + 7 modules
webpack 5.74.0 compiled successfully in 9585 ms

Running 1 test using 1 worker

  ✓  1 …browser service worker: › should properly load the content of an IPFS hash (393ms)
Starting server...
> Ready on localhost:3000!
Stopping servers...
Servers stopped

SgtPooki added a commit to SgtPooki/js-ipfs-examples that referenced this pull request Oct 13, 2022
testing to see if changes in ipfs-examples#517 break CI workflows, or if they're already broken
@SgtPooki SgtPooki mentioned this pull request Oct 13, 2022
SgtPooki added a commit that referenced this pull request Oct 14, 2022
* chore: tmp

testing to see if changes in #517 break CI workflows, or if they're already broken

* chore: attempt to fix ci runs

see https://playwright.dev/docs/cli\#install-system-dependencies

* fix: github workflow syntax

* chore: ensure concurrency on branch name

* chore: update actions

* fix: don't fail-fast for matrix failures

* chore: attempt to remove GabrielBB/xvfb-action

some steps are showing the following failure on github:
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: GabrielBB/xvfb-action

see https://github.com/SgtPooki/js-ipfs-examples/actions/runs/3245100955

* chore: remove gabriel/xvfb-action for good

* chore: add xvfb-maybe to run-in-electron

* chore: move xvfb-maybe to devDeps

* fix: don't overwrite promises that are being awaited

* chore(tmp): disable all but browser-service-worker tests

* fix(browser-service-worker): move initial page.goto inside test

* fix(browser-service-worker): increase test timeout

* fix(test-util-ipfs-example.servers): stop instead of close

* fix(test-util-ipfs-example.servers): allow server stop from tests

remove waitForSelectors and ensure service worker response is done before checking for text

debugging: query /view directly

this removes the need for playwright navigating iframes and still utilizes the serviceWorker in the test

* chore: cleanup browser-service-worker test

* Revert "chore(tmp): disable all but browser-service-worker tests"

This reverts commit 76a94cc.

* chore: remove test-pr-workflows from push target
@BigLep
Copy link

BigLep commented Oct 17, 2022

@SgtPooki : given you got CI passing, I don't think we should block here. I imagine @lidel and @achingbrain won't have bandwidth this week. Let's see if @2color or @hacdias can review. If they can't, given CI is passing and this is examples, I would suggest we move forward by merging EOD Tuesday, 2022-10-18.

@SgtPooki SgtPooki merged commit 8ff0548 into ipfs-examples:master Nov 14, 2022
@SgtPooki SgtPooki deleted the feat/add-kubo-rpc-client branch November 14, 2022 18:45
@SgtPooki
Copy link
Collaborator Author

merged due to hacdias approval

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update https://github.com/ipfs-examples/js-ipfs-examples
5 participants