Closed
Bug 669805
Opened 13 years ago
Closed 10 years ago
add automated tests to ensure that all queries have a /* query_name */ comment
Categories
(Cloud Services :: Server: Core, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: Atoll, Assigned: rfkelly)
References
Details
(Whiteboard: [qa+])
Attachments
(1 file)
12.31 KB,
patch
|
telliott
:
review+
|
Details | Diff | Splinter Review |
Ops requires some sort of /* query_name */ to manage live databases in production, file intelligent bugs for dev, and track query performance to ops/dev/qa. Existing queries will be updated to include names as part of 669804. Please update the python test suites to warn developers when queries are created that do not have a name applied via with_hint(). This will ensure that all queries are named before they reach staging and production.
Updated•12 years ago
|
Assignee: nobody → rkelly
Comment 1•12 years ago
|
||
Primarily relevant for sync at this point.
Assignee | ||
Comment 2•12 years ago
|
||
From Bug 669804 it sounds like using with_hint is no longer an option, so I've adjusted the bug title accordingly.
Summary: add automated tests to ensure that all queries are named via with_hint → add automated tests to ensure that all queries have a /* query_name */ comment
Updated•12 years ago
|
Whiteboard: [qa-]
Assignee | ||
Comment 3•12 years ago
|
||
Adding an additional request from Bug 759038, since it will need to be done as part of this refactoring: queries that are being retried due to a connection error should have /* retried */ prepended as well so we can trace them in the logs.
Updated•12 years ago
|
Whiteboard: [qa-] → [qa+]
Assignee | ||
Comment 4•12 years ago
|
||
Attaching a patch to implement this for sync2.0. Since we have two pieces of information that we potentially want to capture ("queryName" and "retries") I have generalized this to a dict of "annotations" that can be specified for each query. The queryName and retry status are filled in automatically, but calling code could override their values or provide additional fields if we need. There is also a test that listens for all queries being sent through to the database, and asserts that they contain the necessary annotations. :atoll, is it important for me to backport this to sync1.1 as well? It will be a bit hackier but should be possible in a similar manner to the code shown here.
Attachment #644850 -
Flags: review?(telliott)
Updated•12 years ago
|
Attachment #644850 -
Flags: review?(telliott) → review+
Assignee | ||
Comment 5•12 years ago
|
||
https://github.com/mozilla-services/server-syncstorage/commit/c1f36a801c1c5b2f36a80ad8d0a858978373f96b
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 6•12 years ago
|
||
Erm, I should not have RESOLED/FIXED this because it hasn't been put into sync1.1 yet
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 7•10 years ago
|
||
This is in sync1.5, and we're not taking changes for sync1.1, so closing it out
Status: REOPENED → RESOLVED
Closed: 12 years ago → 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•