Skip to content

fix dynamodb router rule removal#10172

Merged
thrau merged 1 commit intomasterfrom
fix-dynamobd-router
Feb 5, 2024
Merged

fix dynamodb router rule removal#10172
thrau merged 1 commit intomasterfrom
fix-dynamobd-router

Conversation

@thrau
Copy link
Member

@thrau thrau commented Feb 4, 2024

Motivation

shutdown hook of dynamodb was using an old API to remove rules from the router, leading to exceptions:

Traceback (most recent call last):
  File "/opt/code/localstack/localstack/utils/functions.py", line 41, in call_safe
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/code/localstack/localstack/services/dynamodb/provider.py", line 481, in on_before_stop
    ROUTER.remove_rule(rule)
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'Router' object has no attribute 'remove_rule'

Changes

  • dynamodb routes are now removed using ROUTER.remove

@coveralls
Copy link

Coverage Status

coverage: 83.837% (+0.001%) from 83.836%
when pulling e970fd9 on fix-dynamobd-router
into f3811b7 on master.

@thrau thrau added the semver: patch Non-breaking changes which can be included in patch releases label Feb 4, 2024
@thrau thrau merged commit 220fd27 into master Feb 5, 2024
@thrau thrau deleted the fix-dynamobd-router branch February 5, 2024 10:10
@thrau
Copy link
Member Author

thrau commented Feb 5, 2024

thanks @viren-nadkarni ! totally missed your PR

maxhoheiser pushed a commit that referenced this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants