[SERVER-64421] error_codes.py is easy to misuse Created: 10/Mar/22  Updated: 29/Oct/23  Resolved: 10/Mar/22

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

I was developing on a branch for a couple weeks, and occasionally ran python3 buildscripts/errorcodes.py -fix SERVER-63397 on my code. That's the wrong syntax, it should be -fix --ticket SERVER-63397. The script silently ignored my mistake, and executed its default algorithm: replacing "0" error codes with the highest existing error code + 1. Of course, that algorithm leads to conflicts with other people using the same algorithm on their own branches, so when it came time to merge, my commit queue job failed in lint_errorcodes.

error_codes.py should detect misuses like mine.



 Comments   
Comment by Githook User [ 10/Mar/22 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-64421 Ban extra args to errorcodes.py
Branch: master
https://github.com/mongodb/mongo/commit/d589fdc86a615409f4fd85e2d73bbd48398753de

Generated at Thu Feb 08 06:00:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.