azure / azure-ruby-asm-core Goto Github PK
View Code? Open in Web Editor NEWAzure Ruby SDK Service Management Core HTTP
Azure Ruby SDK Service Management Core HTTP
@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?
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, 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:
IO
or StringIO
object may also be the body, shall we support it?Thoughts? @vishrutshah , @veronicagg
The signer filter is added as the head filter. When the debug filter is added by client.with_filter
, it is added to the end of the filters. In the http_request.rb, it concatenate the caller chain in a reverse sequence. So the debug filter displays the request information before the signer filter modifies it which is not the request sent to the server.
I will submit a PR to address it later.
According to the Ruby Coding Style Guide, there are many violations in this repo. Do you have a plan to fix them?
$ gem install rubocop
$ rubocop
34 files inspected, 315 offenses detected
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
.
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.
If for any reason the Azure Storage service cannot be reached, the Faraday client will not timeout until after 60 seconds and this is not configurable.
open_timeout
is set in azure-ruby-asm-core, and I don't know of I way to have it already set. I would prefer this to be defined by an environment variable.
It looks like it was addressed in April, but for some reason it was decided 60 seconds was a good timeout value.
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.
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?
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.
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.
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 response && !response.success?
@retry_data[:error] = response.error
raise @retry_data[:error]
else
response
end
Please provide an explanation for this, thank you.
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
.
I can not install the gem with bundle install.
Please release a new version on RubyGems.
signer = Azure::Core::Auth::SharedKey.new
This call will throw error because Azure.storage_account_name
is not defined. Please check the source here.
set_up_response is never used and open_timeout is not set when trying to establish a HTTP connection. So it still hangs sometimes . Please reference this issue in azure-sdk-for-ruby
using new version 0.1.3 I get HTTP 403 error, trying to access a table.
Work OK in with version 0.1.2
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.
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?
i think because of this line in .gemspec
s.files = `git ls-files`.split("\n").reject { |f| f.start_with?("test/unit") }
gem installation is failing looking for git
on our centos 73
boxes.
we don't see a need to have version control software on our production servers. can this dependency on git
be removed?
There are important files that Microsoft projects should all have that are not present in this repository. A pull request has been opened to add the missing file(s). When the pr is merged this issue will be closed automatically.
Microsoft teams can learn more about this effort and share feedback within the open source guidance available internally.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.