Skip to content

fix: use UUIDs and cleanup in beacon styles example to avoid stale item collisions#2125

Merged
texastony merged 3 commits intomainfrom
flacky-examples
Mar 13, 2026
Merged

fix: use UUIDs and cleanup in beacon styles example to avoid stale item collisions#2125
texastony merged 3 commits intomainfrom
flacky-examples

Conversation

@texastony
Copy link
Copy Markdown
Contributor

Problem

The beacon styles searchable encryption example uses hardcoded work_id values ("1" and "2"), causing scan assertions to fail when stale items from previous runs (encrypted with different branch keys) exist in the shared DDB table.

Fix

  • Generate unique UUID work_id values per run
  • Add temporary work_id IN (:wid1, :wid2) filter to all scans (TODO: remove after table cleanup)
  • Delete items in finally/cleanup block after assertions
  • Dynamic compound beacon value using UUID instead of hardcoded "I-1.T-small"

Changes

  • DynamoDbEncryption/runtimes/rust/examples/searchableencryption/beacon_styles_searchable_encryption.rs
  • Examples/runtimes/java/.../BeaconStylesSearchableEncryptionExample.java

Testing

  • Rust examples: all 17 passed locally
  • Java: CI will validate (SNAPSHOT jars required)

…em collisions

- Generate unique work_id UUIDs per run instead of hardcoded "1" and "2"
- Add temporary work_id IN filter to scans (to be removed after table cleanup)
- Delete items in finally/cleanup block after assertions
- Dynamic compound beacon value using UUID instead of hardcoded "I-1.T-small"
- Applied to both Rust and Java examples
@texastony texastony requested a review from a team as a code owner March 11, 2026 22:21
Copy link
Copy Markdown
Member

@rishav-karanjit rishav-karanjit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@texastony texastony merged commit 773c1ff into main Mar 13, 2026
109 of 121 checks passed
@texastony texastony deleted the flacky-examples branch March 13, 2026 15:36
rishav-karanjit added a commit that referenced this pull request Apr 29, 2026
## [4.0.0](v3.9.0-java...v4.0.0-java) (2026-04-29)

### ⚠ BREAKING CHANGES

* **java:** add DDBEC with SDK v2 and remove DDBEC with SDK V1 (#2048)
  * The AWS Database Encryption SDK for DynamoDB will NOT support AWS SDK for Java 1.x in the embedded 2.x version (which was known as DynamoDB Encryption Client(DDBEC)). The embedded DDBEC will now use AWS SDK for Java 2.x. These changes are limited to embedded DDBEC and rest of DB-ESDK has no code changes.
  * If consumer of DB-ESDK is using APIs from namespace `com.amazonaws.services.dynamodbv2` through DB-ESDK then they have to migrate to use corresponding API from namespace `com.amazonaws.services.dynamodbv2.datamodeling.sdkv2`. If consumer of DB-ESDK are NOT using namespace `com.amazonaws.services.dynamodbv2` through DB-ESDK then there will not be any breaking change when moving to next major version.

### Features -- Java

* **java:** add DDBEC with SDK v2 and remove DDBEC with SDK V1 ([#2048](#2048)) ([035dbe3](035dbe3))

### Fixes -- All Languages

* use UUIDs and cleanup in beacon styles example to avoid stale item collisions ([#2125](#2125)) ([773c1ff](773c1ff))

### Fixes -- Java

* **java:** drop hkdf offset method ([#2011](#2011)) ([b8f29f9](b8f29f9))

### Maintenance -- All Languages

* **dafny:** bump MPL and update mutable map ([#1974](#1974)) ([e9ea870](e9ea870))
* **dafny:** bump smithy dafny  ([#1971](#1971)) ([85309a0](85309a0))

### Maintenance -- Java

* **java:** Allow local testing ([#1947](#1947)) ([bf5a106](bf5a106))
* **java:** Attempt to reduce flaky CI ([#2220](#2220)) ([987aec6](987aec6))
* **java:** attempt to reduce flaky CI failures ([#2203](#2203)) ([b4d88f1](b4d88f1))
* **java:** bring back test against released MPL version ([#2226](#2226)) ([a340b34](a340b34))
* **java:** fix GetEncryptedDataKeyDescription java Example  ([#1973](#1973)) ([ba8fcb7](ba8fcb7))
* **java:** retry failed workflow ([#2229](#2229)) ([2668d68](2668d68))
* **java:** shut down local DDB in test ([#2176](#2176)) ([fa1e151](fa1e151))
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