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

Error filtering applications by org #4658

Closed
robwhitby opened this issue Oct 12, 2020 · 5 comments · Fixed by #4662
Closed

Error filtering applications by org #4658

robwhitby opened this issue Oct 12, 2020 · 5 comments · Fixed by #4662
Labels
bug community Community Raised Issue
Milestone

Comments

@robwhitby
Copy link

Stratos Version

4.2 (3.2.0 is working ok)

CF API Version

2.153.0

Expected behaviour

Should be able to filter applications by org + space

Actual behaviour

org filter does not work, errors calling CF API /v2/apps

2020-10-12T12:24:03.52+0100 [APP/PROC/WEB/0] OUT WARN[Mon Oct 12 11:24:03 UTC 2020] Passthrough response: URL: https://<API>/v2/apps?order-direction=asc&order-direction-field=creation&page=1&results-per-page=100&inline-relations-depth=2&include-relations=space,organization,routes&q=organization_guid=acb77bc7-846f-481f-86a7-041d478d10ea&q=space_guid%20IN%20333cb316-2f0a-4482-9922-b65bf76d4518, Status Code: 400, Status: 400 Bad Request, Content Type: application/json;charset=utf-8, Length: 167

2020-10-12T12:24:03.52+0100 [APP/PROC/WEB/0] OUT WARN[Mon Oct 12 11:24:03 UTC 2020] {
2020-10-12T12:24:03.52+0100 [APP/PROC/WEB/0] OUT   "description": "The query parameter is invalid: organization_guid=acb77bc7-846f-481f-86a7-041d478d10ea",
2020-10-12T12:24:03.52+0100 [APP/PROC/WEB/0] OUT   "error_code": "CF-BadQueryParameter",
2020-10-12T12:24:03.52+0100 [APP/PROC/WEB/0] OUT   "code": 10005
2020-10-12T12:24:03.52+0100 [APP/PROC/WEB/0] OUT }

Steps to reproduce the behavior

the error can be replicated with cf curl

$ cf curl '/v2/apps?order-direction=asc&order-direction-field=creation&page=1&results-per-page=100&inline-relations-depth=2&include-relations=space,organization,routes&q=organization_guid=acb77bc7-846f-481f-86a7-041d478d10ea&q=space_guid%20IN%20333cb316-2f0a-4482-9922-b65bf76d4518'
{
   "description": "The query parameter is invalid: organization_guid=acb77bc7-846f-481f-86a7-041d478d10ea",
   "error_code": "CF-BadQueryParameter",
   "code": 10005
}

= is not a valid operator in the CF API v2. It should be :

https://apidocs.cloudfoundry.org/13.19.0/apps/list_all_apps.html

Valid ops: : >= <= < > IN

@richard-cox richard-cox added the community Community Raised Issue label Oct 12, 2020
@richard-cox
Copy link
Contributor

Hi @robwhitby , thanks for raising this issue. I've tried to reproduce this with no joy. Could you confirm...

Could you also confirm

  1. Which commit you're seeing this from (we've yet to officially release 4.2 however have updated the version to this in master)?
  2. You're seeing this in the /applications Application list?
  3. Whether you have UI_LIST_ALLOW_LOAD_MAXED/console.ui.listAllowLoadMaxed enabled, and if so are you hitting the maxed state (message shown when the list is loaded with no filters applied)?

Thanks!

@robwhitby
Copy link
Author

Hi,

thanks for getting back so quick!

Which commit you're seeing this from (we've yet to officially release 4.2 however have updated the version to this in master)?

Sorry, I'm using the docker image, and see it in 4.1.0 and nightly. 3.2.0 is working.

You're seeing this in the /applications Application list?

yes

Whether you have UI_LIST_ALLOW_LOAD_MAXED/console.ui.listAllowLoadMaxed enabled, and if so are you hitting the maxed state (message shown when the list is loaded with no filters applied)?

Yes we hit the maxed state. I have tried setting UI_LIST_ALLOW_LOAD_MAXED in 4.1.0 and it does not fix the issue (still get the Cf-BadQueryParameter error)

Thanks again!

@richard-cox
Copy link
Contributor

Think I got to the bottom of this, it was when the space was also filtered on and should only effect the app wall list when the maxed state is entered (and enabled via config).

I've pushed a fix (#4662), if this doesn't make it into 4.2 it will be in the release after.

@robwhitby
Copy link
Author

that's great, thanks very much 👍

@richard-cox richard-cox added this to the 4.2.0 milestone Oct 13, 2020
@richard-cox
Copy link
Contributor

The fix has merged and will make it into 4.2.0 which is due in the next few weeks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug community Community Raised Issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants