@@ -12,7 +12,7 @@ use avalanche_types::{
12
12
jsonrpc:: client:: info as json_client_info,
13
13
key, subnet, units, wallet,
14
14
} ;
15
- use aws_manager:: { self , s3, ssm, sts } ;
15
+ use aws_manager:: { self , s3, ssm} ;
16
16
use aws_sdk_ssm:: types:: CommandInvocationStatus ;
17
17
use clap:: { value_parser, Arg , Command } ;
18
18
use crossterm:: {
@@ -515,11 +515,12 @@ pub async fn execute(opts: Flags) -> io::Result<()> {
515
515
Some ( Duration :: from_secs ( opts. s3_upload_timeout ) ) ,
516
516
)
517
517
. await ;
518
- let sts_manager = sts:: Manager :: new ( & shared_config) ;
518
+ // let sts_manager = sts::Manager::new(&shared_config);
519
519
let s3_manager = s3:: Manager :: new ( & shared_config) ;
520
520
521
- let current_identity = sts_manager. get_identity ( ) . await . unwrap ( ) ;
522
- log:: info!( "current AWS identity: {:?}" , current_identity) ;
521
+ // TODO: This is now causing an error. It's optional so we can leave it is as is for now.
522
+ // let current_identity = sts_manager.get_identity().await.unwrap();
523
+ // log::info!("current AWS identity: {:?}", current_identity);
523
524
524
525
if !opts. skip_prompt {
525
526
println ! ( ) ;
@@ -814,6 +815,8 @@ pub async fn execute(opts: Flags) -> io::Result<()> {
814
815
. document_name ( ssm_doc. clone ( ) )
815
816
. set_instance_ids ( Some ( instance_ids. clone ( ) ) )
816
817
. parameters ( "avalanchedArgs" , vec ! [ avalanched_args. clone( ) ] )
818
+ // hack: send in dummy alias parameters in the no-op case
819
+ . parameters ( "aliasArgs" , vec ! [ "--version" . to_string( ) ] )
817
820
. output_s3_region ( opts. s3_region . clone ( ) )
818
821
. output_s3_bucket_name ( opts. s3_bucket . clone ( ) )
819
822
. output_s3_key_prefix ( format ! (
@@ -955,6 +958,12 @@ pub async fn execute(opts: Flags) -> io::Result<()> {
955
958
file_stem. to_str( ) . unwrap( )
956
959
) ;
957
960
961
+ let avalanched_alias_args = format ! (
962
+ "alias-chain --log-level info --chain_id {chain_id} --chain_alias {alias}" ,
963
+ chain_id = blockchain_id,
964
+ alias = opts. chain_name. clone( ) ,
965
+ ) ;
966
+
958
967
// If a Subnet's chain id is 2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt,
959
968
// the config file for this chain is located at {chain-config-dir}/2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt/config.json.
960
969
let avalanched_args = format ! ( "install-chain --log-level info --s3-region {region} --s3-bucket {s3_bucket} --chain-config-s3-key {chain_config_s3_key} --chain-config-local-path {chain_config_local_path}" ,
@@ -992,6 +1001,7 @@ pub async fn execute(opts: Flags) -> io::Result<()> {
992
1001
. document_name ( ssm_doc. clone ( ) )
993
1002
. set_instance_ids ( Some ( instance_ids. clone ( ) ) )
994
1003
. parameters ( "avalanchedArgs" , vec ! [ avalanched_args. clone( ) ] )
1004
+ . parameters ( "aliasArgs" , vec ! [ avalanched_alias_args. clone( ) ] )
995
1005
. output_s3_region ( opts. s3_region . clone ( ) )
996
1006
. output_s3_bucket_name ( opts. s3_bucket . clone ( ) )
997
1007
. output_s3_key_prefix ( format ! (
@@ -1034,7 +1044,8 @@ pub async fn execute(opts: Flags) -> io::Result<()> {
1034
1044
stdout( ) ,
1035
1045
SetForegroundColor ( Color :: Blue ) ,
1036
1046
Print ( format!(
1037
- "\n \n \n SUCCESS!\n subnet Id: {created_subnet_id}\n blockchain Id: {blockchain_id}\n \n "
1047
+ "\n \n \n SUCCESS!\n subnet Id: {created_subnet_id}\n blockchain Id: {blockchain_id}\n chain alias: {chain_name}\n \n " ,
1048
+ chain_name = opts. chain_name. clone( ) ,
1038
1049
) ) ,
1039
1050
ResetColor
1040
1051
) ?;
0 commit comments