wri / gfw-raster-analysis-lambda

GFW Raster Analysis in AWS Lambda
8 stars 4 forks source link

Factor entire payload size when checking if we should compress the geometry #67

Closed jterry64 closed 1 year ago

jterry64 commented 1 year ago

Pull request checklist

Please check if your PR fulfills the following requirements:

Pull request type

Please check the type of change your PR introduces:

What is the current behavior?

If the input geometry is bigger than payload limit for asynchronous lambda calls, we compress the geometry. But that doesn't check the rest of the payload, like the data environment, which may also be a few kilobytes. If the input geometry is close to, but still less than, the size limit, the rest of the payload can push it over, causing an error.

Issue Number: GTC-2116

What is the new behavior?

Check the entire payload size when checking if we should compress the geometry.

Does this introduce a breaking change?

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (fe764e4) 94.85% compared to head (6e00196) 94.85%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #67 +/- ## ======================================== Coverage 94.85% 94.85% ======================================== Files 19 19 Lines 1244 1245 +1 ======================================== + Hits 1180 1181 +1 Misses 64 64 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `94.85% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wri#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/wri/gfw-raster-analysis-lambda/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wri) | Coverage Δ | | |---|---|---| | [raster\_analysis/tiling.py](https://app.codecov.io/gh/wri/gfw-raster-analysis-lambda/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wri#diff-cmFzdGVyX2FuYWx5c2lzL3RpbGluZy5weQ==) | `99.08% <100.00%> (+<0.01%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.