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

nilClass Exception with RetryPolicyFilter #193

Open
jbeyer05 opened this issue Jun 18, 2021 · 0 comments
Open

nilClass Exception with RetryPolicyFilter #193

jbeyer05 opened this issue Jun 18, 2021 · 0 comments

Comments

@jbeyer05
Copy link

If I use a simple RetryPolicyFilter as follows, when a retry is actually necessary, I get a nilClass exception because retry_data[:count] is nil. Am I using RetryPolicyFilter improperly? It seems like perhaps retry_data[:count] needs to be set to 0 in init_retry_data( )

    blob_service = Azure::Storage::Blob::BlobService.new( storage_account_name: account_name, storage_sas_token: sas_token, storage_blob_host: blob_host )
    blob_service.with_filter( Azure::Storage::Common::Core::Filter::RetryPolicyFilter.new( 5, 1 ))
/home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-common-2.0.1/lib/azure/storage/common/core/filter/retry_filter.rb:58:in `should_retry?': undefined method `<=' for nil:NilClass (NoMethodError)
        from /home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-common-2.0.1/lib/azure/core/http/retry_policy.rb:51:in `call'
        from /home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-common-2.0.1/lib/azure/core/http/http_request.rb:110:in `block in with_filter'
        from /home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-common-2.0.1/lib/azure/core/http/signer_filter.rb:28:in `call'
        from /home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-common-2.0.1/lib/azure/core/http/signer_filter.rb:28:in `call'
        from /home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-common-2.0.1/lib/azure/core/http/http_request.rb:110:in `block in with_filter'
        from /home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-common-2.0.1/lib/azure/core/service.rb:36:in `call'
        from /home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-common-2.0.1/lib/azure/core/filtered_service.rb:34:in `call'
        from /home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-common-2.0.1/lib/azure/core/signed_service.rb:41:in `call'
        from /home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-common-2.0.1/lib/azure/storage/common/service/storage_service.rb:60:in `call'
        from /home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-blob-2.0.0/lib/azure/storage/blob/blob_service.rb:179:in `call'
        from /home/jbeyer/.rvm/gems/ruby-2.4.10/gems/azure-storage-blob-2.0.0/lib/azure/storage/blob/block.rb:149:in `put_blob_block'
        from test_video_upload.rb:70:in `block (3 levels) in <main>'
        from test_video_upload.rb:13:in `each_chunk'
        from test_video_upload.rb:60:in `block (2 levels) in <main>'
        from /home/jbeyer/.rvm/rubies/ruby-2.4.10/lib/ruby/2.4.0/open-uri.rb:37:in `open'
        from /home/jbeyer/.rvm/rubies/ruby-2.4.10/lib/ruby/2.4.0/open-uri.rb:37:in `open'
        from test_video_upload.rb:59:in `block in <main>'
        from test_video_upload.rb:47:in `each'
        from test_video_upload.rb:47:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant