aws-powertools / powertools-lambda-python

A developer toolkit to implement Serverless best practices and increase developer velocity.
https://docs.powertools.aws.dev/lambda/python/latest/
MIT No Attribution
2.71k stars 376 forks source link

docs(idempotency): improve navigation, wording, and new section on guarantees #4613

Open heitorlessa opened 6 days ago

heitorlessa commented 6 days ago

Issue number: #4197

Summary

This PR refreshes Idempotency docs with newer features like cards, improves wording and navigation from ServerlessDays ANZ feedback, and add a new section to call out guarantees/caveats upfront.

Changes

Please provide a summary of what's being changed

Unrelated

Tech Debt

User experience

Please share what the user experience looks like before and after this change

image image

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change? **RFC issue number**: Checklist: * [ ] Migration process documented * [ ] Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

heitorlessa commented 5 days ago

mypy is failing after correcting snippets; will look at that last as there's one major piece of doc to create yet

leandrodamascena commented 4 days ago

Hey @heitorlessa! 90% of the errors are related to the table_name variable.

Argument "table_name" to "DynamoDBPersistenceLayer" has incompatible type "str | None"; expected "str"

This is because the DynamoDBPersistenceLayer class doesnt accept None for table_name parameter and the default return for os.getenv is None when it don't find the env variable.

I think we can do this: table = os.getenv("IDEMPOTENCY_TABLE", "")

WDYT?

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.45%. Comparing base (e14e768) to head (6a0364d). Report is 679 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #4613 +/- ## =========================================== + Coverage 96.38% 96.45% +0.07% =========================================== Files 214 223 +9 Lines 10030 10728 +698 Branches 1846 1996 +150 =========================================== + Hits 9667 10348 +681 - Misses 259 268 +9 - Partials 104 112 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.