Skip to content
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

Add auto expiry for DynamoDB backend #5805

Merged
merged 13 commits into from Nov 25, 2019
Merged

Commits on Oct 30, 2019

  1. Add auto expiry for DynamoDB backend

    This adds auto-expire support for the DynamoDB backend, via the DynamoDB
    Time to Live feature.
    Sven Ulland committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    c703215 View commit details
    Browse the repository at this point in the history
  2. Require boto3>=1.9.178 for DynamoDB TTL support

    boto3 version 1.9.178 requires botocore>=1.12.178.
    
    botocore version 1.12.178 introduces support for the DynamoDB
    UpdateTimeToLive call.
    
    The UpdateTimeToLive call is used by the DynamoDB backend to enable TTL
    support on a newly created table.
    Sven Ulland committed Oct 30, 2019
    Configuration menu
    Copy the full SHA
    ddf1f7c View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2019

  1. Separate TTL handling from table creation

    Handle TTL enabling/disabling separately from the table get-or-create
    function.
    
    Improve handling of cases where the TTL is already set to the desired
    state.
    
    DynamoDB only allows a single TTL update action within a fairly long
    time window, so some problematic cases (changing the TTL attribute,
    enabling/disabling TTL when it was recently modified) will raise
    exceptions that have to be dealt with.
    Sven Ulland committed Nov 1, 2019
    Configuration menu
    Copy the full SHA
    5a61b13 View commit details
    Browse the repository at this point in the history
  2. Handle older boto3 versions

    If the boto3 TTL methods are not found, log an informative error. If the
    user wants to enable TTL, raise an exception; if TTL should be disabled,
    simply return.
    Sven Ulland committed Nov 1, 2019
    Configuration menu
    Copy the full SHA
    31c1bfd View commit details
    Browse the repository at this point in the history
  3. Improve logging

    - Handle exceptions by logging the error and re-raising
    
    - Log (level debug) when the desired TTL state is already in place
    Sven Ulland committed Nov 1, 2019
    Configuration menu
    Copy the full SHA
    b5bf089 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2019

  1. Add and use _has_ttl() convenience method

    Additional changes:
    
    - Handle exceptions when calling boto3's describe_time_to_live()
    
    - Fix test cases for missing TTL methods
    Sven Ulland committed Nov 4, 2019
    Configuration menu
    Copy the full SHA
    455d55b View commit details
    Browse the repository at this point in the history
  2. Update ttl_seconds documentation

    Sven Ulland committed Nov 4, 2019
    Configuration menu
    Copy the full SHA
    9d041e9 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2019

  1. Log invalid TTL; catch and raise ValueError

    Sven Ulland committed Nov 11, 2019
    Configuration menu
    Copy the full SHA
    224aefd View commit details
    Browse the repository at this point in the history
  2. Separate method _get_table_ttl_description

    Sven Ulland committed Nov 11, 2019
    Configuration menu
    Copy the full SHA
    832bc5b View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2019

  1. Separate ttl method validation function

    Sven Ulland committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    b499e5a View commit details
    Browse the repository at this point in the history
  2. Clarify tri-state TTL value

    Sven Ulland committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    e3dcfa2 View commit details
    Browse the repository at this point in the history
  3. Improve test coverage

    Sven Ulland committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    a46ed1a View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2019

  1. Fix minor typo in comment

    Sven Ulland committed Nov 25, 2019
    Configuration menu
    Copy the full SHA
    b0c56a8 View commit details
    Browse the repository at this point in the history