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

improve documentation and fix dht put bug #6750

Merged
merged 3 commits into from Nov 19, 2019
Merged

improve documentation and fix dht put bug #6750

merged 3 commits into from Nov 19, 2019

Conversation

Stebalien
Copy link
Member

  1. Document validators.
  2. Pass DHT values as files as:
  3. CLI arguments can't have nulls.
  4. STDIN arguments can't have newlines.
  5. IPNS records can have both

fixes #5112
fixes #6749

Stdin can't have newlines, command-line arguments can't include null characters,
DHT values can include both.

This is a breaking change but this API has never worked anyways.

fixes #5112
@Stebalien Stebalien added need_tests help wanted Seeking public contribution on this issue labels Nov 5, 2019
@Stebalien Stebalien removed need_tests help wanted Seeking public contribution on this issue labels Nov 15, 2019
@Stebalien
Copy link
Member Author

@alanshaw any objections to replacing ipfs dht put KEY STRING_VALUE with ipfs dht put KEY FILE? It allows us to actually put values with newlines and nulls.

@Stebalien Stebalien removed the request for review from hsanjuan November 15, 2019 17:17
@alanshaw
Copy link
Member

Not at all, that would be better.

@Stebalien Stebalien merged commit b8ec598 into master Nov 19, 2019
@Stebalien Stebalien deleted the fix/6749 branch November 19, 2019 15:14
@pontiyaraja
Copy link

@Stebalien This changes is not yet tested by Circle CI, Please take a look at the build

https://circleci.com/gh/ipfs/go-ipfs/22265?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

Here is the test cases :

#!/bin/bash -eo pipefail go test -v ./... === RUN TestPublishDetailsWithKey --- SKIP: TestPublishDetailsWithKey (0.00s) ipns_test.go:13: === RUN TestPublishDetailsWithoutKey --- SKIP: TestPublishDetailsWithoutKey (0.00s) ipns_test.go:27: === RUN TestLogger --- PASS: TestLogger (0.31s) === RUN TestRequestBuilder --- PASS: TestRequestBuilder (0.00s) === RUN TestAdd --- PASS: TestAdd (0.06s) === RUN TestRedirect --- PASS: TestRedirect (0.00s) === RUN TestAddWithCat --- PASS: TestAddWithCat (0.02s) === RUN TestAddOnlyHash --- PASS: TestAddOnlyHash (1.23s) === RUN TestAddNoPin --- PASS: TestAddNoPin (0.02s) === RUN TestAddNoPinDeprecated --- PASS: TestAddNoPinDeprecated (0.03s) === RUN TestAddDir --- PASS: TestAddDir (0.00s) === RUN TestLocalShell --- PASS: TestLocalShell (0.00s) === RUN TestCat --- PASS: TestCat (0.00s) === RUN TestList --- PASS: TestList (0.00s) === RUN TestFileList --- PASS: TestFileList (0.00s) === RUN TestPins --- PASS: TestPins (0.07s) === RUN TestPatch_rmLink --- PASS: TestPatch_rmLink (0.03s) === RUN TestPatchLink --- PASS: TestPatchLink (141.01s) === RUN TestResolvePath --- PASS: TestResolvePath (0.00s) === RUN TestPubSub --- PASS: TestPubSub (0.02s) shell_test.go:282: subscribing... shell_test.go:286: sub: done shell_test.go:290: publishing... shell_test.go:292: pub: done shell_test.go:294: next()... shell_test.go:296: next: done. === RUN TestObjectStat --- PASS: TestObjectStat (0.00s) === RUN TestDagPut --- PASS: TestDagPut (0.05s) === RUN TestDagPutWithOpts --- PASS: TestDagPutWithOpts (0.04s) === RUN TestStatsBW --- PASS: TestStatsBW (0.00s) === RUN TestSwarmPeers --- PASS: TestSwarmPeers (0.00s) === RUN TestRefs --- PASS: TestRefs (0.00s) PASS ok github.com/ipfs/go-ipfs-api 142.905s ? github.com/ipfs/go-ipfs-api/options [no test files] ? github.com/ipfs/go-ipfs-api/tests [no test files]

@Stebalien
Copy link
Member Author

This change is tested via the sharness test suite (test/sharness/t0170-dht.sh, "put round trips").

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

Successfully merging this pull request may close these issues.

Ipfs dht put is not working dht put doesn't interact well with binary data
3 participants