@@ -427,31 +427,6 @@ def config_join(*args):
427427 if kwds .get ("mulled_containers" , False ):
428428 properties ["mulled_channels" ] = kwds .get ("conda_ensure_channels" , "" )
429429
430- # Enable GxITs by default
431- gx_it_port = network_util .get_free_port ()
432- properties .update (
433- dict (
434- interactivetools_enable = "true" ,
435- galaxy_infrastructure_url = f"http://localhost:{ port } " ,
436- interactivetools_upstream_proxy = "false" ,
437- interactivetools_proxy_host = f"localhost:{ gx_it_port } " ,
438- )
439- )
440- gx_it_config = dict (
441- enable = "true" ,
442- port = gx_it_port ,
443- )
444- if kwds .get ("disable_gxits" , True ):
445- properties .update (
446- dict (
447- interactivetools_enable = "false" ,
448- )
449- )
450- gx_it_config .update (
451- dict (
452- enable = "false" ,
453- )
454- )
455430
456431 _handle_kwd_overrides (properties , kwds )
457432
@@ -475,7 +450,6 @@ def config_join(*args):
475450 write_galaxy_config (
476451 galaxy_root = galaxy_root ,
477452 properties = properties ,
478- gx_it_config = gx_it_config ,
479453 env = env ,
480454 kwds = kwds ,
481455 template_args = template_args ,
@@ -505,7 +479,7 @@ def config_join(*args):
505479 )
506480
507481
508- def write_galaxy_config (galaxy_root , properties , gx_it_config , env , kwds , template_args , config_join ):
482+ def write_galaxy_config (galaxy_root , properties , env , kwds , template_args , config_join ):
509483 if get_galaxy_major_version (galaxy_root ) < parse_version ("22.01" ):
510484 # Legacy .ini setup
511485 env ["GALAXY_CONFIG_FILE" ] = config_join ("galaxy.ini" )
@@ -516,6 +490,31 @@ def write_galaxy_config(galaxy_root, properties, gx_it_config, env, kwds, templa
516490 env ["GRAVITY_STATE_DIR" ] = config_join ("gravity" )
517491 with NamedTemporaryFile (suffix = ".sock" , delete = True ) as nt :
518492 env ["SUPERVISORD_SOCKET" ] = nt .name
493+ # Enable GxITs by default
494+ gx_it_port = network_util .get_free_port ()
495+ properties .update (
496+ dict (
497+ interactivetools_enable = "true" ,
498+ galaxy_infrastructure_url = f"http://localhost:{ template_args ['port' ]} " ,
499+ interactivetools_upstream_proxy = "false" ,
500+ interactivetools_proxy_host = f"localhost:{ gx_it_port } " ,
501+ )
502+ )
503+ gx_it_config = dict (
504+ enable = "true" ,
505+ port = gx_it_port ,
506+ )
507+ if kwds .get ("disable_gxits" , True ):
508+ properties .update (
509+ dict (
510+ interactivetools_enable = "false" ,
511+ )
512+ )
513+ gx_it_config .update (
514+ dict (
515+ enable = "false" ,
516+ )
517+ )
519518 config = {
520519 "galaxy" : properties ,
521520 "gravity" : {
0 commit comments