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

stop on first SDK/tool failure when running mint #178

Merged
merged 1 commit into from
Oct 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions mint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function run_test()
echo "done in $duration"
else
echo "FAILED in $duration"
tail -n 1 "$BASE_LOG_DIR/$LOG_FILE" | jq
Copy link
Contributor

@nitisht nitisht Oct 4, 2017

Choose a reason for hiding this comment

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

I understand the intention is to print the last failed log, but it gives a jq error

Running with
SERVER_ENDPOINT: 127.0.0.1:9000
ACCESS_KEY:      minio
SECRET_KEY:      ***REDACTED***
ENABLE_HTTPS:    0
SERVER_REGION:   us-east-1
MINT_DATA_DIR:   /mint/data
MINT_MODE:       core
To get intermittent logs, 'sudo docker cp 518400f10a05:/mint/log /tmp/mint-logs'
Running aws-sdk-php tests ... FAILED in 1 seconds
jq - commandline JSON processor [version 1.5-1-a5b5cbe]
Usage: jq [options] <jq filter> [file...]

	jq is a tool for processing JSON inputs, applying the
	given filter to its JSON text inputs and producing the
	filter's results as JSON on standard output.
	The simplest filter is ., which is the identity filter,
	copying jq's input to its output unmodified (except for
	formatting).
	For more advanced filters see the jq(1) manpage ("man jq")
	and/or https://stedolan.github.io/jq

	Some of the options include:
	 -c		compact instead of pretty-printed output;
	 -n		use `null` as the single input value;
	 -e		set the exit status code based on the output;
	 -s		read (slurp) all inputs into an array; apply filter to it;
	 -r		output raw strings, not JSON texts;
	 -R		read raw strings, not JSON texts;
	 -C		colorize JSON;
	 -M		monochrome (don't colorize JSON);
	 -S		sort keys of objects on output;
	 --tab	use tabs for indentation;
	 --arg a v	set variable $a to value <v>;
	 --argjson a v	set variable $a to JSON value <v>;
	 --slurpfile a f	set variable $a to an array of JSON texts read from <f>;
	See the manpage for more options.
Finished running all tests.
To get logs, run 'sudo docker cp 518400f10a05:/mint/log /tmp/mint-logs'

Note that I ran it against non existing endpoint - there is no server listenting at 127.0.0.1:9000

Copy link
Contributor

Choose a reason for hiding this comment

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

I get a different parse error:

➜  mint git:(390d2cc) ✗  docker run -it -e SERVER_ENDPOINT=192.168.1.75:9000 -e ACCESS_KEY=minio -e SECRET_KEY=minio123 -e ENABLE_HTTPS=0   play.minio.io/mint:travis-c41dba97fefb55fa41078ef7aef4025f17be466a
Running with
SERVER_ENDPOINT: 192.168.1.75:9000
ACCESS_KEY:      minio
SECRET_KEY:      ***REDACTED***
ENABLE_HTTPS:    0
SERVER_REGION:   us-east-1
MINT_DATA_DIR:   /mint/data
MINT_MODE:       core
To get intermittent logs, 'sudo docker cp 77576abf8501:/mint/log /tmp/mint-logs'
Running aws-sdk-php tests ... done in 19 minutes and 1 seconds
Running aws-sdk-ruby tests ... done in 1 minutes and 10 seconds
Running awscli tests ... FAILED in 6 minutes and 32 seconds
parse error: Invalid numeric literal at line 1, column 245
Finished running all tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably because of #167

Copy link
Member Author

Choose a reason for hiding this comment

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

Both are not related to this PR i.e. aws-sdk-php and others have a bug not giving or giving invalid JSON

Copy link
Member Author

Choose a reason for hiding this comment

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

Note that I ran it against non existing endpoint - there is no server listenting at 127.0.0.1:9000

Have you seen what log in log.json?

Copy link
Contributor

Choose a reason for hiding this comment

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

Have you seen what log in log.json?

Good point, checking

Copy link
Contributor

Choose a reason for hiding this comment

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

it is empty, aws-sdk-php needs to log, so the above comment is not applicable here.

Copy link
Contributor

Choose a reason for hiding this comment

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

last entry in my log is below. it seems to be due to #167

{"name": "awscli", "duration": 123295, "function": "aws --endpoint-url http://192.168.1.75:9000 s3 cp /mint/data/datafile-65-MB s3://awscli-mint-test-bucket-31835/datafile-65-MB\n", "status": "PASS"}

fi

return $rv
Expand Down Expand Up @@ -104,11 +105,15 @@ function main()
if [ "${#RUN_LIST[@]}" -ne 0 ]; then
for sdk in "${RUN_LIST[@]}"; do
sdk_dir="$TESTS_DIR"/$sdk
run_test "$sdk_dir"
if ! run_test "$sdk_dir"; then
break
fi
done
else
for sdk_dir in "$TESTS_DIR"/*; do
run_test "$sdk_dir"
if ! run_test "$sdk_dir"; then
break
fi
done
fi

Expand Down