Skip to content
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

For some resources, resource#get(nil) returns a resource #33

Closed
ikehz opened this issue May 28, 2015 · 2 comments
Closed

For some resources, resource#get(nil) returns a resource #33

ikehz opened this issue May 28, 2015 · 2 comments

Comments

@ikehz
Copy link
Member

ikehz commented May 28, 2015

I would expect that, for example, Fog::Compute[:google].servers.get(nil) should either return nil or raise an error. Instead, if at least one server exists in my project,

> Fog::Compute[:google].servers.get(nil)
=> <Fog::Compute::Google::Server
      name="server-name",
      ...
    >

This is because of the way we find servers, disks, and other resources that are zoned/regioned. For example:

servers = service.list_aggregated_servers(:filter => "name eq .*#{identity}").body['items']

Every server matches that filter if identity is nil.

@icco icco self-assigned this Oct 24, 2015
@Temikus Temikus added the ready label May 24, 2016
Temikus added a commit to Temikus/fog-google that referenced this issue Jul 20, 2018
- Enable for get methods with multiple parameters
- Mark as skip by default since fog#33 causes to leak info
@Temikus
Copy link
Member

Temikus commented Jul 21, 2018

Seems like this is now compounded by the new behavior of google-api-client.

@compute.get_image(project, nil)
=> #<Google::Apis::ComputeV1::Image:0x00007fa663dfc4b8
 @id=0,
 @kind="compute#imageList",
 @self_link="https://www.googleapis.com/compute/v1/projects/my-project/global/images/">

@Temikus
Copy link
Member

Temikus commented Jul 21, 2018

Filed an issue googleapis/google-api-ruby-client#698

Temikus added a commit to Temikus/fog-google that referenced this issue Jul 22, 2018
Temikus added a commit to Temikus/fog-google that referenced this issue Jul 22, 2018
This should fix both fog#33 and fog#352 for compute
Temikus added a commit to Temikus/fog-google that referenced this issue Jul 22, 2018
This should fix both fog#33 and fog#352 for compute
@Temikus Temikus assigned Temikus and unassigned icco Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants