S3: improve typing, removing int dict keys, clean up backwards getattr#13687
Conversation
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 1h 38m 41s ⏱️ Results for commit e3b6696. ♻️ This comment has been updated with latest results. |
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 1h 14m 13s ⏱️ - 44m 34s Results for commit e3b6696. ± Comparison against base commit 706ea55. This pull request removes 3138 tests.♻️ This comment has been updated with latest results. |
aidehn
left a comment
There was a problem hiding this comment.
LGTM! Just some questions around default values but nothing blocking - also it's a shame that Avro doesn't support int-based keys so we need to convert between a string and int for the parts 😭
Out of curiosity, how does it behave if something does have int-based keys? Does it silently fail or does it raise an error? If it's the prior it would be good to have some sort of mention of this somewhere or have some sort of safe-guarding around this to prevent this from happening as I can imagine it will cause some very confusing bugs (but I imagine this has already been considered / in the works!)
bentsku
left a comment
There was a problem hiding this comment.
Out of curiosity, how does it behave if something does have int-based keys? Does it silently fail or does it raise an error? If it's the prior it would be good to have some sort of mention of this somewhere or have some sort of safe-guarding around this to prevent this from happening as I can imagine it will cause some very confusing bugs (but I imagine this has already been considered / in the works!)
Yes, there will be a CI step happening early to warn you that this would be an incompatible type 👍
Motivation
This PR implements type hints for the S3 store and attributes that are stored in it.
One issue that needed to be addressed is that Avro does not support int-based dict keys, so multiparts have been reworked.
I've also took the opportunity to remove all the hacks around backward compatibility via
getattr.Changes
VersionedKeyStoreandKeyStorePartsgetattrTests
Related