Storage - STG104 Container Change Feed#49307
Open
gunjansingh-msft wants to merge 3 commits into
Open
Conversation
added 2 commits
June 3, 2026 01:42
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support in azure-storage-blob-changefeed for newer change feed schema variants (V6–V8), including container change feed-related event types and new optional event data fields, and strengthens deserialization testing using representative payloads.
Changes:
- Added schema V6/V7/V8 JSON payloads and a new deserialization-focused test suite covering the new optional fields.
- Extended changefeed models/deserialization to surface
createTime,lastAccessTime, andrestoredContainerVersion. - Introduced/expanded enums for additional event types and operation names to cover newer schema behaviors.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/storage/azure-storage-blob-changefeed/src/test/resources/EventSchemaV6.json | Adds a schema V6 sample payload used by deserialization tests. |
| sdk/storage/azure-storage-blob-changefeed/src/test/resources/EventSchemaV7.json | Adds a schema V7 sample payload (includes lastAccessTime). |
| sdk/storage/azure-storage-blob-changefeed/src/test/resources/EventSchemaV8.json | Adds a schema V8 sample payload (includes restoredContainerVersion). |
| sdk/storage/azure-storage-blob-changefeed/src/test/java/com/azure/storage/blob/changefeed/MockedChangefeedResources.java | Updates mocked event data construction to include newly added optional fields. |
| sdk/storage/azure-storage-blob-changefeed/src/test/java/com/azure/storage/blob/changefeed/implementation/models/BlobChangefeedEventDeserializationTests.java | New unit tests validating enum parsing and optional field deserialization across schema versions. |
| sdk/storage/azure-storage-blob-changefeed/src/test/java/com/azure/storage/blob/changefeed/ChunkTests.java | Updates mocked Avro record creation to include new optional keys (null values) for compatibility. |
| sdk/storage/azure-storage-blob-changefeed/src/main/java/com/azure/storage/blob/changefeed/models/BlobOperationName.java | Adds a new ExpandableStringEnum for operation names used by the change feed. |
| sdk/storage/azure-storage-blob-changefeed/src/main/java/com/azure/storage/blob/changefeed/models/BlobChangefeedEventType.java | Adds new event type constants for newer schema/container change feed events. |
| sdk/storage/azure-storage-blob-changefeed/src/main/java/com/azure/storage/blob/changefeed/models/BlobChangefeedEventData.java | Adds default getters for new optional fields (creation time, last access time, restored container version). |
| sdk/storage/azure-storage-blob-changefeed/src/main/java/com/azure/storage/blob/changefeed/implementation/models/InternalBlobChangefeedEventData.java | Implements parsing/storage of the newly added optional fields and includes them in equals/hashCode/toString. |
Comment on lines
+119
to
+123
| ChangefeedTypeValidator.isNull(createTime) | ||
| ? null | ||
| : OffsetDateTime.parse( | ||
| Objects.requireNonNull(ChangefeedTypeValidator.nullOr("createTime", createTime, String.class))), | ||
| ChangefeedTypeValidator.isNull(lastAccessTime) |
Comment on lines
+123
to
+127
| ChangefeedTypeValidator.isNull(lastAccessTime) | ||
| ? null | ||
| : OffsetDateTime.parse(Objects | ||
| .requireNonNull(ChangefeedTypeValidator.nullOr("lastAccessTime", lastAccessTime, String.class))), | ||
| ChangefeedTypeValidator.nullOr("restoredContainerVersion", restoredContainerVersion, String.class)); |
Comment on lines
+322
to
+325
| private static Map<String, Object> loadJsonAsAvroMap(String resourceName) throws IOException { | ||
| try (InputStream is = BlobChangefeedEventDeserializationTests.class.getClassLoader() | ||
| .getResourceAsStream(resourceName); | ||
| JsonReader reader = JsonProviders.createReader(is)) { |
ibrandes
reviewed
Jun 4, 2026
Comment on lines
+1
to
+60
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| package com.azure.storage.blob.changefeed.models; | ||
|
|
||
| import com.azure.core.util.ExpandableStringEnum; | ||
|
|
||
| import java.util.Collection; | ||
|
|
||
| /** | ||
| * This class represents the operation name that triggered a {@link BlobChangefeedEvent}. | ||
| */ | ||
| public final class BlobOperationName extends ExpandableStringEnum<BlobOperationName> { | ||
|
|
||
| /** Static value AppendBlock for BlobOperationName. */ | ||
| public static final BlobOperationName APPEND_BLOCK = fromString("AppendBlock"); | ||
|
|
||
| /** Static value UpdateLastAccessTime for BlobOperationName. */ | ||
| public static final BlobOperationName UPDATE_LAST_ACCESS_TIME = fromString("UpdateLastAccessTime"); | ||
|
|
||
| /** Static value CreateContainer for BlobOperationName. */ | ||
| public static final BlobOperationName CREATE_CONTAINER = fromString("ContainerCreated"); | ||
|
|
||
| /** Static value DeleteContainer for BlobOperationName. */ | ||
| public static final BlobOperationName DELETE_CONTAINER = fromString("ContainerDeleted"); | ||
|
|
||
| /** Static value RestoreContainer for BlobOperationName. */ | ||
| public static final BlobOperationName RESTORE_CONTAINER = fromString("RestoreContainer"); | ||
|
|
||
| /** Static value SetContainerMetadata for BlobOperationName. */ | ||
| public static final BlobOperationName SET_CONTAINER_METADATA = fromString("SetContainerMetadata"); | ||
|
|
||
| /** | ||
| * Creates a new instance of {@link BlobOperationName} with no string value. | ||
| * | ||
| * @deprecated Please use {@link #fromString(String)} to create an instance of BlobOperationName. | ||
| */ | ||
| @Deprecated | ||
| public BlobOperationName() { | ||
| } | ||
|
|
||
| /** | ||
| * Creates or finds a BlobOperationName from its string representation. | ||
| * | ||
| * @param name a name to look for. | ||
| * @return the corresponding BlobOperationName. | ||
| */ | ||
| public static BlobOperationName fromString(String name) { | ||
| return fromString(name, BlobOperationName.class); | ||
| } | ||
|
|
||
| /** | ||
| * Gets known BlobOperationName values. | ||
| * | ||
| * @return known BlobOperationName values. | ||
| */ | ||
| public static Collection<BlobOperationName> values() { | ||
| return values(BlobOperationName.class); | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
do we need this class? its never wired to BlobChangefeedEventData.getApi() - which still returns a string. I think we are okay to remove this class, since the new event types are enough to disambiguate.
Member
|
looks good so far - please resolve the open comments and analyze errors |
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.
No description provided.