@@ -59,9 +59,12 @@ def run(*args: str, cwd: Optional[str] = None) -> str:
5959 return p .stdout
6060
6161
62- def get_conf (conf : Dict [str , str ], name : str ) -> str :
62+ def get_conf (conf : Dict [str , str ], name : str , default : Optional [ str ] = None ) -> str :
6363 if name not in conf :
64- raise KeyError ('Missing configuration option "%s"' % name )
64+ if default is not None :
65+ return default
66+ else :
67+ raise KeyError ('Missing configuration option "%s"' % name )
6568 return conf [name ]
6669
6770
@@ -118,7 +121,7 @@ def run_branch_tests(conf: Dict[str, str], dir: Path, run_id: str, clone: bool =
118121 args .append ('--branch-name-override' )
119122 args .append (fake_branch_name )
120123 for opt in ['maintainer_email' , 'executors' , 'server_url' , 'key' , 'max_age' ,
121- 'custom_attributes' , 'minimal_uploads' ]:
124+ 'custom_attributes' ]:
122125 try :
123126 val = get_conf (conf , opt )
124127 args .append ('--' + opt .replace ('_' , '-' ))
@@ -128,6 +131,11 @@ def run_branch_tests(conf: Dict[str, str], dir: Path, run_id: str, clone: bool =
128131 # old test cycles from working, if their configs don't contain
129132 # the new options
130133 pass
134+
135+ val = get_conf (conf , 'minimal_uploads' , 'false' )
136+ if val == 'true' :
137+ args .append ('--minimal-uploads' )
138+
131139 cwd = (dir / 'code' ) if clone else Path ('.' )
132140 env = dict (os .environ )
133141 env ['PYTHONPATH' ] = str (Path ('.' ).resolve () / '.packages' ) \
0 commit comments