Closed Bug 1131036 Opened 5 years ago Closed 5 years ago

API searches no longer working

Categories

(bugzilla.mozilla.org :: API, defect)

Production
x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: decoder, Assigned: dkl)

References

Details

Attachments

(1 file, 1 obsolete file)

This morning I noticed that searches in my bot that still uses BzAPI fail. I tried reproducing this in the browser and hit the problem pretty quickly:

https://api-dev.bugzilla.mozilla.org/latest/bug/?summary=Flash%20crash&summary_type=contains_all_words

Same for the other URL I found (the compat layer):

https://bugzilla.mozilla.org/bzapi/bug/?summary=Flash%20crash&summary_type=contains_all_words


That search isn't my actual search which is much more complex, but even this simple example from the documentation failed for me.
fails on /rest/ searches too, with the same error:

https://bugzilla.mozilla.org/rest/bug/?summary=Flash%20crash&summary_type=contains_all_words
{
   "code" : 50,
   "documentation" : "https://wiki.mozilla.org/Bugzilla:BzAPI",
   "error" : true,
   "message" : "The function requires a ids argument, and that argument was not set."
}

investigating
Assignee: nobody → glob
Summary: BzAPI searches no longer working → API searches no longer working
ah, this is because of the / after "bug".
decoder says this used to work until recently.
dkl wants to look at this one.
Assignee: glob → dkl
Attached patch 1131036_1.patch (obsolete) — Splinter Review
Attachment #8561389 - Flags: review?(glob)
Comment on attachment 8561389 [details] [diff] [review]
1131036_1.patch

Review of attachment 8561389 [details] [diff] [review]:
-----------------------------------------------------------------

we should only be doing this for /bzapi/ requests, not all /rest/ requests.
Attachment #8561389 - Flags: review?(glob) → review-
Attached patch 1131036_2.patchSplinter Review
Did not get to fix this the way I originally hoped so had to do the path fix much earlier in the request chain.

dkl
Attachment #8561389 - Attachment is obsolete: true
Attachment #8561400 - Flags: review?(glob)
decoder: did you not see any of the messages about BzAPI going away imminently? Do you have a migration and testing plan in place?

Gerv
I'm not using BzAPI directly, I'm using bztools which I think already switched to the compatibility layer. So this isn't only a problem with the old BzAPI interface. As far as I can tell, our bot works with the compatibility layer as well, but we haven't extensively tested it yet.
Comment on attachment 8561400 [details] [diff] [review]
1131036_2.patch

Review of attachment 8561400 [details] [diff] [review]:
-----------------------------------------------------------------

r=glob
Attachment #8561400 - Flags: review?(glob) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   7764fb5..5423c44  master -> master
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
(In reply to Christian Holler (:decoder) from comment #9)
> I'm not using BzAPI directly, I'm using bztools which I think already
> switched to the compatibility layer. 

Seemingly not, because you would have seen this problem already if that were so. The reason things broke is that we switched the BzAPI endpoint to use the compatibility layer directly. So that must have meant that before, you were not using the compatibility layer, because if you were, you'd have seen the problem weeks ago.

Gerv
bztools has switched to the compatibility layer but we have not upgraded bztools yet, which is why we have not hit this problem so far.
(In reply to Christian Holler (:decoder) from comment #13)
> bztools has switched to the compatibility layer but we have not upgraded
> bztools yet

Which is precisely why I asked the question in comment 8 :-)

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