fix: resolve CI test failures for Redis temp state and S3 deps#125
Open
miyannishar wants to merge 2 commits intogoogle:mainfrom
Open
fix: resolve CI test failures for Redis temp state and S3 deps#125miyannishar wants to merge 2 commits intogoogle:mainfrom
miyannishar wants to merge 2 commits intogoogle:mainfrom
Conversation
- Install s3 optional dependency in CI (--extra s3) so aioboto3 is available and S3 artifact tests run - Defensively filter temp: prefixed keys in RedisSessionService.append_event to ensure temp state is never persisted to Redis
3 tasks
Collaborator
|
error: Extra Could you also resolve this? |
The pyproject.toml only defines a 'test' extra group. S3 artifact
tests already use pytest.importorskip('aioboto3') to gracefully skip
when the dependency is not installed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two pre-existing CI test failures:
1. S3 Artifact Tests — CI workflow fix
The CI workflow was using
--extra s3but the project'spyproject.tomlonly defines atestextra group — there is nos3group. Reverted to--extra testonly. The S3 artifact tests already usepytest.importorskip("aioboto3")to gracefully skip when the dependency is not installed, which is the correct pattern for optional dependencies.2. Redis Session Test —
test_session_state_managementAssertionErrorRedisSessionService.append_event()was not explicitly filteringtemp:prefixed keys fromsession.statebefore serializing to Redis. Added defensive filtering aftersuper().append_event()to ensure temp state is never persisted.Changes
.github/workflows/unit-tests.yaml—uv sync --extra test(removed non-existent--extra s3)src/google/adk_community/sessions/redis_session_service.py— stripState.TEMP_PREFIXkeys before Redis persistence