Skip to content
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

fix: Azure EventHub fallbacks correctly to default checkpointer #6096

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions pkg/scalers/azure_eventhub_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ func (s *azureEventHubScaler) GetUnprocessedEventCountInPartition(ctx context.Co
checkpoint, err = azure.GetCheckpointFromBlobStorage(ctx, s.blobStorageClient, s.metadata.eventHubInfo, partitionInfo.PartitionID)
if err != nil {
// if blob not found return the total partition event count
err = errors.Unwrap(err)
if bloberror.HasCode(err, bloberror.BlobNotFound, bloberror.ContainerNotFound) {
s.logger.V(1).Error(err, fmt.Sprintf("Blob container : %s not found to use checkpoint strategy, getting unprocessed event count without checkpoint", s.metadata.eventHubInfo.BlobContainer))
unWrapped := errors.Unwrap(err)
if bloberror.HasCode(unWrapped, bloberror.BlobNotFound, bloberror.ContainerNotFound) {
s.logger.V(1).Error(unWrapped, fmt.Sprintf("Blob container : %s not found to use checkpoint strategy, getting unprocessed event count without checkpoint", s.metadata.eventHubInfo.BlobContainer))
return GetUnprocessedEventCountWithoutCheckpoint(partitionInfo), azure.Checkpoint{}, nil
}
return -1, azure.Checkpoint{}, fmt.Errorf("unable to get checkpoint from storage: %w", err)
Expand Down
Loading