Project

Profile

Help

Issue #4780

Task search by invalid field should raise meaningful error

Added by rochacbruno about 1 year ago. Updated 25 days ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
(Total: 0:00 h)
Severity:
2. Medium
Version:
Master
Platform Release:
3.0.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:

Description

Reference and discussion: https://github.com/pulp/pulpcore/pull/115#issuecomment-488880787

When we request:

/pulp/api/v3/tasks/?name=pulpcore.app.tasks.repository.update

We get the correct results of all update tasks.

But if we request an invalid field name:

/pulp/api/v3/tasks/?invalidfield=foobar

Or an invalid value to a proper field like the escaped `+`

/pulp/api/v3/tasks/?name=+'

We get all results, the same result if I simply request /pulp/api/v3/tasks/ without params.

What I expected was to see an error like:

Invalid Field name

And for the second case to get `0` results.


Subtasks

Test #4781: Assert search raises error when filtering by invalid fieldNEWActions

Related issues

Related to Pulp - Test #4230: Test task name and search for task based on their nameCLOSED - COMPLETE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to RPM Support - Issue #4857: Pulp 2 Nightly Regression in test_iso_crud.ISOUpdateTestCase.test_allCLOSED - DUPLICATE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision eb1760d8 View on GitHub
Added by Fabricio Aguiar 9 months ago

Raise meaningful error for invalid filters

closes #4780 https://pulp.plan.io/issues/4780

History

#1 Updated by kersom about 1 year ago

  • Related to Test #4230: Test task name and search for task based on their name added

#2 Updated by amacdona@redhat.com about 1 year ago

  • Triaged changed from No to Yes

IMO this is a valid issue, but since our filter functionality comes from Django Rest Framework, I'm not sure if this can be done cleanly. If there is a DRF configuration that we can add to fix this across the board, 1, otherwise we should bump this to 3.1

#3 Updated by sunnysunny about 1 year ago

Really your post is really very good and I appreciate it. It’s hard to sort the good from the bad sometimes.You definitely put a new spin on a topic thats been written about for years.
[[https://shell-shockers.online]]

#4 Updated by bherring about 1 year ago

  • Related to Issue #4857: Pulp 2 Nightly Regression in test_iso_crud.ISOUpdateTestCase.test_all added

#5 Updated by fao89 9 months ago

  • Status changed from NEW to POST
  • Assignee set to fao89

#6 Updated by Anonymous 9 months ago

  • Status changed from POST to MODIFIED

#7 Updated by bmbouter 7 months ago

  • Sprint/Milestone set to 3.0.0

#8 Updated by bmbouter 7 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#9 Updated by jsmithfrr 6 months ago

It’s hard to sort the good from the bad sometimes.You definitely put a new spin on a topic thats been written about for years. [[http://www.templerun3.biz]]

#10 Updated by bmbouter 25 days ago

  • Category deleted (14)

We are removing the 'API' category per open floor discussion June 16, 2020.

Please register to edit this issue

Also available in: Atom PDF