[SERVER-65834] Add validation for array types in idl generator Created: 20/Apr/22  Updated: 29/Oct/23  Resolved: 28/Apr/22

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

Type: Task Priority: Major - P3
Reporter: Didier Nadeau Assignee: Didier Nadeau
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

Currently validators are not used for parameters of type array in command argument parsing. For instance :

tenantIds:
    description: "The identifier for the list of tenants being migrated."
    type: array<string>
    validator:
        callback: "tenant_migration_util::validateDatabasePrefix"

The function validateDatabasePrefix is not called when the commands is called, which means there's no validation on tenantIds.



 Comments   
Comment by Githook User [ 28/Apr/22 ]

Author:

{'name': 'Didier Nadeau', 'email': 'didier.nadeau@mongodb.com', 'username': 'nadeaudi'}

Message: SERVER-65834 Add validation for idl array parameters
Branch: master
https://github.com/mongodb/mongo/commit/cdee5f5d2222b8cc56132a7e089b0f0f54880f63

Comment by Didier Nadeau [ 20/Apr/22 ]

Running evergreen with the proposed change : https://spruce.mongodb.com/version/62602fce1e2d171abfe6b58f. A PR will be raised if it seems to work.

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