Skip to content

Commit a8425ad

Browse files
jacderidaclaude
andcommitted
chore: temporary changes for auto-upgrade testing
These changes will be removed after testing: - Reduce upgrade check interval from 72 hours to 30 minutes - Use specific release tag rc-2026.2.2.2 instead of latest - Download directly from S3 instead of autonomi.com URL Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2d1080a commit a8425ad

File tree

2 files changed

+20
-33
lines changed

2 files changed

+20
-33
lines changed

ant-node/src/bin/antnode/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,9 @@ You can check your reward balance by running:
463463
let ctrl_tx_restart = ctrl_tx.clone();
464464
let running_node_clone = running_node.clone();
465465
tokio::spawn(async move {
466-
// 72 hours (259200 seconds) with ±5% randomization to prevent simultaneous upgrades
467-
let base_delay = 259200;
468-
let variance = rand::thread_rng().gen_range(-12960..=12960);
466+
// 30 minutes (1800 seconds) with ±2 minutes randomization for upgrade testing
467+
let base_delay = 1800;
468+
let variance = rand::thread_rng().gen_range(-120..=120);
469469
let upgrade_check_delay_secs = (base_delay + variance) as u64;
470470
loop {
471471
let upgrade_check_wake_time =

ant-node/src/bin/antnode/upgrade/mod.rs

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -342,35 +342,20 @@ pub async fn download_and_extract_upgrade_binary(
342342
}
343343
});
344344

345-
// Try downloading from autonomi.com first, fall back to S3 if it fails
346-
let archive_path =
347-
match download_from_autonomi_url(&platform, &temp_download_dir_path, &callback).await {
348-
Ok(path) => {
349-
info!("Successfully downloaded from autonomi.com");
350-
path
351-
}
352-
Err(e) => {
353-
warn!(
354-
"Failed to download from autonomi.com: {}. Falling back to S3...",
355-
e
356-
);
357-
let version = Version::parse(&antnode_binary.version)?;
358-
let archive_type = ArchiveType::TarGz;
359-
release_repo
360-
.download_release_from_s3(
361-
&ReleaseType::AntNode,
362-
&version,
363-
&platform,
364-
&archive_type,
365-
&temp_download_dir_path,
366-
&callback,
367-
)
368-
.await
369-
.map_err(|e| {
370-
UpgradeError::DownloadFailed(format!("S3 fallback download failed: {e}"))
371-
})?
372-
}
373-
};
345+
// Download directly from S3 for upgrade testing
346+
let version = Version::parse(&antnode_binary.version)?;
347+
let archive_type = ArchiveType::TarGz;
348+
let archive_path = release_repo
349+
.download_release_from_s3(
350+
&ReleaseType::AntNode,
351+
&version,
352+
&platform,
353+
&archive_type,
354+
&temp_download_dir_path,
355+
&callback,
356+
)
357+
.await
358+
.map_err(|e| UpgradeError::DownloadFailed(format!("S3 download failed: {e}")))?;
374359
info!("Download complete. Extracting archive...");
375360

376361
let extracted_path =
@@ -504,7 +489,9 @@ pub async fn perform_upgrade() -> Result<()> {
504489
/// Fetch release info from API and cache it
505490
async fn fetch_and_cache_release_info() -> Result<AutonomiReleaseInfo> {
506491
let release_repo = <dyn AntReleaseRepoActions>::default_config();
507-
let release_info = release_repo.get_latest_autonomi_release_info().await?;
492+
let release_info = release_repo
493+
.get_autonomi_release_info("rc-2026.2.2.2")
494+
.await?;
508495

509496
if let Err(e) = release_cache::write_cached_release_info(&release_info, None) {
510497
warn!("Failed to cache release info: {}", e);

0 commit comments

Comments
 (0)