-
Notifications
You must be signed in to change notification settings - Fork 4
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
Wip check fors3 #269
Wip check fors3 #269
Conversation
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 1.19%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Sweta Yadav seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Codecov Report
@@ Coverage Diff @@
## master #269 +/- ##
==========================================
- Coverage 96.58% 96.29% -0.30%
==========================================
Files 29 29
Lines 1787 1808 +21
==========================================
+ Hits 1726 1741 +15
- Misses 61 67 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -50,14 +50,20 @@ def __init__(self, *args, **kwargs): | |||
def _create_s3_client(self, s3_info): | |||
# type: (Dict[str, Any]) -> BaseClient | |||
"""Create the S3 client.""" | |||
return boto3.Session().client( | |||
print("checking for _create_s3_client") |
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.
remove print statements
UP_AMAZON_S3, | ||
aws_access_key_id=s3_info["awsSecretKeyId"], | ||
aws_secret_access_key=s3_info["awsSecretAccessKey"], | ||
aws_session_token=s3_info["awsSessionToken"], | ||
endpoint_url=s3_info.get("endpoint") or None, | ||
config=self._s3_config, | ||
) | ||
print(s3_instance) |
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.
remove print statements
@@ -182,13 +188,24 @@ def _state(self): | |||
part_number_marker = 0 | |||
|
|||
while "there are parts": | |||
print(">>>there are parts") | |||
print(self.s3_client) |
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.
remove print statements
info = self.s3_client.list_parts( | ||
Bucket=self.bucket, | ||
Key=self.key, | ||
UploadId=self.batch.multiPartUploadId, | ||
PartNumberMarker=part_number_marker, | ||
MaxParts=self._max_parts, | ||
) | ||
|
||
print("Parts are >>>>>>>>>>>>>>") |
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.
remove print statements
@@ -204,6 +221,8 @@ def _state(self): | |||
data_packs.append({"ETag": part["ETag"], "PartNumber": index}) | |||
uploaded_chunks.append(index) | |||
|
|||
print("uploaded_chunks ") | |||
print(uploaded_chunks) |
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.
remove print statements
with mock_s3(): | ||
print(">>>mock_s3>>>>") |
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.
remove print statement
client = boto3.client(UP_AMAZON_S3, region_name="eu-west-1") | ||
print(client) |
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.
remove print statement
CreateBucketConfiguration={"LocationConstraint": "eu-west-1"}, | ||
) | ||
except Exception as ex: | ||
print(ex) |
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.
remove print statements, if req, put proper logging
|
||
# Output the bucket names | ||
print('Existing buckets:') | ||
for bucket in response['Buckets']: |
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.
why is this loop required?
try: | ||
ChunkUploaderS3(server.uploads, batch, blob, 1024 * 1024 * 5, s3_client=s3) | ||
except Exception as ex: | ||
print("Exception in ChunkUploaderS3") |
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.
remove print statements. If req. put proper logging
No description provided.