-
Notifications
You must be signed in to change notification settings - Fork 6
Add AWS S3 Store #231
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
Open
strawgate
wants to merge
29
commits into
main
Choose a base branch
from
claude/issue-161-20251029-0140
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add AWS S3 Store #231
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
da86ea2
Add AWS S3 support for py-key-value
github-actions[bot] 1b1c3d7
fix: exclude S3 from sync library and improve test configuration
github-actions[bot] a8a093f
fix: address CodeRabbit review feedback for S3 store
github-actions[bot] 401d947
fix: handle S3 key length limits by hashing long collection/key names
github-actions[bot] 82d3f6a
refactor: update S3Store to use new serialization adapter pattern
github-actions[bot] d9c1d7b
feat: add length_is_bytes parameter to sanitize_string and hash_exces…
github-actions[bot] 731afa1
fix: address review feedback for S3 store
github-actions[bot] d528933
fix: address CodeRabbit review feedback for S3 store
github-actions[bot] e0f4529
simplify setup/teardown in s3
strawgate 065b551
refactor: align S3 store with sanitization strategy pattern
github-actions[bot] 06228f0
Merge branch 'main' into claude/issue-161-20251029-0140
strawgate dbab902
Longer wait for s3 spinup
strawgate e5125c2
Small test changes
strawgate f8b3a70
Merge branch 'main' into claude/issue-161-20251029-0140
strawgate 2626137
Merge branch 'main' into claude/issue-161-20251029-0140
strawgate 89ccb19
fix: resolve CodeRabbit feedback and failing tests
github-actions[bot] 4a231c5
Merge branch 'main' into claude/issue-161-20251029-0140
strawgate 462188c
Merge main into claude/issue-161-20251029-0140
github-actions[bot] 8618596
Update lockfile and generate sync code for filetree store
github-actions[bot] f2721ae
Exclude FileTreeStore from sync code generation
github-actions[bot] f32a8ce
Apply suggestion from @coderabbitai[bot]
strawgate b230647
Fix Elasticsearch index already exists exception check
github-actions[bot] 5df62e3
Extend Elasticsearch cluster health check timeout from 10s to 15s
github-actions[bot] ab6c55d
Merge main into claude/issue-161-20251029-0140
github-actions[bot] f14500a
Remove excessive code comments from S3 store
github-actions[bot] 2b7dfe5
Revert Elasticsearch changes and fix S3 store client lifecycle manage…
github-actions[bot] 5245ebe
Fix S3 and DynamoDB client lifecycle management
github-actions[bot] 87366fb
Merge branch 'main' into claude/issue-161-20251029-0140
strawgate 5624488
Merge branch 'main' into claude/issue-161-20251029-0140
strawgate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
13 changes: 13 additions & 0 deletions
13
key-value/key-value-aio/src/key_value/aio/stores/s3/__init__.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| """AWS S3-based key-value store.""" | ||
|
|
||
| from key_value.aio.stores.s3.store import ( | ||
| S3CollectionSanitizationStrategy, | ||
| S3KeySanitizationStrategy, | ||
| S3Store, | ||
| ) | ||
|
|
||
| __all__ = [ | ||
| "S3CollectionSanitizationStrategy", | ||
| "S3KeySanitizationStrategy", | ||
| "S3Store", | ||
| ] |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Potential double-exit of the raw client.
Both
__aexit__and_closecontain identical cleanup logic that exits_raw_client. IfBaseContextManagerStore.__aexit__calls_close()(which is a common pattern), the raw client would be exited twice:super().__aexit__()calls_close()(line 133)Calling
__aexit__twice on an aioboto3 client could cause errors or undefined behavior.Verify whether
BaseContextManagerStore.__aexit__calls_close:If the verification confirms that
_closeis called from the parent's__aexit__, apply this fix to move cleanup logic to only_close:async def __aexit__( self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None ) -> None: await super().__aexit__(exc_type, exc_value, traceback) - if self._owns_client and self._raw_client: - await self._raw_client.__aexit__(exc_type, exc_value, traceback)Also applies to: 263-264
🏁 Script executed:
Length of output: 0
Length of output: 226
🏁 Script executed:
Length of output: 3980
🏁 Script executed:
Length of output: 8306
Length of output: 484
🏁 Script executed:
Length of output: 681
Potential double-exit of the raw client is confirmed.
The raw client's
__aexit__is called twice:super().__aexit__()calls_close()(line 133 → base.py:437 → line 264)Remove the duplicate cleanup from
__aexit__and keep it only in_close:async def __aexit__( self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None ) -> None: await super().__aexit__(exc_type, exc_value, traceback) - if self._owns_client and self._raw_client: - await self._raw_client.__aexit__(exc_type, exc_value, traceback)Also applies to S3 store (key-value/key-value-aio/src/key_value/aio/stores/s3/store.py:444-447).
📝 Committable suggestion
🤖 Prompt for AI Agents