[SERVER-55279] Commit queue message validation got tricked by merging multiple commits Created: 17/Mar/21  Updated: 19/Jul/21  Resolved: 19/Jul/21

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Charlie Swanson Assignee: Jeffrey Zambory
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
duplicates SERVER-57773 Commit message validation does not va... Closed
duplicates SERVER-49939 Validate commit message should handle... Closed
Operating System: ALL
Sprint: DAG 2021-07-26
Participants:
Story Points: 2

 Description   

In this patch I managed to commit a message without a SERVER ticket by accident: https://github.com/mongodb/mongo/commit/075e51fefecc54e219c56e75c3ba08c993b5c187

It looks like it was because I batched multiple commits in one commit-queue merge:

Commit queue patch has multiple commits (these will be tested together but merged separately). Continue? (y/n): y
 jstests/aggregation/sources/collStats/count.js     |  8 ++-
 .../sources/collStats/query_exec_stats.js          |  4 +-
 jstests/core/api_version_pipeline_stages.js        | 47 +++++++++++--
 src/mongo/db/commands/dbcommands.cpp               |  4 +-
 src/mongo/db/pipeline/SConscript                   |  7 +-
 .../db/pipeline/document_source_coll_stats.cpp     | 82 +++++++---------------
 src/mongo/db/pipeline/document_source_coll_stats.h | 30 +++++---
 .../db/pipeline/document_source_coll_stats.idl     | 69 ++++++++++++++++++
 .../document_source_parsing_validators.cpp         | 46 ++++++++++++
 .../pipeline/document_source_parsing_validators.h  | 38 ++++++++++
 .../db/pipeline/lite_parsed_document_source.h      | 13 ++++
 src/mongo/db/pipeline/lite_parsed_pipeline.cpp     |  4 ++
 .../common_mongod_process_interface.cpp            |  4 +-
 .../common_mongod_process_interface.h              |  2 +-
 .../process_interface/mongo_process_interface.h    |  3 +-
 .../process_interface/mongos_process_interface.h   |  2 +-
 .../stub_mongo_process_interface.h                 |  2 +-
 src/mongo/db/pipeline/storage_stats_spec.idl       | 50 +++++++++++++
 src/mongo/db/stats/SConscript                      |  3 +-
 src/mongo/db/stats/storage_stats.cpp               | 17 ++---
 src/mongo/db/stats/storage_stats.h                 |  5 +-
 21 files changed, 337 insertions(+), 103 deletions(-)
5023694617 Add limited $collStats invocations to API Version 1
7cc55db869 SERVER-54470 Use IDL to parse $collStats
This is a summary of the patch to be submitted. Continue? (y/n): y

That second-to-last line is the problem, and I think it validated the commit message as one big string: 'SERVER-54470 Use IDL to parse $collStats <- Add limited $collStats invocations to API Version 1'



 Comments   
Comment by Githook User [ 14/Jul/21 ]

Author:

{'name': 'Jeff Zambory', 'email': 'jeff.zambory@mongodb.com'}

Message: SERVER-55279: Commit queue message validation got tricked by merging multiple commits
Branch: master
https://github.com/mongodb/mongo/commit/ab08cdc4f20317a42a91be150d89c684d5dd4cf5

Comment by David Bradford (Inactive) [ 09/Jul/21 ]

With DAG-1320 and EVG-14862, we should be able to get the list of commit messages as a json array instead of a concatenated string. Using that should make this possible.

Comment by Brooke Miller [ 18/Mar/21 ]

We're going to backlog this for now given that this is a known limitation. If this fix is important to you and you would like us to consider prioritizing it for next quarter, please include this request in the next stakeholder spreadsheet (for April), to help us understand the priority and impact of this, alongside other quick-win requests for next quarter that your team would like us to consider.

Also, it's worth mentioning that this would require us getting more granular commit data from Evergreen.

Comment by David Bradford (Inactive) [ 18/Mar/21 ]

This is a known limitation with the validate script. If there are multiple commits in a patch build, the script does not have a way of knowing about the different commits or separating out their commit messages. We just get a concatenated string with all the commit message together. As a result, we can validate the first message, but are not able to validate any of the others.

As a result, the validation is "best effort".

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