Bug 669520
| Summary: | Need a cleaner error message in package search when specifying an invalid regex | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Jay Dobies <jason.dobies> |
| Component: | z_other | Assignee: | James Slagle <jslagle> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | unspecified | CC: | jconnor, jmatthew, jslagle, skarmark |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | Sprint 25 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-08-16 12:09:53 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 647488, 673021 | ||
Part of this is fixed by because of jconnor and jmatthews's fixes for server side traceback. However, it error message should state that regex is invalid instead of following message: $ sudo pulp-admin package search --version '*foo' error: operation failed: error: nothing to repeat I committed a fix for this in commit 0122bb4fb545dba3b065734b6b6c997a23535e09. There should now be a more friendly error like: error: operation failed: RegularExpressionError: "The regular expression '*3.11' is not valid: nothing to repeat" build: 0.192 [root@preethi ~]# rpm -q pulp pulp-0.0.200-1.fc14.noarch [root@preethi ~]# pulp-admin package search --version '*foo' error: operation failed: RegularExpressionError: "The regular expression '*foo' is not valid: nothing to repeat" Closing with Community Release 15 pulp-0.0.223-4. Closing with Community Release 15 pulp-0.0.223-4. |
$ pulp-admin package search --version '*foo' error: operation failed: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py", line 57, in report_error return method(self, *args, **kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/role_check.py", line 131, in check_roles result = f(instance, *fargs, **kw) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/services.py", line 100, in PUT release=release, arch=arch, filename=filename, regex=True) File "/usr/lib/python2.7/site-packages/pulp/server/api/package.py", line 103, in packages searchDict['version'] = {"$regex":re.compile(version)} File "/usr/lib64/python2.7/re.py", line 190, in compile return _compile(pattern, flags) File "/usr/lib64/python2.7/re.py", line 245, in _compile raise error, v # invalid expression error: nothing to repeat