Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1491658 - Author name can only contain letters from printable ASCII range
Summary: Author name can only contain letters from printable ASCII range
Alias: None
Product: Beaker
Classification: Retired
Component: wizard
Version: develop
Hardware: All
OS: All
Target Milestone: 25.0
Assignee: Dan Callaghan
QA Contact: Anwesha Chatterjee
Depends On:
TreeView+ depends on / blocked
Reported: 2017-09-14 11:10 UTC by Mirek Długosz
Modified: 2018-03-19 04:18 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-03-19 04:18:13 UTC

Attachments (Terms of Use)
Very simple patch to solve this issue (untested) (681 bytes, patch)
2017-09-14 11:23 UTC, Mirek Długosz
no flags Details | Diff

Description Mirek Długosz 2017-09-14 11:10:39 UTC
`beaker-wizard` requires author name to consist of letters in ASCII printable range - basically, lowercase and uppercase latin letters (a-z). In 2017 there is hardly a technical reason for such limitation.

Version-Release number of selected component (if applicable):
$ beaker-wizard --version
beaker-wizard 2.3.0

How reproducible:

Steps to Reproduce:
1. Run:
beaker-wizard -n 'Gęśla Jaźń' -d "Issue reproducer" -t 5m -b CoreOS/beaker-client/Interoperability/sample-test-name 1469706

Actual results:
Contacting bugzilla...
Fetching details for BZ#1469706

Author's name
[Gęśla Jaźń is not a valid author, what about Mirosław Zalewski?] 

Expected results:
Test case details are displayed for review. Names with diacritics or these not based on latin alphabet are accepted. Users are not told their real names are "not valid".

Comment 1 Mirek Długosz 2017-09-14 11:23:10 UTC
Created attachment 1325914 [details]
Very simple patch to solve this issue (untested)

Comment 2 Dan Callaghan 2017-10-23 05:47:50 UTC
I would go one step further and say there is no reason why we should be requiring that people's names be either two or three space-separated elements, either.

Possibly that is designed to catch the cause where someone's name has wrongly been guessed as their username (like "dcallagh") although if someone really wants to use that as their name, I don't see why the wizard should stop them.

However, we might have a problem one layer down, in the testinfo.desc parser. I tried putting a non-ASCII name into a task Makefile and I get:

rhts-lint testinfo.desc
testinfo.desc:1: error: "Gęśla Jaźń <dcallagh@redhat.com>" is not a valid Owner field (should be a valid RFC2822 name_addr, such as John Doe <jdoe@somedomain.org>)
make: *** [testinfo.desc] Error 1

so that might need fixing too...

Comment 3 Dan Callaghan 2017-10-23 06:51:15 UTC
So, this was surprisingly hard to fully fix. :-)

https://gerrit.beaker-project.org/5885 beaker-wizard: don't enforce any restrictions on author name
https://gerrit.beaker-project.org/5884 accept non-ASCII names in testinfo.desc
https://gerrit.beaker-project.org/5886 accept non-ASCII names in testinfo.desc

Comment 4 Dan Callaghan 2017-10-23 23:28:04 UTC
The random smattering of .decode() in testinfo.py makes me nervous though. So I'm thinking I should audit that whole module for unicode-cleanliness first, and then these patches can go on top.

Bumping this to 25.0 since it's not really a minor fix.

Comment 5 Dan Callaghan 2017-11-02 07:40:30 UTC
I feel more confident now with this:

https://gerrit.beaker-project.org/5904 testinfo.py: deal exclusively in unicode not bytes
https://gerrit.beaker-project.org/5884 accept non-ASCII names in testinfo.desc

and matching changes on the Beaker side:

https://gerrit.beaker-project.org/5905 testinfo.py: deal exclusively in unicode not bytes
https://gerrit.beaker-project.org/5906 accept non-ASCII names in testinfo.desc

Although now that I think about it, the Beaker-side patches should really include a test case with a task with non-ASCII chars in the name...

Comment 7 Anwesha Chatterjee 2018-01-08 03:57:49 UTC
A test on testinfo.desc with an owner name with special characters produces this error  

> rhts-lint testinfo.desc

testinfo2.desc:1: error: "Gęśla Jaźń <bpeck@redhat.com>" is not a valid Owner field (should be a valid RFC2822 name_addr, such as John Doe <jdoe@somedomain.org>)

Comment 8 Dan Callaghan 2018-01-08 04:47:12 UTC
Turns out my patch:


was not complete. rhts-lint and rhts-mk-generate-specfile do their own file handling which is currently still dealing in bytes and not unicode.

Comment 9 Dan Callaghan 2018-01-08 05:19:59 UTC
(In reply to Dan Callaghan from comment #8)


Comment 10 Dan Callaghan 2018-01-08 07:38:32 UTC
This bug fix is included in rhts-4.73-1.git.4.8daecb4 which is currently available for download here:


Comment 11 Anwesha Chatterjee 2018-01-09 00:33:54 UTC
Verified that 

* with beaker-client-25.0-0.git.176.b72276ac3.el6eng.noarch.rpm installed
* Running: `beaker-wizard -n 'Gęśla Jaźń'`

No longer produces the error "not a valid author", and produces a Makefile with the provided author name.

* Running: `make rpm` 
in the directory with the makefile builds successfully

* Running: `rhts-lint testinfo.desc`
Does not throw any errors

Comment 12 Roman Joost 2018-03-19 04:18:13 UTC
Beaker 25.0 has been released.

Release notes are available upstream: https://beaker-project.org/docs/whats-new/release-25.html

Note You need to log in before you can comment on or make changes to this bug.