[SERVER-60496] Resmoke Misinterprets Quotes In Evergreen.yml Created: 06/Oct/21  Updated: 29/Oct/23  Resolved: 05/Nov/21

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

Type: Bug Priority: Major - P3
Reporter: Luis Osta (Inactive) Assignee: David Bradford (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: DAG 2021-11-15
Participants:
Story Points: 2

 Description   

The evergreen.yml uses double quotes when defining CLI parameters. Such as here.

This can cause an issue where a paremeter isn't properly parsed causing, for instance, a test not being found which does exist. Such as in this patch



 Comments   
Comment by Githook User [ 05/Nov/21 ]

Author:

{'name': 'David Bradford', 'email': 'david.bradford@mongodb.com', 'username': 'dbradf'}

Message: SERVER-60496: Better handle spaces in test_flags

There are two fixes in the commit:

Comment by David Bradford (Inactive) [ 05/Nov/21 ]

This isn't due to a bug in burn_in_tags/test. The generated configuration is correct. It is properly escaping the characters that need to be escaped. The issue is when they get interpreted when evergreen kicks off the resmoke task.

I did noticed, burn_in_* is pulling in test configuration from the build-variant as well as the task. That isn't need and is triggering this problem (since the problematic argument is on the build-variant, not the task). Since the burn-in-test run on the build-variant, we don't need to pull the build variant config into the generated config. Right now, that config is getting sent to resmoke twice.

Also, there were pretty significant changes to these code paths in 4.4, so it looks like this is only a problem on 4.2.

Comment by Robert Guo (Inactive) [ 06/Oct/21 ]

Sending over to DAG for some insight. The generated config looks like this:

            "name": "burn_in:noPassthrough_0_enterprise-rhel-62-64-bit-store-fam-images-in-side-coll-required",
            "commands": [
                {
                    "func": "do setup"
                },
                {
                    "func": "run tests",
                    "vars": {
                        "resmoke_args": "--suites=no_passthrough --storageEngine=wiredTiger --mongodSetParameters=\"{storeFindAndModifyImagesInSideCollection: true}\" --excludeWithAnyTags=requires_mmapv1,requires_storing_fam_images_in_oplog  --repeatTestsSecs=600  --repeatTestsMin=2  --repeatTestsMax=1000  jstests/noPassthrough/server54064.js"
                    }
                }
            ],

The space after storeFindAndModifyImagesInSideCollection: got treated as positional arguments. This happened on burn_in_tags on v4.2.

Update: upon closer inspection, I think it's indeed a latent bug in burn_in_tags that was only recently unveiled when a variant that has a space in the test flags got added to burn_in_tags. No other tasks (burn_in_tags or otherwise) have args with spaces surrounded by double quotes on any branches.

I advised Luis to change the double quotes to single quotes, which should fix the immediate issue. Leaving this ticket open to see if there's an easy way to run burn_in_tags for new variants that get added to it.

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