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

add quieter option to name publish #5494

Merged
merged 1 commit into from
Sep 24, 2018
Merged

add quieter option to name publish #5494

merged 1 commit into from
Sep 24, 2018

Conversation

rob-deutsch
Copy link
Contributor

@rob-deutsch rob-deutsch commented Sep 20, 2018

Note: I would thoroughly appreciate if someone could do a real live test on their machine. My IPFS node is a tad broken at the moment.

Motivation: This post on reddit.

Details:

Added a quieter/Q option to 'name publish' that, consistent with 'add', only outputs the value that was published.

@rob-deutsch
Copy link
Contributor Author

Sorry, I'm at a loss, could anyone provide any pointers about what might be wrong here?

The Travis CI logs show at the end:

+ git clone https://github.com/ncopa/su-exec.git
Cloning into 'su-exec'...
fatal: unable to access 'https://github.com/ncopa/su-exec.git/': Could not resolve host: github.com

�[1m�[31mnot ok 5 - docker image build output looks good�(B�[m
#	
#	  SUCCESS_LINE=$(egrep "^Successfully built" actual) &&
#	  IMAGE_ID=$(expr "$SUCCESS_LINE" : "^Successfully built \(.*\)") ||
#	  test_fsh cat actual
#	

�[36mexpecting success: 
  DOC_ID=$(docker_run "$IMAGE_ID")
�(B�[m
docker: invalid reference format.
See 'docker run --help'.
�[1m�[31mnot ok 6 - docker image runs�(B�[m
#	
#	  DOC_ID=$(docker_run "$IMAGE_ID")
#	

�[36mexpecting success: 
  docker_exec "$DOC_ID" "wget --retry-connrefused --waitretry=1 --timeout=30 -t 30 \
    -q -O - http://localhost:8080/version >/dev/null"
�(B�[m
json: cannot unmarshal array into Go value of type types.ContainerJSON
�[1m�[31mnot ok 7 - docker image gateway is up�(B�[m
#	
#	  docker_exec "$DOC_ID" "wget --retry-connrefused --waitretry=1 --timeout=30 -t 30 \
#	    -q -O - http://localhost:8080/version >/dev/null"
#	

�[36mexpecting success: 
  docker_exec "$DOC_ID" "wget --retry-connrefused --waitretry=1 --timeout=30 -t 30 \
    -q -O - http://localhost:5001/api/v0/version >/dev/null"
�(B�[m
json: cannot unmarshal array into Go value of type types.ContainerJSON
�[1m�[31mnot ok 8 - docker image API is up�(B�[m
#	
#	  docker_exec "$DOC_ID" "wget --retry-connrefused --waitretry=1 --timeout=30 -t 30 \
#	    -q -O - http://localhost:5001/api/v0/version >/dev/null"
#	

�[34mskipping test: 
  expected="Hello Worlds" &&
  HASH=$(docker_exec "$DOC_ID" "echo $(cat expected) | ipfs add | cut -d�(B�[m
�[34mok 9 # skip 
  expected="Hello Worlds" &&
  HASH=$(docker_exec "$DOC_ID" "echo $(cat expected) | ipfs add | cut -d (missing )�(B�[m

�[36mexpecting success: docker exec -i "" wget --retry-connrefused --waitretry=1 --timeout=30 -t 30     -q -O - http://localhost:8080/version | grep Commit | cut -d" " -f2 >actual ;   test -s actual ;   docker exec -i "" ipfs version --enc json     | sed 's/^.*"Commit":"\([^"]*\)".*$/\1/g' >expected ;   test -s expected ;   test_cmp expected actual�(B�[m
json: cannot unmarshal array into Go value of type types.ContainerJSON
json: cannot unmarshal array into Go value of type types.ContainerJSON
ok 10 - version CurrentCommit is set�(B�[m

�[36mexpecting success: 
  docker_stop "$DOC_ID"
�(B�[m
Error response from daemon: page not found
�[1m�[31mnot ok 11 - stop docker container�(B�[m
#	
#	  docker_stop "$DOC_ID"
#	

�[1m�[31m# failed 5 among 11 test(s)�(B�[m
�[36m1..11�(B�[m
make: *** [test/sharness/t0300-docker-image.sh] Error 1

travis_time:end:1b899bfe:start=1537511138775371943,finish=1537511934944795000,duration=796169423057
�[0K
�[31;1mThe command "make $TEST_SUITE" exited with 2.�[0m

Done. Your build exited with 1.

@magik6k
Copy link
Member

magik6k commented Sep 21, 2018

Looking few lines above:

Step 11/22 : RUN set -x   && cd /tmp   && git clone https://github.com/ncopa/su-exec.git   && cd su-exec   && git checkout -q $SUEXEC_VERSION   && make   && cd /tmp   && wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini   && chmod +x tini   && mv su-exec/su-exec tini /sbin/ # Install them
 ---> [Warning] IPv4 forwarding is disabled. Networking will not work.
 ---> Running in 98a2bd5e8123
+ cd /tmp
+ git clone https://github.com/ncopa/su-exec.git
Cloning into 'su-exec'...
fatal: unable to access 'https://github.com/ncopa/su-exec.git/': Could not resolve host: github.com

Possibly a random travis glitch, re-triggered

@magik6k
Copy link
Member

magik6k commented Sep 21, 2018

Yup. https://www.traviscistatus.com/:

Investigating - We are receiving reports of builds with sudo: required experiencing slowness while executing commands accessing the network e.g. docker pull. We are currently looking into it and we'll keep you updated. Thank you for your patience!
Sep 20, 15:15 UTC

Copy link
Member

@magik6k magik6k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, a sharness test would be nice though (probably in t100-name.sh)

Added a quieter/Q option to 'name publish' that, consistent with 'add', only outputs the value that was published.

License: MIT
Signed-off-by: Rob Deutsch <rdeutschob@gmail.com>
@rob-deutsch
Copy link
Contributor Author

Thanks for that!

Tests added, and the code was amended to fix an issue that the test identified!

@Stebalien Stebalien merged commit ac53d3a into ipfs:master Sep 24, 2018
@rob-deutsch rob-deutsch deleted the feat/publishquieter branch September 24, 2018 10:24
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.

3 participants