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

0

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.

asked 3 years ago347 views
4 Answers
0

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?

answered 3 years ago
0

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.

answered 3 years ago
0

Hi @REDACTEDUSER

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

V534740657

answered 3 years ago
0

Hi @REDACTEDUSER

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

GLIFT-16322

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions