fix: update go app package

improved deployment retry logic
new packaging image
This commit is contained in:
Noor 2025-03-26 19:38:04 +05:30
parent 87928d370a
commit 66a6425f37
Signed by: noormohammedb
GPG Key ID: D83EFB8B3B967146
3 changed files with 6 additions and 5 deletions

@ -85,9 +85,10 @@ pub static PACKAGES_INDEX: LazyLock<PublicIndex> = LazyLock::new(|| {
}, },
PackageElement{ PackageElement{
package_name: "go-app-info".to_string(), package_name: "go-app-info".to_string(),
package_url: "https://registry.detee.ltd/sgx/packages/go-gin-app-info_package_2025-03-25_20-56-59.tar.gz".to_string(), package_url: "https://registry.detee.ltd/sgx/packages/go-gin-app-info_01_package_2025-03-26_11-30-45.tar.gz".to_string(),
launch_config_url: "https://registry.detee.ltd/sgx/launch_configs/go-gin-app-info-launch-config_001.yaml".to_string(), launch_config_url: "https://registry.detee.ltd/sgx/launch_configs/go-gin-app-info-launch-config_001.yaml".to_string(),
mr_enclave: [143, 123, 73, 159, 244, 124, 30, 184, 135, 251, 9, 255, 137, 93, 92, 186, 46, 43, 155, 182, 241, 81, 112, 252, 148, 156, 193, 24, 180, 107, 201, 154] mr_enclave: [239, 153, 28, 180, 45, 214, 226, 253, 140, 243, 34, 120, 146, 198, 75, 43, 205, 229, 33, 160, 62, 22, 244, 123, 213, 37, 186, 93, 177, 8, 129, 170],
} }
], ],
} }

@ -18,7 +18,7 @@ pub fn package_enclave(
format!( format!(
r#"docker run --rm -it -v ./:/app/ \ r#"docker run --rm -it -v ./:/app/ \
-v {signing_key_path}:/keys/app_signing_key.pem:ro \ -v {signing_key_path}:/keys/app_signing_key.pem:ro \
noormohammedb/enclave_packager_01:pub_v2 {package_items}"# noormohammedb/enclave_packager_01:pub_v3 {package_items}"#
) )
} else { } else {
format!( format!(

@ -128,8 +128,8 @@ pub async fn deploy_new_app_and_update_config(
if new_app_res.error.is_empty() { if new_app_res.error.is_empty() {
if let Some(launch_config) = launch_config { if let Some(launch_config) = launch_config {
println!("Deploying..."); println!("Deploying...");
tokio::time::sleep(tokio::time::Duration::from_millis(3100)).await; tokio::time::sleep(tokio::time::Duration::from_millis(2500)).await;
Retry::spawn(FixedInterval::from_millis(500).take(5), || { Retry::spawn(FixedInterval::from_millis(1000).take(10), || {
log::debug!("retrying attestation and launch config update"); log::debug!("retrying attestation and launch config update");
attest_and_send_config(launch_config.clone(), &new_app_res.uuid) attest_and_send_config(launch_config.clone(), &new_app_res.uuid)
}) })