-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Enable legacy checkpoint reading in WebJobs #17392
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ protected BlobsCheckpointStore() | |
public BlobsCheckpointStore(BlobContainerClient blobContainerClient, | ||
EventHubsRetryPolicy retryPolicy, | ||
string functionId, | ||
ILogger logger): this(blobContainerClient, retryPolicy) | ||
ILogger logger): this(blobContainerClient, retryPolicy, readLegacyCheckpoints: true) | ||
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. Should we consider renaming to something like 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. Yep, will do. |
||
{ | ||
_functionId = functionId; | ||
_logger = logger; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,7 @@ public async Task ListCheckpointsAsync_LogsOnInvalidCheckpoints() | |
{ | ||
Page<BlobItem>.FromValues(new[] | ||
{ | ||
BlobsModelFactory.BlobItem("testnamespace/testeventhubname/testconsumergroup/checkpoint/0", false, BlobsModelFactory.BlobItemProperties(false), metadata: new Dictionary<string, string>()) | ||
BlobsModelFactory.BlobItem("testnamespace/testeventhubname/testconsumergroup/checkpoint/0", false, BlobsModelFactory.BlobItemProperties(false, contentLength: 0), metadata: new Dictionary<string, string>()) | ||
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. Why do we pass contentLength of 0? 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. There is no content for a checkpoint blob; its a zero-byte file. The data exists entirely in the metadata. I'm not sure why the text is explicitly setting this, as no logic relies on it, but it does mirror what is expected for the actual service return. 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. 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. ah, fair enough. I was thinking in terms of the T2 checkpoints. Makes sense in the legacy context. |
||
}, null, Mock.Of<Response>()) | ||
})); | ||
|
||
|
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.
Without this change, are the legacy checkpoints skipped? Do we have a test for this?
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.
That's an interesting question... I think that Storage is case-sensitive for naming, but I'm not 100% sure.
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, I changed the existing tests to use the expected casing both to T1 and T2 checkpoints. Storage is case-sensitive.