Skip to content

ResourceManager: fix list_projects(filter_params)#5383

Merged
theacodes merged 1 commit into
googleapis:masterfrom
zehauser:master
May 24, 2018
Merged

ResourceManager: fix list_projects(filter_params)#5383
theacodes merged 1 commit into
googleapis:masterfrom
zehauser:master

Conversation

@zehauser

Copy link
Copy Markdown
Contributor

The filter_params parameter of resource_manager.Client.list_projects is
a dict (of properties to filter on and the desired value for each property).
Prior to this commit, this dict was passed into the HTTPIterator constructor
in extra_params['filter'].

This didn't work, because extra_params values can't be dicts. They can be
iterables, but since the iterable of a dict is its keys, this resulted in only
the properties being sent along in the 'filter' query param, while the desired
values for those properties were discarded.

This commit transforms the filter_params dict into a simple list prior to
shoving it in extra_params, which fixes the bug.

@zehauser zehauser requested a review from lukesneeringer as a code owner May 24, 2018 00:31
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 24, 2018
@zehauser zehauser force-pushed the master branch 2 times, most recently from 32672a4 to bfc1530 Compare May 24, 2018 01:03
The filter_params parameter of resource_manager.Client.list_projects is
a dict (of properties to filter on and the desired value for each property).
Prior to this commit, this dict was passed into the HTTPIterator constructor
in extra_params['filter'].

This didn't work, because extra_params values can't be dicts. They *can* be
iterables, but since the iterable of a dict is its keys, this resulted in only
the properties being sent along in the 'filter' query param, while the desired
values for those properties were discarded.

This commit transforms the filter_params dict into a simple list prior to
shoving it in extra_params, which fixes the bug.
@theacodes

Copy link
Copy Markdown
Contributor

Thanks for doing this, @zehauser!

@theacodes theacodes merged commit ccdfbff into googleapis:master May 24, 2018
@theacodes

Copy link
Copy Markdown
Contributor

@crwilcox can you cut a new release?

@zehauser

Copy link
Copy Markdown
Contributor Author

⭐️🍰🎆!

@zehauser

zehauser commented Jul 5, 2018

Copy link
Copy Markdown
Contributor Author

@crwilcox @theacodes bump to get this released when possible! :)

@tseaver tseaver added the api: cloudresourcemanager Issues related to the Resource Manager API. label Jul 5, 2018
parthea pushed a commit that referenced this pull request Jun 4, 2023
The filter_params parameter of resource_manager.Client.list_projects is
a dict (of properties to filter on and the desired value for each property).
Prior to this commit, this dict was passed into the HTTPIterator constructor
in extra_params['filter'].

This didn't work, because extra_params values can't be dicts. They *can* be
iterables, but since the iterable of a dict is its keys, this resulted in only
the properties being sent along in the 'filter' query param, while the desired
values for those properties were discarded.

This commit transforms the filter_params dict into a simple list prior to
shoving it in extra_params, which fixes the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: cloudresourcemanager Issues related to the Resource Manager API. cla: yes This human has signed the Contributor License Agreement.

4 participants