Page MenuHomePhabricator

[LNT] Error accessing URL /db_default/v4/nts/profile/ajax/getFunctions; NOT FOUND

Authored by leandron on Mar 12 2018, 8:46 AM.



This is a follow-up from, to cover other function the were executing the same code and adding test coverage for the existing functionality.

Original message by Przemek Wirkus:

This patch is response to issue with LNT WebUI "Error accessing URL /db_default/v4/nts/profile/ajax/getFunctions; NOT FOUND". This issue appears in certain circumstances when user access Web UI under LNT / nts / profile.

Modified by this patch session query may fetch row(s) with profile_id values set to NULL. In order to fetch only not NULL values this patch modifies way we query DB. Query rows with profile_id set to NULL are not desired when query for LNT/nts/profile data.
Note that session query limits it's search to first element of the query which may have profile_id set to NULL (if entry of this type was imported to LNT database before any entry with profile data).

Diff Detail

Event Timeline

leandron created this revision.Mar 12 2018, 8:46 AM

For what it is worth; this is the fix I would have suggested for the issue.

I'm not qualified to review the patch for code style, or project direction; but I would like to see this go in. We need this to display profiles properly in our instance, because our database can get in a state where we return multiple results for the run_id/test_id pair, only some of which have profiles attached.

MatzeB accepted this revision.Mar 26 2018, 10:27 AM

LGTM, though none of us apple people know much about the profile code as it only works on linux right now. But unless someone with more knowledge of the code objects, I'd push this.

This revision is now accepted and ready to land.Mar 26 2018, 10:27 AM
leandron closed this revision.Mar 28 2018, 8:37 AM

Commited as r328614