Code Monkey home page Code Monkey logo

azure-ruby-asm-core's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-ruby-asm-core's Issues

shared_key.rb, storage, and tables in feature/arm

@djberg96 Moving issue Azure/azure-sdk-for-ruby#287 to asm-core repo:

I was just looking at: azure/lib/azure/core/auth/shared_key.rb

One issue I spotted is that it doesn't handle secondary accounts. The docs say "foo-secondary" should just be "foo" for the canonical name. This is just a matter of changing "account" to account.split("-").first.

But also, it looks like it always assumes file, glob and file services, based on the headers set in the signable_string method. It should be different for tables, right?

RetryPolicy could not retry for timeout exceptions

I got a timeout exceptions for tcp connection, but never retry even if RetryPolicy enabled.

I think Azure::Storage::Core::Filter::RetryPolicyFilter of azure-storage gem has retry feature for timeout error (here).
But Azure::Core::Http::RetryPolicy cannot rescue such as Errno::ETIMEDOUT and Timeout::Error because it rescues only StandardError.

HttpRequest throws exception when the body is an IO object

HttpRequest throws exception when the body is an IO object, because the code checks whether the body is an IO object but it actually uses the APIs of the File(derived from the IO object): body.size and body.path.

I am going to make a change to fix it. Here are some questions for discussion:

  1. Shall we support File object only? Is it by-design?
  2. Regarding API convenience, an IO or StringIO object may also be the body, shall we support it?

Thoughts? @vishrutshah , @veronicagg

RetryPolicy cloud not retry with a lot of files

I got a timeout error for ssl connection, but never retry even if RetryPolicy enabled.

azure_client = Azure::Storage::Client.create(storage_account_name: "xxx",
                                             storage_access_key: "xxx")
azure_client.storage_blob_host = "https://xxx.blob.core.windows.net"
@blob_client = azure_client.blob_client
@blob_client.with_filter(Azure::Storage::Core::Filter::ExponentialRetryPolicyFilter.new)

I set blob_client as above and I used it for uploading many files (over 400 files, it took over 2 minutes).
Then AzureBlob returns timeout error like Errno::ETIMEDOUT: Failed to open TCP connection to xxx.blob.core.windows.net:443 (Connection timed out - connect(2) for "xxx.blob.core.windows.net" port 443).
I expected retry the request but never retried it, because retry_data[:count] was already over 400 which exceeded DEFAULT_RETRY_COUNT = 3.

Add LICENSE

We are using this project in one of our services and this was flagged because of a missing LICENSE. From other sister packages I see that this should be MIT.

Dependency problem with faraday 1.0.0

Hello,

We are using Chef, and the gem azure-core to access and download resources from Azure blob. The last version of Chef (15.8.23) ship with Faraday 1.0.0 which has been released in January.

The gem azure-core has a dependency on Faraday ~> 0.9. Which breaks the last version of Chef in our case because of this dependency.

Could you please review and try to fix this issue?

Thanks in advance!

Regards, Julien.

Missing azure/core/configuration ?

There is
require "azure/core/configuration"
in lib/azure/core/auth/authorizer.rb

But there is no lib/azure/core/configuration.rb in repository. Is it error?

Update Faraday gem to "~> 1.0 " version

We are trying to use Azure Service Bus along with searchkick and azure-storage-blob(Both use Faraday gem). Azure service bus does not have a separate distinct library like azure-storage-blob and so, for it to work I had to install both azure and azure-core. Just installing azure into our application, is not letting us use the Azure::ServiceBus::Auth::SharedAccessSigner which is required for us to communicate to the service bus.

Here is the problem. searchkick and azure-storage-blob uses faraday ~> 1.0, but azure-core uses faraday ~> 0.9, which is causing us to work with an older version on the above said gems. Is there any way, this gem can be updated to use faraday ~> 1.0? Any help is appreciated.

Thanks in advance.

The pin to nokogiri ~> 1.6 breaks with ruby 2.4+

ChefDK 2.x ships with ruby 2.4.1+ while these azure gems are dependent on ruby < 2.4 due to the nokogiri version pin.

This makes doing work with Azure in the Chef developer ecosystem quite hard.

Retry_Policy Re-throws Response Errors

I am using azure-core in the fog-azure-rm library. I am making two calls, first is get and the next one is put.
For the first get call, the response is an error which is as expected. This error is stored inside @retry_data in retry_policy.rb and is raised. When the next put call is sent, @retry_data still contains the error data and once again the error gets raised even though the response of the 'put' call is a success.
The error happens at this point =>

if @retry_data.has_key?(:error)

Shouldn't the error be raised like this?

if response && !response.success?
      @retry_data[:error] = response.error
      raise @retry_data[:error]
else
      response
end

Please provide an explanation for this, thank you.

Version 0.1.6 on rubygems with invalid SHA 256

In the recent version of bundler (1.14.x) was introduced a checksum validation and in the azure-core version 0.1.6 released in RubyGems the SHA 256 checksum should be b04f7f994e3abc31003139a7ff8a682980c1d064a906a3290d5c369685bc478b but when you fetch gem file it was different: 68ebac6994412a775584478961747a215d0844737a8b9a91405a0ac77fe6c514.

screen shot 2017-01-24 at 11 26 53 am

I can not install the gem with bundle install.
Please release a new version on RubyGems.

Provide more details for the errors

For the issue #27 reported for azure-storage,When some requests failed with an invalid header value, the header name and value are returned. The information are not included in the HTTPError. It would be better the error details can be returned from the error.
I will submit a PR to fix.

Rails 6 requires nokogiri ">= 1.8.5"

Hi there. I use fog-azure-rm to upload images to azure blob storage which uses azure-core gem. So now I started updating my app to Rails 6 and found that rails uses actiontext gem which uses nokogiri. And it's required version is >= 1.8.5.
Can we unlock the nokogiri version in the azure-core gem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.