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

IDL checker script allowlist can't have same name for different parameters of nested fields

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Replication

      When we are dealing with the bson_serialization_type any in the IDL checker, we require users add the new field metadata to the allowlist so the script doesn't complain (users have to opt into allowing the any type). However, the way we do the allowlist is by creating strings with cmdName-param-fieldName. However, the issue is that the cmdName is the top level command name, whereas the field name can be nested deep within the command.

      This came up while taking a look at two new parameters for the QueryTypeConfig struct. These new parameters (called min and max) have bson_serialization_type any, so we need to add their data to the allowlist. The QueryTypeConfig is used in EncryptedField, which is used in EncryptedFieldConfig, which is finally used in the Create command.

      However, because we use the top level command name when creating the allowlist, the accepted string for the min or max fields are create-param-min and create-param-max, even though they are deeply nested. If we were to add min or max to any other nested struct within the create command, they would not be checked for their bson_serialization type, because the allowlist string would be the same.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            ali.mir@mongodb.com Ali Mir
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: