@@ -266,18 +266,26 @@ def _bisect_benchmark(argv, bisect_id, email_to):
266
266
primary_suite = mx .primary_suite ()
267
267
268
268
def checkout_enterprise ():
269
+ # First try to get the revision we explicitly specify in ci-overlays. If that doesn't match with graal, then we
270
+ # fall back on mx checkout-downstream
269
271
suite = get_suite ('graalpython' )
270
272
ce_suite = get_suite ('/vm' )
271
273
ce_rev = ce_suite .vc .tip (ce_suite .vc_dir ).strip ()
272
274
ee_suite = get_suite ('/vm-enterprise' )
273
- # Move CE and EE to get the revisions we explicitly specify in graalpython
274
- mx .run_mx (['--dy' , '/graalpython-enterprise' , 'sforceimports' ], suite = suite )
275
- # Move CE to the revision EE imports
275
+ overlays = '../ci-overlays'
276
+ if not os .path .isdir (overlays ):
277
+ sys .exit ("Needs to have ci-overlays checkout" )
278
+ with open (os .path .join (get_suite ("graalpython" ).dir , "ci.jsonnet" )) as f :
279
+ overlay_rev = json .load (f )['overlay' ]
280
+ suite .vc .update_to_branch (overlays , overlay_rev )
281
+ constants_file = os .path .join (overlays , 'python/imported-constants.json' )
282
+ with open (constants_file ) as f :
283
+ ee_rev = json .load (f )['GRAAL_ENTERPRISE_REVISION' ]
284
+ ee_suite .vc .update_to_branch (ee_suite .vc_dir , ee_rev )
276
285
mx .run_mx (['sforceimports' ], suite = ee_suite )
277
286
if ce_suite .vc .tip (ce_suite .vc_dir ).strip () != ce_rev :
278
- # The enterprise rev we import into graalpython does not match what
279
- # EE's sforceimports now got us. Fall back to mx
280
- # checkout-downstream to find older compatible enterprise rev
287
+ # The enterprise rev specified in ci-overlays imports newer graal than graalpython does. Fall back to
288
+ # mx checkout-downstream to find older compatible enterprise rev
281
289
ce_suite .vc .update_to_branch (ce_suite .vc_dir , ce_rev )
282
290
mx .run_mx (['checkout-downstream' , 'vm' , 'vm-enterprise' , '--no-fetch' ], suite = ee_suite )
283
291
0 commit comments