-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[core] Deprecate Fog::Connection #2711
Conversation
Okay - after #2710 it's obvious that I can't rely on the mock tests to be remotely accurate for lower level changes since I missed a blinding obvious error of using the wrong number of arguments. So even if I had the time to update all the XML providers, I won't be able to test them. I'm now also wondering if the SAXParserConnection will even work since it requires a parser each time. If any providers can test this PR and replace their references to If the XML stuff doesn't work I'll push the contents of |
The fail looks like another oddity, unrelated against Jruby. There are a number of deprecations for this in the mock test run on Travis. This implies that real connections (or at least |
This reapplies the deprecation warnings that were originally part of 7ee3535 when using Fog::Connection request. Unfortunately the Mock world does not exercise any of the code affected by this change so I missed that I had adjusted the signature of the method. If you pass a parser argument into Fog::Connection you should switch to using Fog::XML::SAXParserConnection and pass the parser as the first argument to `#request` If you don't it is better to use Fog::Core::Connection to get rid of the backwards compatibility code and XML dependency. This will make fog VERY NOISY since you'll get output for every request on out of date services.
Attempting to move to using Fog::XML::SAXParserConnection directly failed because the arguments changed. This adds another compatibility level with two key differences: 1) It's namespaced within XML so stands out as not being part of core 2) It is NOT creating deprecation warnings so can be used as the final step if rewriting to use SAXParserConnection is undesired So when merged Fog::Connection usage will create noise. Fog::XML::Connection works the same way and will be extracted to "fog/xml" when we get to it. Fog::Core::Connection just wraps Excon.request and leaves the response body parsing to the provider.
Unlike last attempt this replaces Fog::Connection with Fog::XML::Connection which should be directly compatible. Fog::Connection is there for old PRs but should be removed real soon. Providers using JSON should be able to replace "XML" with "Core" within their code to cut down on the dependency. If I get the time I may attempt to clean up some but testing with Mock will mean that is mostly educated guesswork.
@tokengeek - yeah, not sure how best to raise confidence in this. Let me know if I can help though. |
[core] Deprecate Fog::Connection
Thanks! On Thu, Feb 27, 2014 at 4:24 PM, Paul Thornthwaite <notifications@github.com
|
So I may have just run into a problem due to this. With fog 1.21.0, I'm seeing... This appears to be because fog/xml/connection wasn't required anywhere. Adding a require in fog/rackspace/core for this, I also needed fog/xml/sax_parser_connection. I required that in xml/connection. That seems to resolve it. I hope I'm wrong but this seems to be panning out. This is not good. |
@elight - Sorry, I did as much as the tests would allow. If you needed XML then If you didn't need XML then I may have just been when I was doing a mass update I used the wrong connection without the require. Unfortunately with incomplete tests and dozens of providers it was inevitable. |
Also I think it's something that only turns up if you are requiring just So unless we create Travis jobs that independently require one provider at a time it's not something that will jump out without a bug report. Create a new issue and depending on which of the two options you need let's see if we can get @geemus to do a new release ASAP. |
Ah... ok. Yes, exactly, I am only requiring 'fog/rackspace'. However, this is likely to become the norm moving forward as |
Damn. Either @krames or I need to be triaging all of these PRs on a regular basis as well... This seems to point increasingly toward formalizing a "Fog Core" team (not to be confused with But then I digress into discussing the Summit. I'll stop here. ;-) ;-) |
This reapplies the deprecation warnings that were originally part of
7ee3535 when using Fog::Connection request.
Unfortunately the Mock world does not exercise any of the code affected
by this change so I missed that I had adjusted the signature of the
method.
If you pass a parser argument into Fog::Connection you should switch to
using Fog::XML::SAXParserConnection and pass the parser as the first
argument to
#request
If you don't it is better to use Fog::Core::Connection to get rid of the
backwards compatibility code and XML dependency.
This will make fog VERY NOISY since you'll get output for every request
on out of date services.