Flexmatch validation doesn't fail if you miss a closing bracket on a rule

Hi,

After an unfortunately long time trying to debug why my rules were not working on Flexmatch, I discovered that Rule validation doesn’t spot if you mistype a measurement.

I.e. if you mistype “measurements”: [“flatten(teams[*].players.attributes[gameMode])”] as “measurements”: [“flatten(teams[*].players.attributes[gameMode]”] (note the missing closing bracket) then the rule will silently fail despite validation saying it’s fine.

1 Like

Hello, i took a look at our code base and did a testing, showing the API does validation on brackets. If you want us to take a look at your case, can you provide the full rule set of yours?

Hey, unfortunately that’s confidential, however this is a broader issue than I initially reported.

{
    "name": "example-ruleset",
    "playerAttributes": [
        {
            "name": "character",
            "type": "string"
        }
    ],
    "ruleLanguageVersion": "1.0",
    "algorithm": {
        "backfillPriority": "high",
        "strategy": "exhaustiveSearch",
        "expansionAgeSelection": "newest"
    },
    "teams": [
        {
            "name": "characters",
            "maxPlayers": 10,
            "minPlayers": 5
        }
    ],
    "rules": [
        {
            "name": "SameCharacters",
            "type": "comparison",
            "operation": "=",
            "measurements": [
                "this is not a valid rule"
            ]
        }
    ],
    "expansions": [
        {
            "target": "teams[characters].minPlayers",
            "steps": [
                {
                    "waitTimeSeconds": 5,
                    "value": 5
                },
                {
                    "waitTimeSeconds": 10,
                    "value": 1
                }
            ]
        }
    ]
}

You can feed any measurement you like into the “measurements” array. This is not validated.

Hi @Hannah_Dawson

Thanks for reporting this issue and providing the example, I have cut a ticket for the GameLift team to investigate.

V534740657

Hi @Hannah_Dawson

Thanks for your inquiry! We’re tracking this fix as part of a back log item for more granular rule set validation.

GLIFT-16322