-
Notifications
You must be signed in to change notification settings - Fork 4
Microns 1366 -Search for #12
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
Conversation
… shape the black tile when the actual tile data is corrupt.
… search Cloudwatch Logs for errors. Added the symbolic link to allow the lambda function to be imported into test scripts. Lambda is a reserved word so can't directly import that name.
Heres the original PR. I am working on a Test for the ingest_lambda but thought it would be helpful to get this out first and give you time to review. |
@@ -29,6 +29,8 @@ | |||
|
|||
from botocore.exceptions import ClientError | |||
|
|||
print("$$$ IN TILE UPLOAD LAMBDA $$$") |
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.
This is really unrelated but I found it helpful to be able to search multilambda logs for specific types of lambas. that is what this is giving us.
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.
Looks good
else: | ||
try: | ||
tile_img = np.asarray(Image.open(image_bytes), dtype=dtype) | ||
except TypeError as te: |
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.
Don’t really need to except as te since you’re not using te?
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.
Looks good.
I tried the test it looks like there is a lot of things that need to be Mocked for this to work. I added another ticket to pull ingest_lambda.py out of multilambda, refactor so it isn't one large single function and then create unit test on the parts. |
When corrupt tile images or zero length tile images are uploaded with the ingest client, it crashed the ingest_lambda.
Solution: Catch errors and use a ndarray of zeros. However we also need to shape the ndarray based off of the x and y tile dimensions.
Ingest lambda does not current have this information. It needs to be added to the s3 tile metadata.
This set of changes