-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
KMS #12530: Error handling for invalid blob issue #12809
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: when I re-run the tests against AWS, I find that a You can see more details about our parity testing approach here: https://github.com/localstack/localstack/tree/master/docs/testing/parity-testing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I executed the tests against AWS that generated the new block ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @simonrw I am not seeing
could you please suggest anything wrong with these steps test against AWS? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you look at the How to write parity tests section of our docs, you should find the instructions on how to run the tests against AWS. Specifically:
You have run the tests with your AWS credentials, however you are not configuring the LocalStack test suite to target AWS.
I can't really explain what is going on here unfortunately. You are clearly
but when I re-run the test with the same configuration, I find the diff --git i/tests/aws/services/kms/test_kms.snapshot.json w/tests/aws/services/kms/test_kms.snapshot.json
index e97a3097e6d7..33e987b371d7 100644
--- i/tests/aws/services/kms/test_kms.snapshot.json
+++ w/tests/aws/services/kms/test_kms.snapshot.json
@@ -1565,7 +1565,7 @@
}
},
"tests/aws/services/kms/test_kms.py::TestKMS::test_encrypt_decrypt_encryption_context": {
- "recorded-date": "27-06-2025, 08:31:49",
+ "recorded-date": "04-07-2025, 10:40:02",
"recorded-content": {
"encrypt_response": {
"CiphertextBlob": "ciphertext-blob",
@@ -1579,6 +1579,7 @@
"decrypt_response_with_encryption_context": {
"EncryptionAlgorithm": "SYMMETRIC_DEFAULT",
"KeyId": "<key-id:1>",
+ "KeyMaterialId": "4ba2a196f27b13af15cce4730e67b632eff7b53b68f987b7331d209fddc0b103",
"Plaintext": "plaintext",
"ResponseMetadata": {
"HTTPHeaders": {},
If you are executing the test against AWS and capturing snapshots, then it captures all This is a challenge we face regularly, you see the last time this snapshot was executed was 2023! We regularly find the AWS responses have changed since the last time the snapshot was captured. When I re-run the entire kms test suite against AWS I see
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, they were scheduled for deletion right after test was finished.
Understood. Thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested two other setups as well to repro it. It seems some issue in my Localstack set up probably.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @simonrw It seems that earlier I added the fix and test the changes on Localstack version 4.3 where the issue was raised by user. However, probably I didn't test it again on I have tested again on master and able to see |
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.
question: do you think it's worth logging an error message on line 1047 where we catch and silence any exceptions?
Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, agree. I should have done it. We should log the error before line 1047 to avoid hiding potential bugs caused by catching all exceptions without logging.
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.
Do you think this change should be part of this PR or a separate one?
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.
I have made this change in this PR only.