-
Notifications
You must be signed in to change notification settings - Fork 10
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
Bug: Error when IPFS-desktop is running bind: address already in use
#25
Comments
The culprit here is https://github.com/ipfs-shipyard/pinning-service-compliance/blob/addMoreChecks-update-1/src/utils/getInlineCid.ts#L8-L20 @lidel if this error throws, can I use the running ipfs daemon? How would I do that? |
@SgtPooki hm.. rule of thumb would be to avoid reusing an already running daemon , if possible (compliance tests should spawn a clean, dedicated, ephemeral instance that we fully control, so we don't inject garbage into user's node repo) iiuc src/utils/getInlineCid.ts#L8-L20 does not require any state persistence, so try running it via
|
If all you're doing is creating an inline CID from a piece of data, why not just use the identity hash from the |
My understanding is that we still need daemon, as we want to add tests which require real bitswap and DHT announcement. As for inline CID creation, agree, left comment in #28 (review) |
This is fixed in the latest PR, thanks though! |
I will handle the online CID using multiformats as suggested, that will speed things up a bit |
We don't have any other checks implemented that use daemon yet, so the ephemeral &test daemon should be a non-blocker as soon as I improve the inline CID implementation. |
* fix: Use existing client if one is running fixes #25 * chore: update contributors * chore: release version v0.0.3 * fix: Use a clean controlled ipfsd-ctl daemon * fix: Create inline CID with multiformats Do not use a daemon for creating an inline CID Using the following snippet, ```typescript (async () => { try { const inlineCid = await getInlineCid() console.log(inlineCid) } catch (err) { console.error(err) } })().catch((err) => { console.error(err) }) ``` we see that multiformats is easily 9x faster: ```bash > hyperfine 'ts-node src/utils/getInlineCid-daemon.ts' 'ts- node src/utils/getInlineCid-multiformats.ts' Benchmark 1: ts-node src/utils/getInlineCid-daemon.ts Time (mean ± σ): 3.056 s ± 0.187 s [User: 1.154 s, System: 0.260 s] Range (min … max): 2.922 s … 3.405 s 10 runs Benchmark 2: src/utils/getInlineCid-multiformats.ts Time (mean ± σ): 314.9 ms ± 2.8 ms [User: 319.3 ms, System: 41.3 ms] Range (min … max): 310.9 ms … 320.3 ms 10 runs Summary 'src/utils/getInlineCid-multiformats.ts' ran 9.71 ± 0.60 times faster than 'ts-node src/utils/getInlineCid-daemon.ts' ``` * fix: correct getInlineCID error output * chore: tsconfig correctio ns
## 1.0.0 (2022-06-14) ### Features * add npm bin to devcontainer PATH ([365c142](365c142)) * auto-update github actions with dependabot ([#43](#43)) ([87f7926](87f7926)) * compliance check infrastructure ([7aa5663](7aa5663)) * Export esm module ([#41](#41)) ([acaeac6](acaeac6)) * implement all compliance checks ([#17](#17)) ([1223831](1223831)), closes [#5](#5) [#4](#4) [#6](#6) [#7](#7) [#8](#8) [#28](#28) [#25](#25) * lplaceholder checks run via listr ([bbb1f81](bbb1f81)) * Publish static reports via github pages ([#68](#68)) ([5a6a7f5](5a6a7f5)), closes [#78](#78) [#76](#76) [#77](#77) [#77](#77) ### Bug Fixes * CI release succeeds ([#90](#90)) ([810d4a2](810d4a2)) * Compliance check sum is consistent for all services ([#54](#54)) ([ace2b57](ace2b57)), closes [#55](#55) * devcontainer sees pinning-service-client ([c7a6dbb](c7a6dbb)) ### Trivial Changes * **deps-dev:** bump @types/node from 17.0.25 to 17.0.34 ([#49](#49)) ([a2a5d13](a2a5d13)) * **deps-dev:** bump @types/node from 17.0.35 to 17.0.41 ([#79](#79)) ([db8a6f7](db8a6f7)) * **deps-dev:** bump aegir from 37.0.15 to 37.2.0 ([#86](#86)) ([df4035f](df4035f)) * **deps-dev:** bump ipfs-core-types from 0.10.3 to 0.11.0 ([#64](#64)) ([e623ad3](e623ad3)) * **deps-dev:** bump ts-node from 10.7.0 to 10.8.1 ([#75](#75)) ([ff48f3b](ff48f3b)) * **deps:** bump actions/checkout from 2 to 3 ([#46](#46)) ([8fbbcd8](8fbbcd8)) * **deps:** bump actions/setup-node from 2 to 3 ([#48](#48)) ([ee57c59](ee57c59)) * **deps:** bump github/codeql-action from 1 to 2 ([#47](#47)) ([1dd488d](1dd488d)) * **deps:** bump go-ipfs from 0.12.2 to 0.13.0 ([#80](#80)) ([baaaa8c](baaaa8c)) * **deps:** bump ipfsd-ctl from 10.0.6 to 11.0.1 ([#58](#58)) ([45771db](45771db)) * **deps:** bump lewagon/wait-on-check-action from 0.2 to 1.1.1 ([#44](#44)) ([9c8f5c0](9c8f5c0)) * **deps:** bump node-fetch from 3.2.4 to 3.2.6 ([#81](#81)) ([5bcb760](5bcb760)) * **deps:** bump pascalgn/automerge-action from 0.13.1 to 0.15.3 ([#45](#45)) ([65c19dc](65c19dc)) * getting started instructions ([b7ff148](b7ff148)) * ignore .envrc ([54e5aae](54e5aae)) * static report landing page provides context ([#87](#87)) ([12fc841](12fc841)) * use gitignore.io ([e81ebd9](e81ebd9))
🎉 This issue has been resolved in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The text was updated successfully, but these errors were encountered: