-
Notifications
You must be signed in to change notification settings - Fork 50
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
Update awscli tests to log error messages #153
Conversation
62a91bd
to
d76df31
Compare
run/core/awscli/test.sh
Outdated
if [ "$HASH_1_MB" == "$hash2" ]; then | ||
function="delete_bucket" | ||
out=$(delete_bucket "$bucket_name") | ||
rv=$? | ||
# remove download file | ||
rm -rf /tmp/datafile-1-MB |
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.
Just rm -f
is better -r
is recursive and we can avoid recursive if not needed..
run/core/awscli/test.sh
Outdated
else | ||
rv=1 | ||
out="Downloaded file verfication failed" |
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.
Verification failed for downloaded object
run/core/awscli/test.sh
Outdated
@@ -354,6 +366,7 @@ function test_copy_object() { | |||
rv=$? | |||
else | |||
rv=1 | |||
out="Copied file verfication failed" |
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.
Verification failed for copied object
run/core/awscli/test.sh
Outdated
@@ -158,6 +161,7 @@ function test_create_object() { | |||
rm -rf /tmp/datafile-1-MB | |||
else | |||
rv=1 | |||
out="Created object hash verification failed" |
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.
Checksum verification failed for uploaded object
run/core/awscli/test.sh
Outdated
@@ -158,6 +161,7 @@ function test_create_object() { | |||
rm -rf /tmp/datafile-1-MB |
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.
s/test_create_object/test_upload_object/
faeff5b
to
9e4454a
Compare
updated @harshavardhana |
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.
- Can we remove the /tmp/multipart file once it is used?
- The buckets are not deleted after a failure in the code, since there is no exception, we should try to clean it up.
- Also, the error field should be used for stack trace alone, so, do you think we should change the error field here to message
- If AWS returns an error output, they need to be converted to a single line?
Here is an example
{"name": "awscli", "duration": "623", "function": "aws --endpoint-url http://127.0.0.1:9000 s3 sync s3://awscli-mint-test-bucket-6887/\n", "status": "FAIL", "error": "usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
aws: error: the following arguments are required: paths"}
- Should we log the entire awscli command here in the case of function ? Will it be useful to search if the function contains actual endpoint information, bucket names etc? Or can we simplify the function value to just what we are trying to do here, that way it is consistent between endpoint A and endpoint B.
9e4454a
to
c017767
Compare
Done
Added bucket removal logic to error logging cases.
Removed few of the cases. But in cases where
done
I understand this will be taken care based on the discussion we had during today's call. |
@balamurugana found one more issue with this log. The duration is a number and it should not have double quotes around the log. |
c017767
to
25b6735
Compare
Fixed |
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.
Modifying the function name and adding args in the log will be taken up in a different PR. Otherwise LGTM.
Fixes #150