Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c53d504
feat(idempotency): add option to expire inprogress invocations
rubenfonseca Jul 25, 2022
90d21fb
chore(idempotency): make existing tests pass with expire_in_progress
rubenfonseca Jul 26, 2022
9676e13
chore(idempotency): add tests for expires_in_progress
rubenfonseca Jul 26, 2022
550e466
chore(docs): added docs about `expires_in_progress`
rubenfonseca Jul 26, 2022
bf18cc2
chore(idempotency): refactored expire in-progress logic
rubenfonseca Jul 27, 2022
c88482e
chore(idempotency): add tests
rubenfonseca Jul 27, 2022
f47ab1f
chore(idempotency): remove unused fixtures in tests
rubenfonseca Jul 27, 2022
a4f8ce7
chore(idempotency): make mypy happy
rubenfonseca Jul 27, 2022
975933d
chores(documentation): update sample code for `expires_in_progress`
rubenfonseca Jul 27, 2022
cd90fc1
chore(documentation): replace idempotency diagrams with mermaid.js
rubenfonseca Jul 27, 2022
631370d
chore(idempotency): remove param `expires_in_progress`
rubenfonseca Jul 27, 2022
61f94b3
chore(idempotency): remove more of the old code
rubenfonseca Jul 27, 2022
fa80aed
chore(docs): remove bad comment
rubenfonseca Jul 27, 2022
c706b0c
feat(idempotench): add mechanism to register lambda context
rubenfonseca Jul 27, 2022
1a72214
fix(idempotency): typo
rubenfonseca Jul 27, 2022
0ce0bb2
fix(idempotency): capture the lambda context automatically
rubenfonseca Jul 28, 2022
a2b6a34
chore(idempotency): addressed review comments
rubenfonseca Jul 29, 2022
228a76d
docs(idempotency): include register_lambda_context in doc snippets
heitorlessa Jul 29, 2022
3cb7411
chore(idempotency): added tests for handle_for_status
rubenfonseca Jul 29, 2022
5c09a5a
chore(docs): add documentation to method
rubenfonseca Jul 29, 2022
2e1afd3
chore(idempotency): address comments
rubenfonseca Jul 29, 2022
0e9dfd4
chore(idempotency): simplified strings
rubenfonseca Jul 29, 2022
81ed53d
chore(documentation): addressed comments
rubenfonseca Jul 29, 2022
66b62a6
chore(idempotency): no need to update expire on update
rubenfonseca Jul 29, 2022
84ced8e
docs(idempotency): reorder wording, banners to emphasize the need, an…
heitorlessa Jul 29, 2022
1ee5c25
Merge remote-tracking branch 'rubenfonseca/feat/expire-inprogress' in…
heitorlessa Jul 29, 2022
84280af
docs(idempotency): shorten wording to fit new mermaid SVG
heitorlessa Jul 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(idempotency): remove unused fixtures in tests
  • Loading branch information
rubenfonseca committed Jul 27, 2022
commit f47ab1f23ca43164c1e3122d9ca14b51e80f407d
27 changes: 4 additions & 23 deletions tests/functional/idempotency/test_idempotency.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,6 @@ def test_idempotent_lambda_first_execution(
expected_params_update_item,
expected_params_put_item,
lambda_response,
serialized_lambda_response,
deserialized_lambda_response,
hashed_idempotency_key,
lambda_context,
):
"""
Expand Down Expand Up @@ -384,11 +381,9 @@ def test_idempotent_lambda_expired(
idempotency_config: IdempotencyConfig,
persistence_store: DynamoDBPersistenceLayer,
lambda_apigw_event,
timestamp_expired,
lambda_response,
expected_params_update_item,
expected_params_put_item,
hashed_idempotency_key,
lambda_context,
):
"""
Expand Down Expand Up @@ -428,8 +423,6 @@ def test_idempotent_lambda_exception(
idempotency_config: IdempotencyConfig,
persistence_store: DynamoDBPersistenceLayer,
lambda_apigw_event,
timestamp_future,
lambda_response,
hashed_idempotency_key,
expected_params_put_item,
lambda_context,
Expand Down Expand Up @@ -594,9 +587,6 @@ def test_idempotent_persistence_exception_deleting(
idempotency_config: IdempotencyConfig,
persistence_store: DynamoDBPersistenceLayer,
lambda_apigw_event,
timestamp_future,
lambda_response,
hashed_idempotency_key,
expected_params_put_item,
lambda_context,
):
Expand Down Expand Up @@ -638,9 +628,6 @@ def test_idempotent_persistence_exception_updating(
idempotency_config: IdempotencyConfig,
persistence_store: DynamoDBPersistenceLayer,
lambda_apigw_event,
timestamp_future,
lambda_response,
hashed_idempotency_key,
expected_params_put_item,
lambda_context,
):
Expand Down Expand Up @@ -682,10 +669,6 @@ def test_idempotent_persistence_exception_getting(
idempotency_config: IdempotencyConfig,
persistence_store: DynamoDBPersistenceLayer,
lambda_apigw_event,
timestamp_future,
lambda_response,
hashed_idempotency_key,
expected_params_put_item,
lambda_context,
):
"""
Expand Down Expand Up @@ -727,8 +710,6 @@ def test_idempotent_lambda_first_execution_with_validation(
expected_params_update_item_with_validation,
expected_params_put_item_with_validation,
lambda_response,
hashed_idempotency_key,
hashed_validation_key,
lambda_context,
):
"""
Expand Down Expand Up @@ -1107,7 +1088,7 @@ def test_is_missing_idempotency_key():
indirect=True,
)
def test_default_no_raise_on_missing_idempotency_key(
idempotency_config: IdempotencyConfig, persistence_store: DynamoDBPersistenceLayer, lambda_context
idempotency_config: IdempotencyConfig, persistence_store: DynamoDBPersistenceLayer
):
# GIVEN a persistence_store with use_local_cache = False and event_key_jmespath = "body"
function_name = "foo"
Expand All @@ -1132,7 +1113,7 @@ def test_default_no_raise_on_missing_idempotency_key(
indirect=True,
)
def test_raise_on_no_idempotency_key(
idempotency_config: IdempotencyConfig, persistence_store: DynamoDBPersistenceLayer, lambda_context
idempotency_config: IdempotencyConfig, persistence_store: DynamoDBPersistenceLayer
):
# GIVEN a persistence_store with raise_on_no_idempotency_key and no idempotency key in the request
persistence_store.configure(idempotency_config)
Expand Down Expand Up @@ -1165,7 +1146,7 @@ def test_raise_on_no_idempotency_key(
indirect=True,
)
def test_jmespath_with_powertools_json(
idempotency_config: IdempotencyConfig, persistence_store: DynamoDBPersistenceLayer, lambda_context
idempotency_config: IdempotencyConfig, persistence_store: DynamoDBPersistenceLayer
):
# GIVEN an event_key_jmespath with powertools_json custom function
persistence_store.configure(idempotency_config, "handler")
Expand All @@ -1186,7 +1167,7 @@ def test_jmespath_with_powertools_json(

@pytest.mark.parametrize("config_with_jmespath_options", ["powertools_json(data).payload"], indirect=True)
def test_custom_jmespath_function_overrides_builtin_functions(
config_with_jmespath_options: IdempotencyConfig, persistence_store: DynamoDBPersistenceLayer, lambda_context
config_with_jmespath_options: IdempotencyConfig, persistence_store: DynamoDBPersistenceLayer
):
# GIVEN a persistence store with a custom jmespath_options
# AND use a builtin powertools custom function
Expand Down