-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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(daemon) ipfs daemon --initialized
#355
Conversation
af3be64
to
68613ee
Compare
👍 ❤️ |
is this PR accidentally mixed with your other logging PR? |
@whyrusleeping Good observation. No, it's not an accident. Out of productivity concerns, both for me and the reviewers involved, I'm experimenting with a more fluid approach to PRs. I intend to include minor, general improvements--so long as they don't significantly harm readability or detract from the focus of the change set. Pulling out weeds as I go along, you know? |
|
||
EXPOSE 4001 | ||
|
||
ENTRYPOINT ["ipfs"] | ||
ENTRYPOINT ["ipfs2"] |
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.
let's make a note of changing this back to cmd/ipfs
and add it to the milestone once this PR is done.
This commit updates go-datastore in order to access new LevelDb Close() method License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
allow framework to add level to log so level can be applied when using text formatter License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
@jbenet @whyrusleeping @mappum If we permit initialization in `ipfs daemon`, then we must ensure that the node instantiated in `ipfs init` (to create the welcome file) shuts down and releases resources. Kept running into "resource temporarily unavailable". Discovered that it was our cousins Jeff and Sanjay over at LevelDB Ave. go-datastore doesn't expose Close() so I extended the TsDs interface and submitted a patch. License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com> Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
initCmd: cmdDetails{doesNotUseConfigAsInput: true, cannotRunOnDaemon: true, doesNotUseRepo: true}, | ||
|
||
// daemonCmd allows user to initialize the config. Thus, it may be called | ||
// without using the config as input |
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.
+1 for listing here the reasoning behind each option. it's important to track that somewhere. we got sloppy in the rush
@maybebtc cool PR! Some comments above. Here's a checklist to make sure to address:
|
reverting to |
@maybebtc i can get behind using our own |
I'd prefer to stick to generic names for the generic, generally-applicable packages. Keeps us honest as we try to break apart these generic libraries and make them available for use outside of the project. With that in mind, I'm open to any name we choose. |
68613ee
to
7dd3813
Compare
ping @jbenet |
@maybebtc check it out: 6b2adf8! |
@maybebtc LGTM too. sec, i'm figuring out the error |
Interesting, the test really broke. |
Well, fun:
|
@jbenet License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com> # TYPES # feat # fix # docs # style (formatting, missing semi colons, etc; no code change): # refactor # test (adding missing tests, refactoring tests; no production code change) # chore (updating grunt tasks etc; no production code change) Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com> # TYPES # feat # fix # docs # style (formatting, missing semi colons, etc; no code change): # refactor # test (adding missing tests, refactoring tests; no production code change) # chore (updating grunt tasks etc; no production code change) Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com> # TYPES # feat # fix # docs # style (formatting, missing semi colons, etc; no code change): # refactor # test (adding missing tests, refactoring tests; no production code change) # chore (updating grunt tasks etc; no production code change) Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
will support daemon initialization License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com> # TYPES # feat # fix # docs # style (formatting, missing semi colons, etc; no code change): # refactor # test (adding missing tests, refactoring tests; no production code change) # chore (updating grunt tasks etc; no production code change) Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
@jbenet @whyrusleeping @mappum very helpful for tracking down errors. the stack traces are only shown when debug mode is visible. They function best when caught at the source. I propose we use this errors package as a drop-in replacement for fmt.Errorf and errors.New in all of our code, and use errors.Wrap for external errors as they emerge from others' libraries. License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com> Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
@jbenet now, ipfs can be built and executed in one step: ``` docker run jbenet/go-ipfs daemon --initialized ``` License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
@jbenet License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
@jbenet License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
@jbenet License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
@jbenet yeah, these are just sane defaults License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
this is silly but whatever License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
looking forward to fixing these again License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Warning: during normal execution node teardown must be the last thing that happens because command requests return io.Readers, which may still be constructing or processing their output. The node (and its subservices) is needed for this. good night and good luck.
1db6e5d
to
eba0599
Compare
feat(daemon) `ipfs daemon --initialized`
With this PR, users can fetch and run ipfs in one command.
Magic.
nb: needs ipfs/go-datastore#9