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

Error when calling Azure Blob Storage output binding for blobs list #1832

Closed
francotiveron opened this issue Jun 29, 2022 · 2 comments · Fixed by #1837
Closed

Error when calling Azure Blob Storage output binding for blobs list #1832

francotiveron opened this issue Jun 29, 2022 · 2 comments · Fixed by #1837
Assignees
Labels
kind/bug Something isn't working pinned Issue does not get stale

Comments

@francotiveron
Copy link

francotiveron commented Jun 29, 2022

In what area(s)?

/area runtime

What version of Dapr?

1.7

this is the binding component yaml

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: studybinding
spec:
  type: bindings.azure.blobstorage
  version: v1
  initTimeout: 1m
  metadata:
  - name: accountName
    value: "hfconfigsa"
  - name: accountKey
    value: "<hidden>"
  - name: containerName
    value: "studyresult"

this is the F# .NET code run to get the lost of blobs

let request = 
    let r = BindingRequest("studybinding", "list")
    r.Data <- (
            {|
            maxResults = 10
            prefix = "file"
            marker = "2!108!MDAwMDM1IWZpbGUtMDgtMDctMjAyMS0wOS0zOC01NS03NzgtMjEudHh0ITAwMDAyOCE5OTk5LTEyLTMxVDIzOjU5OjU5Ljk5OTk5OTlaIQ--"
            ``include`` = {|
                snapshots = false
                metadata = true
                uncommittedBlobs = false
                copy = false
                deleted = false |} |}
        |> toUtf8Json
        ).AsMemory()
    r

let! response = daprClient.InvokeBindingAsync(request) 

Below the exception raised

Exception has occurred: CLR/Dapr.DaprException
Exception thrown: 'Dapr.DaprException' in System.Private.CoreLib.dll: 'Binding operation failed: the Dapr endpoint indicated a failure. See InnerException for details.'
 Inner exceptions found, see $exception in variables window for more details.
 Innermost exception 	 Grpc.Core.RpcException : Status(StatusCode="Internal", Detail="error when invoke output binding studybinding: error listing blobs: -> github.com/Azure/azure-pipeline-go/pipeline.NewError, C:/Users/runneradmin/go/pkg/mod/github.com/!azure/azure-pipeline-go@v0.2.2/pipeline/error.go:154
HTTP request failed

Get "https://.blob.core.windows.net/?comp=list&include=metadata&marker=2%21108%21MDAwMDM1IWZpbGUtMDgtMDctMjAyMS0wOS0zOC01NS03NzgtMjEudHh0ITAwMDAyOCE5OTk5LTEyLTMxVDIzOjU5OjU5Ljk5OTk5OTlaIQ--&maxresults=10&prefix=file&restype=container&timeout=61": dial tcp: lookup .blob.core.windows.net: no such host
")
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapr.Client.DaprClientGrpc.<MakeInvokeBindingRequestAsync>d__21.MoveNext()

Note. the url indicated seems incorrect (https://???.blob.core.windows.net/?...)

@francotiveron francotiveron added the kind/bug Something isn't working label Jun 29, 2022
@ItalyPaleAle
Copy link
Contributor

I believe the issue is in the metadata keys.

Please try replacing:

  • accountName -> storageAccount
  • accountKey -> storageAccessKey
  • containerName-> container

Looks like the keys you used are for the state store and not for the binding.

However... The fact that two similar components have different metadata options should be considered a bug. @yaron2 could you please move this issue to components-contrib and assign it to me? I'll change the components so they accept both sets of metadata keys (as aliases).

@mukundansundar mukundansundar transferred this issue from dapr/dapr Jun 30, 2022
@ItalyPaleAle ItalyPaleAle added the pinned Issue does not get stale label Jun 30, 2022
ItalyPaleAle added a commit to ItalyPaleAle/dapr-components-contrib that referenced this issue Jul 1, 2022
By using aliases we are preserving backwards-compatibility

Fixes dapr#1832

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
@ItalyPaleAle
Copy link
Contributor

#1837 will fix this by allowing all options

dapr-bot added a commit that referenced this issue Jul 1, 2022
* Make metadata keys uniform for Azure Storage components

By using aliases we are preserving backwards-compatibility

Fixes #1832

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updated bindings.azure.storagequeues too

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updated state.azure.tablestorage too

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 💄

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 🧹

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Co-authored-by: Loong Dai <long.dai@intel.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
cmendible pushed a commit to cmendible/components-contrib that referenced this issue Jul 4, 2022
* Make metadata keys uniform for Azure Storage components

By using aliases we are preserving backwards-compatibility

Fixes dapr#1832

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updated bindings.azure.storagequeues too

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updated state.azure.tablestorage too

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 💄

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 🧹

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Co-authored-by: Loong Dai <long.dai@intel.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working pinned Issue does not get stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants