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

Isolate redis-entraid dependency for tests #3521

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akx
Copy link
Contributor

@akx akx commented Feb 21, 2025

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

This PR follows up on #3502 (comment).

It:

  • moves the duplicated redis-entraid specific testing code to a separate module
  • defers the imports for redis-entraid (so tests can be run even without redis-entraid installed; given redis-entraid is currently unlicensed, having it as a required dependency is problematic)
  • fixes the CI to uninstall the PyPI redis-py version that installing redis-entraid installs, and instead installs the working copy version as editable (so e.g. metadata.version() returns the correct version).

@akx
Copy link
Contributor Author

akx commented Feb 21, 2025

The "CI / Redis 7.4.2; Python 3.8; RESP Parser:plain; EL:uvloop (pull_request)" failure seems to be a flake (where a wait takes 0.202 seconds instead of 0.2).

The failures in "Validate building and installing the package" (which shouldn't be running tests in the first place if you ask me, since there are tests for everything already) seem related to search and ACL, which this clearly doesn't touch.

FAILED tests/test_asyncio/test_commands.py::TestRedisCommands::test_acl_modules_cat_with_category[single] - redis.exceptions.ResponseError: Unknown category 'search'
FAILED tests/test_asyncio/test_commands.py::TestRedisCommands::test_acl_modules_cat_with_category[pool] - redis.exceptions.ResponseError: Unknown category 'search'
FAILED tests/test_asyncio/test_commands.py::TestRedisCommands::test_acl_modules_commands[single] - redis.exceptions.ResponseError: unknown command 'FT.CREATE', with args beginning with: 'idx' 'SCHEMA' 'txt' 'TEXT' 'WEIGHT' '1.0'
FAILED tests/test_asyncio/test_commands.py::TestRedisCommands::test_acl_modules_commands[pool] - redis.exceptions.ResponseError: unknown command 'FT.CREATE', with args beginning with: 'idx' 'SCHEMA' 'txt' 'TEXT' 'WEIGHT' '1.0'
FAILED tests/test_asyncio/test_commands.py::TestRedisCommands::test_acl_modules_category_commands[single] - redis.exceptions.ResponseError: Error in ACL SETUSER modifier '+@search': Unknown command or category name in ACL
FAILED tests/test_asyncio/test_commands.py::TestRedisCommands::test_acl_modules_category_commands[pool] - redis.exceptions.ResponseError: Error in ACL SETUSER modifier '+@search': Unknown command or category name in ACL
FAILED tests/test_asyncio/test_commands.py::TestRedisCommands::test_config_get_for_modules[single] - AssertionError: assert 'search-timeout' in {}
FAILED tests/test_asyncio/test_commands.py::TestRedisCommands::test_config_get_for_modules[pool] - AssertionError: assert 'search-timeout' in {}
FAILED tests/test_asyncio/test_commands.py::TestRedisCommands::test_config_set_for_search_module[single] - KeyError: 'search-default-dialect'
FAILED tests/test_asyncio/test_commands.py::TestRedisCommands::test_config_set_for_search_module[pool] - KeyError: 'search-default-dialect'

@petyaslavova
Copy link
Collaborator

Hi @akx thank you for your contribution! We’ll review your change soon.

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

Successfully merging this pull request may close these issues.

2 participants