Skip to content

Commit 867670a

Browse files
committed
Revert bisect script
1 parent 19ce13b commit 867670a

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

mx.graalpython/mx_graalpython_bisect.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,18 +266,26 @@ def _bisect_benchmark(argv, bisect_id, email_to):
266266
primary_suite = mx.primary_suite()
267267

268268
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
269271
suite = get_suite('graalpython')
270272
ce_suite = get_suite('/vm')
271273
ce_rev = ce_suite.vc.tip(ce_suite.vc_dir).strip()
272274
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)
276285
mx.run_mx(['sforceimports'], suite=ee_suite)
277286
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
281289
ce_suite.vc.update_to_branch(ce_suite.vc_dir, ce_rev)
282290
mx.run_mx(['checkout-downstream', 'vm', 'vm-enterprise', '--no-fetch'], suite=ee_suite)
283291

0 commit comments

Comments
 (0)