-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
fix: attach volume on #save, remove #server= #443
Conversation
s/service/server/ in Volume#save. Fixes attaching after initialization. Require users to call #attach(server, device) to attach a volume after it's created. Volume#server=(new_server) having a side-effect of attaching a volume is confusing. Volume#device set on #initialize will be lost when calling Volume#wait_for in fog-core ~> 2.0. BREAKING CHANGE Volume#server= is removed.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, as per previous discussion.
The only question I would still have is, is there a reasonable way for us to warn people more directly if they are expecting the old usage? I'm not sure, but if we can warn that would be good, so I welcome your thoughts.
The old usage would require someone to use This is certainly a major bump. Not sure what Fog considers best practices in this case. |
Maybe we could define a |
Deprecation is not an option in this case. I will add |
@lanej yeah, I was pretty sure deprecation wasn't possible unless I was totally missing something. I think the more explicit error message sounds like a great just-in-case. Thanks! |
Direct users to use #attach
Thanks for the extra care/messaging. LGTM. |
s/service/server/
inVolume#save
. Fixes attaching after initialization.Require users to call
Volume#attach(server, device)
to attach a volume after it's created.Volume#server=(new_server)
having a side-effect of attaching a volume is confusing.Volume#device
set onVolume#initialize
will be lost when callingVolume#wait_for
in fog-core ~> 2.0.BREAKING CHANGE
Volume#server=
is removed.