-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat: better stream handling #140
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
730c5b9
feat: better stream handling
dignifiedquire e66a6e5
fix: make ci happy
dignifiedquire 8d43043
fix: call `close` only once on process kill
haadcode 7b09529
feat: replace subcommandante with execa
dignifiedquire f6fadfb
docs(api): add first pass
dignifiedquire 53667fe
test: port subcomandante tests for our new exec
dignifiedquire 59fdf47
fix: replace execa with subcomandante
dignifiedquire 6b651fb
test: skip sighup test on ci
dignifiedquire 1d30243
chore(deps): update ipfs-api
dignifiedquire 7d104e1
fix: properly cleanup when stopping
dignifiedquire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ sudo: false | |
language: node_js | ||
node_js: | ||
- 4 | ||
- 5 | ||
- 6 | ||
- stable | ||
|
||
# Make sure we have new NPM. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,11 @@ | |
"name": "ipfsd-ctl", | ||
"version": "0.17.0", | ||
"description": "simple controls for an ipfs node", | ||
"main": "lib/index.js", | ||
"jsxnext:main": "src/index.js", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"lint": "aegir-lint", | ||
"coverage": "aegir-coverage", | ||
"test": "aegir-test --env node", | ||
"build": "aegir-build --env node", | ||
"release": "aegir-release --env node", | ||
"release-minor": "aegir-release --type minor --env node", | ||
"release-major": "aegir-release --type major --env node", | ||
|
@@ -45,19 +43,22 @@ | |
], | ||
"license": "MIT", | ||
"dependencies": { | ||
"async": "^2.1.4", | ||
"bl": "^1.1.2", | ||
"go-ipfs-dep": "0.4.4", | ||
"ipfs-api": "^12.0.3", | ||
"multiaddr": "^2.1.0", | ||
"once": "^1.4.0", | ||
"pump": "^1.0.2", | ||
"rimraf": "^2.5.4", | ||
"run-series": "^1.1.4", | ||
"shutdown": "^0.2.4", | ||
"subcomandante": "^1.0.5" | ||
}, | ||
"devDependencies": { | ||
"aegir": "^9.2.1", | ||
"aegir": "^9.3.0", | ||
"chai": "^3.5.0", | ||
"mkdirp": "^0.5.1", | ||
"multihashes": "^0.3.1", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is multihashes needed somewhere else? I don't see it being used in the tests. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"pre-commit": "^1.2.1" | ||
}, | ||
"repository": { | ||
|
@@ -72,4 +73,4 @@ | |
"example": "examples", | ||
"test": "test" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jbenet invested a lot of time making sure we had a thing that would not leave zombie IPFS processes in user machines. It was what blocked #89 all this time.
Until we have comprehensive tests to make sure that you can spawn a bunch of daemons and make sure they don't become zombies, we can't move to execa. Historically, a way to test this was with
station
If I understand correctly, migrating to
execa
is not a requirement for any particular feature.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for the tests: #95
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how the burden of proof lies on the one changing it, as I haven't seen any proof subcomandante being as good as you say it is. There are tests for the cleanup behavior inside execa, which I wrote when implementing. I also did manual tests with execa inside reusing the testsuite from subcomandante so those cases all work.
So far all I heard was 'there were extensive tests' but I haven't seen or read what those actually were, so please tell which scenarios you are concerned about and I can add tests for them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diasdavid I've ported the test suite from node-subcomandante, to run against the new
src/exec.js
to add a baseline of coverage to this module.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soo even though those tests pass fine, it seems thing are wonky right now. I have 5 ipfs instances running after a single
npm test
run :(I will revert the switch to execa tomorrow.