@@ -920,6 +920,7 @@ def _append_event_log_conf(
920920 spark_opts ['spark.eventLog.enabled' ] = 'false'
921921 return spark_opts
922922
923+ spark_opts ['aws_account_id' ] = account_id
923924 for conf in self .spark_srv_conf .get ('environments' , {}).values ():
924925 if account_id == conf ['account_id' ]:
925926 spark_opts ['spark.eventLog.enabled' ] = 'true'
@@ -1262,6 +1263,27 @@ def get_spark_conf(
12621263 if aws_creds :
12631264 spark_conf = _append_aws_credentials_conf (spark_conf , * aws_creds , aws_region )
12641265
1266+ # gather all data needed by our internal Spark configuration service
1267+ scs_args = {
1268+ 'cluster_manager' : cluster_manager ,
1269+ 'spark_app_base_name' : spark_app_base_name ,
1270+ 'docker_image' : docker_img ,
1271+ 'user_spark_opts' : user_spark_opts ,
1272+ 'paasta_cluster' : paasta_cluster ,
1273+ 'paasta_pool' : paasta_pool ,
1274+ 'paasta_service' : paasta_service ,
1275+ 'paasta_instance' : paasta_instance ,
1276+ 'extra_volumes' : extra_volumes ,
1277+ 'force_spark_resource_configs' : force_spark_resource_configs ,
1278+ 'k8s_server_address' : k8s_server_address ,
1279+ 'jira_ticket' : jira_ticket ,
1280+ 'service_account_name' : service_account_name ,
1281+ 'ui_port' : int (ui_port ),
1282+ 'user' : os .environ .get ('USER' ),
1283+ 'aws_account_id' : spark_conf .pop ('aws_account_id' , None ),
1284+ }
1285+ spark_conf ['scs_conf' ] = json .dumps (scs_args , indent = 4 )
1286+
12651287 return spark_conf
12661288
12671289
0 commit comments