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

How to fix deprecation warning: "The format Fog::CDN::AWS is deprecated" #466

Closed
jaredbeck opened this Issue Sep 5, 2018 · 18 comments

Comments

Projects
None yet
9 participants
@jaredbeck
Contributor

jaredbeck commented Sep 5, 2018

Hi, I'd like to help fix this warning:

be rake -T > /dev/null
[fog][DEPRECATION] Unable to load Fog::AWS::CDN
[fog][DEPRECATION] The format Fog::CDN::AWS is deprecated
[fog][DEPRECATION] Unable to load Fog::AWS::Compute
[fog][DEPRECATION] The format Fog::Compute::AWS is deprecated
[fog][DEPRECATION] Unable to load Fog::AWS::DNS
[fog][DEPRECATION] The format Fog::DNS::AWS is deprecated
[fog][DEPRECATION] Unable to load Fog::AWS::Storage
[fog][DEPRECATION] The format Fog::Storage::AWS is deprecated

Do we need to eg. mv lib/fog lib/aws? How can I help?

See also fog/fog-core#241

grep fog Gemfile
gem 'fog-aws'

bundle | grep fog
Using fog-core 2.1.2
Using fog-json 1.2.0
Using fog-xml 0.1.3
Using fog-aws 3.0.0
@Jabernathy88

This comment has been minimized.

Show comment
Hide comment
@Jabernathy88

Jabernathy88 commented Sep 5, 2018

Me too.

@plribeiro3000

This comment has been minimized.

Show comment
Hide comment
@plribeiro3000

plribeiro3000 Sep 5, 2018

Member

You will need to change the convention from Fog::CDN::AWS to Fog::AWS::CDN.

The issue is that there is no convention among the providers so we have both ways defined here and there.

So we are deprecating the first one in favor of the second one. That should allow us to have the same implementation in all providers.

Member

plribeiro3000 commented Sep 5, 2018

You will need to change the convention from Fog::CDN::AWS to Fog::AWS::CDN.

The issue is that there is no convention among the providers so we have both ways defined here and there.

So we are deprecating the first one in favor of the second one. That should allow us to have the same implementation in all providers.

@jaredbeck

This comment has been minimized.

Show comment
Hide comment
@jaredbeck

jaredbeck Sep 5, 2018

Contributor

You will need to change the convention from Fog::CDN::AWS to Fog::AWS::CDN.

Is this something you think I can tackle? If so, I'll attempt a PR. Do you want to try to define both, or are you willing to make a breaking change (ie. release new major version)?

Contributor

jaredbeck commented Sep 5, 2018

You will need to change the convention from Fog::CDN::AWS to Fog::AWS::CDN.

Is this something you think I can tackle? If so, I'll attempt a PR. Do you want to try to define both, or are you willing to make a breaking change (ie. release new major version)?

@plribeiro3000

This comment has been minimized.

Show comment
Hide comment
@plribeiro3000

plribeiro3000 Sep 6, 2018

Member
Member

plribeiro3000 commented Sep 6, 2018

@geemus

This comment has been minimized.

Show comment
Hide comment
@geemus

geemus Sep 6, 2018

Member

It might be fine to have both? I think the issue at hand here is that, by default, we require the deprecated version. I think we could probably do this?

  1. Change to use the new name for the class.
  2. Change existing requires to use this new name.
  3. Add a new class that just aliases (and will raise the warning if anybody includes directly).

I think that way we could perhaps avoid the requirement of a major version bump.

@plribeiro3000 what do you think?

@jaredbeck you can definitely go for it, we are here to support you.

Member

geemus commented Sep 6, 2018

It might be fine to have both? I think the issue at hand here is that, by default, we require the deprecated version. I think we could probably do this?

  1. Change to use the new name for the class.
  2. Change existing requires to use this new name.
  3. Add a new class that just aliases (and will raise the warning if anybody includes directly).

I think that way we could perhaps avoid the requirement of a major version bump.

@plribeiro3000 what do you think?

@jaredbeck you can definitely go for it, we are here to support you.

@plribeiro3000

This comment has been minimized.

Show comment
Hide comment
@plribeiro3000

plribeiro3000 Sep 6, 2018

Member

Good catch @geemus

I didn't thought of that. Way to go with this. 👍

Member

plribeiro3000 commented Sep 6, 2018

Good catch @geemus

I didn't thought of that. Way to go with this. 👍

jaredbeck added a commit to jaredbeck/fog-aws that referenced this issue Sep 6, 2018

Rename CDN::AWS to AWS::CDN
Fixes fog-core deprecation warning

```
[fog][DEPRECATION] Unable to load Fog::AWS::CDN
[fog][DEPRECATION] The format Fog::CDN::AWS is deprecated
```

Part of fog#466
@jsantos

This comment has been minimized.

Show comment
Hide comment
@jsantos

jsantos Sep 11, 2018

I'm mostly using fog-aws to interact with S3, so I also see a lot of these warnings:

[fog][DEPRECATION] Unable to load Fog::AWS::Storage

[fog][DEPRECATION] The format Fog::Storage::AWS is deprecated

jsantos commented Sep 11, 2018

I'm mostly using fog-aws to interact with S3, so I also see a lot of these warnings:

[fog][DEPRECATION] Unable to load Fog::AWS::Storage

[fog][DEPRECATION] The format Fog::Storage::AWS is deprecated
@geemus

This comment has been minimized.

Show comment
Hide comment
@geemus

geemus Sep 11, 2018

Member

@jsantos thanks, I believe there is some work-in-progress to fix this. So apologies for the noise in the mean time, hopefully we will get it all resolved soon.

Member

geemus commented Sep 11, 2018

@jsantos thanks, I believe there is some work-in-progress to fix this. So apologies for the noise in the mean time, hopefully we will get it all resolved soon.

@jsantos

This comment has been minimized.

Show comment
Hide comment
@jsantos

jsantos Sep 11, 2018

@geemus No rush at all, just noticed it and it hasn't been mentioned yet. I'll run a few tests and update here in case there are any other warnings.

jsantos commented Sep 11, 2018

@geemus No rush at all, just noticed it and it hasn't been mentioned yet. I'll run a few tests and update here in case there are any other warnings.

@jaredbeck

This comment has been minimized.

Show comment
Hide comment
@jaredbeck

jaredbeck Sep 11, 2018

Contributor

.. I believe there is some work-in-progress to fix this ..

Correct. We're waiting for #467 to be merged (it renames CDN::AWS to AWS::CDN). Once the renaming procedure is so confirmed, I will tackle other constants, probably one at a time.

Contributor

jaredbeck commented Sep 11, 2018

.. I believe there is some work-in-progress to fix this ..

Correct. We're waiting for #467 to be merged (it renames CDN::AWS to AWS::CDN). Once the renaming procedure is so confirmed, I will tackle other constants, probably one at a time.

@jsantos

This comment has been minimized.

Show comment
Hide comment
@jsantos

jsantos Sep 12, 2018

@jaredbeck Just for context, few other constants that will probably need renaming:

[fog][DEPRECATION] Unable to load Fog::AWS::Compute
[fog][DEPRECATION] The format Fog::Compute::AWS is deprecated
[fog][DEPRECATION] Unable to load Fog::AWS::DNS
[fog][DEPRECATION] The format Fog::DNS::AWS is deprecated

I believe when you guys are done with the first one I can submit pull requests for the others.

jsantos commented Sep 12, 2018

@jaredbeck Just for context, few other constants that will probably need renaming:

[fog][DEPRECATION] Unable to load Fog::AWS::Compute
[fog][DEPRECATION] The format Fog::Compute::AWS is deprecated
[fog][DEPRECATION] Unable to load Fog::AWS::DNS
[fog][DEPRECATION] The format Fog::DNS::AWS is deprecated

I believe when you guys are done with the first one I can submit pull requests for the others.

@DrLuthor

This comment has been minimized.

Show comment
Hide comment
@DrLuthor

DrLuthor Sep 14, 2018

Hi,
it seems I'm in the same case as @jsantos with the same warnings.

DrLuthor commented Sep 14, 2018

Hi,
it seems I'm in the same case as @jsantos with the same warnings.

@sue445

This comment has been minimized.

Show comment
Hide comment
@sue445

sue445 Sep 17, 2018

Contributor

I fixed all other warnings at #468, #469 and #470

Contributor

sue445 commented Sep 17, 2018

I fixed all other warnings at #468, #469 and #470

@geemus

This comment has been minimized.

Show comment
Hide comment
@geemus

geemus Sep 17, 2018

Member

released in v3.2.0

Member

geemus commented Sep 17, 2018

released in v3.2.0

@geemus geemus closed this Sep 17, 2018

@agibralter

This comment has been minimized.

Show comment
Hide comment
@agibralter

agibralter Sep 17, 2018

I just updated it and I'm still seeing:

image

$ rspec spec/models/user_spec.rb
[fog][DEPRECATION] Unable to load Fog::AWS::CDN
[fog][DEPRECATION] The format Fog::CDN::AWS is deprecated
...

agibralter commented Sep 17, 2018

I just updated it and I'm still seeing:

image

$ rspec spec/models/user_spec.rb
[fog][DEPRECATION] Unable to load Fog::AWS::CDN
[fog][DEPRECATION] The format Fog::CDN::AWS is deprecated
...
@geemus

This comment has been minimized.

Show comment
Hide comment
@geemus

geemus Sep 17, 2018

Member

Thanks for the update. I think maybe we missed that one, though I think we now have the others.

Member

geemus commented Sep 17, 2018

Thanks for the update. I think maybe we missed that one, though I think we now have the others.

@geemus geemus reopened this Sep 17, 2018

@stevenharman

This comment has been minimized.

Show comment
Hide comment
@stevenharman

stevenharman Sep 17, 2018

@agibralter @geemus looks like #467 wasn't merged and so isn't included in 3.2.0.

stevenharman commented Sep 17, 2018

@agibralter @geemus looks like #467 wasn't merged and so isn't included in 3.2.0.

@geemus

This comment has been minimized.

Show comment
Hide comment
@geemus

geemus Sep 18, 2018

Member

@stevenharman oops, right you are. Just merged and released 3.3.0, sorry for the oversight.

Member

geemus commented Sep 18, 2018

@stevenharman oops, right you are. Just merged and released 3.3.0, sorry for the oversight.

@geemus geemus closed this Sep 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment