Skip to content

[Storage] Fix listener to use the target data blob client over the host #50431

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

Merged
merged 5 commits into from
Jul 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Breaking Changes

### Bugs Fixed
- Fixed bug where the scan will continue scanning AzureWebJobsStorage even when configuring a target storage account

### Other Changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ public async Task<IListener> CreateAsync(CancellationToken cancellationToken)
{
// Note that these clients are intentionally for the storage account rather than for the dashboard account.
// We use the storage, not dashboard, account for the blob receipt container and blob trigger queues.
var primaryBlobClient = _hostBlobServiceClient;

// Important: We're using the storage account of the function target here, which is the account that the
// function the listener is for is targeting. This is the account that will be used
// to read the trigger blob.
Expand All @@ -107,7 +105,7 @@ public async Task<IListener> CreateAsync(CancellationToken cancellationToken)
new SharedBlobListenerFactory(hostId, _hostBlobServiceClient, _exceptionHandler, _blobWrittenWatcherSetter, _loggerFactory.CreateLogger<BlobListener>()));

// Register the blob container we wish to monitor with the shared blob listener.
await RegisterWithSharedBlobListenerAsync(hostId, sharedBlobListener, primaryBlobClient,
await RegisterWithSharedBlobListenerAsync(hostId, sharedBlobListener, targetBlobClient,
blobTriggerQueueWriter, cancellationToken).ConfigureAwait(false);
}

Expand Down