new bug API returning a ref where bzexport expects bug data

RESOLVED FIXED

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: ted, Assigned: dkl)

Tracking

Production

Details

About two months ago I switched bzexport to use the BMO bzapi compat API instead of the old BzAPI proxy:
http://hg.mozilla.org/hgcustom/version-control-tools/rev/1c20d2343aee

I'm now noticing that "bzexport --new" no longer works. I'm not sure if this has always been broken since that switch or if this is new bustage. bzexport POSTs to /bzapi/bug to file a new bug:
http://hg.mozilla.org/hgcustom/version-control-tools/file/6d6cc743a5af/hgext/bzexport/bz.py#l36

and expects to get back bug data (at least id):
http://hg.mozilla.org/hgcustom/version-control-tools/file/6d6cc743a5af/hgext/bzexport/__init__.py#l971

The API is returning a "ref" which is breaking things:
{"ref": "https://bugzilla.mozilla.org/bzapi/bug/1058662"}
(Assignee)

Comment 1

4 years ago
Looking at the BzAPI docs[1], it is supposed to only return the 'ref' but in reality as coded, it returns 'ref' and 'id'. So I coded it based on the docs. Looking at the code for bzexport[2], it is expecting the 'id' key and value so I will add the key to the returned data.

dkl

1. https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI:Methods&oldid=436589#Create_new_bug_.28.2Fbug_POST.29
2. https://hg.mozilla.org/hgcustom/version-control-tools/file/6d6cc743a5af/hgext/bzexport/__init__.py#l1142
Assignee: nobody → dkl
Status: NEW → ASSIGNED
(Assignee)

Comment 2

4 years ago
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   f95d295..bfc1cfe  master -> master
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
this fix is now live on production.
You need to log in before you can comment on or make changes to this bug.