[SERVER-48323] Update errorcodes.py --fix to optionally accept the server ticket number as input Created: 20/May/20  Updated: 29/Oct/23  Resolved: 10/Oct/20

Status: Closed
Project: Core Server
Component/s: Build, Logging
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Improvement Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

errorcodes.py now optionally accepts --ticket=12345 and --ticket=SERVER-12345 (case insensitive). When substituting a log statement such as:

LOGV2(0, "message", "variable"_attr=variable);

the error code of 0 is typically replaced with the highest error code used in the server plus one. If --ticket=<ticket num> is specified, errorcodes.py will instead replace the error code from the range 1234500 -> 1234599. By convention, this should ensure that the error code will never collide when rebasing locally or pushing to the commit queue.

Original Description
With structured logging, a new protocol was established for choosing assert/log ids that don't collide, <serverTicketNumber>00-99.

If errorcodes.py accepted the server ticket as input, it could use that as its start point for filling in message IDs.



 Comments   
Comment by Githook User [ 10/Oct/20 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-48323: Have errorcodes.py accept a `--ticket` input to generate unique error codes.
Branch: master
https://github.com/mongodb/mongo/commit/9038625445b40efe40589e3d3ab74e301b21369a

Comment by Robert Guo (Inactive) [ 18/Aug/20 ]

Thanks for the feature request Dan. While this feature request is certainly reasonable and a nice small win, the ownership of errorcodes.py is not clear and is not something that STM will take on in the foreseeable future. If this is a feature anyone finds valuable or feel strongly about, please feel free to re-open or take the ticket.

Generated at Thu Feb 08 05:16:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.