#5 Improve createbz: drop parse_multi, process email addresses more, be safer about non-registered email addresses, add another existing bug check
Merged by bcotton. Opened by adamwill.
fedora-pgm/ adamwill/pgm_scripts createbz-email-safer  into  main

Download 5.patch

This PR has several changes to make createbz better and more robust (I hope). It drops use of the unnecessarily complicated parse_multi (which we were only using to parse a comma-separated string into a list), does a bit more parsing of email addresses, tries to be much safer about email addresses not existing in Bugzilla, and adds another check for whether a tracker bug already exists to guard against the possibility of the script being run multiple times without the CSV data being updated.

@amoloney I hope this should make your life easier! It should solve that problem with make bz crashing out because email addresses aren't registered in Bugzilla, if I didn't mess anything up.

LGTM at quick glance. I have not tried it f'real though. You should be able to test it against stg Bugzilla, though.

I kinda ghetto-tested it by running the tricksier bits interactively in a shell. Let's try hacking up the CSV and running it on staging, though!

3 new commits added

  • createbz: add another check for an existing bug
  • createbz: be safer with email addresses, assign the bug
  • createbz: emails: drop parse_multi, do a bit more processing

agh don't merge this is a rebase nightmare

3 new commits added

  • createbz: add another check for an existing bug
  • createbz: be safer with email addresses, assign the bug
  • createbz: emails: drop parse_multi, do a bit more processing

OK, I think this is good now.

ping? sorry to be pushy, but I wanted to send some more stuff after these...

At the risk of making @amoloney's life worse, I'll go ahead and merge this. If Adam says the tests are good, then who am I to argue? :-) Besides, we can always roll back if it goes kablooie.

@adamwill can you please make corresponding changes to the Changes SOPs if necessary?

Pull-Request has been merged by bcotton

Thanks. Sure, I think the only change necessary is to drop the WARNING here, because these changes should mean none of those concerns is valid any more. I'll send that PR.

btw, I used your idea of testing on staging bugzilla, and verified that the code as merged can do a complete run of the F39 systemwide changes without failing, creates the bugs properly, and correctly detects dupes when run multiple times even without the source CSV being updated.

Yay, I'm helpful from beyond the grave! Docs pr merged!

Metadata