Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-48323

Update errorcodes.py --fix to optionally accept the server ticket number as input

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Build, Logging
    • Labels:
      None
    • Fully Compatible

      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.

            Assignee:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: