Skip to content

Conversation

wangsha
Copy link
Contributor

@wangsha wangsha commented Mar 13, 2025

This pull request includes several updates to the .github/workflows/tests.yaml file, enhancements to the MongoDbCache and DynamoDbCache classes, and improvements to test cases. The most important changes include updating action versions and job steps in the GitHub workflows, adding an index for the expiration field in MongoDbCache, modifying the _utcnow method, and updating test configurations.

GitHub Workflows:

  • Updated branch and path patterns to use double quotes instead of single quotes in .github/workflows/tests.yaml.
  • Upgraded action versions and modified job steps to use new actions for setting up Memcached and Redis in .github/workflows/tests.yaml.

Cache Enhancements:

  • Added an auto expire index for the expiration field in MongoDbCache to improve performance in src/cachelib/mongodb.py.
  • Modified the _utcnow method to use datetime.UTC if available in src/cachelib/dynamodb.py and src/cachelib/mongodb.py. [1] [2]

Test Improvements:

  • Removed the redis_server and memcached_server fixtures and updated test cases to use default ports and setups in tests/conftest.py, tests/test_interface_uniformity.py, tests/test_memcached_cache.py, and tests/test_redis_cache.py. [1] [2] [3] [4] [5] [6]
  • Added a test for auto-expiration of cache entries in tests/test_mongodb_cache.py.

Version Updates:

  • Updated the version to 0.13.1 in CHANGES.rst and src/cachelib/__init__.py. [1] [2]
  • Upgraded uwsgi from 2.0.24 to 2.0.28 in requirements/tests.txt.
  • Added Python 3.12 to the tox environments in tox.ini.

Checklist:

  • Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
  • Add or update relevant docs, in the docs folder and in code.
  • Add an entry in CHANGES.rst summarizing the change and linking to the issue.
  • Add .. versionchanged:: entries in any relevant code docs.
  • Run pre-commit hooks and fix any issues.
  • Run pytest and tox, no tests failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant