From dd6761b208f5ac2d2937208edb5248defab96398 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Wed, 7 May 2025 07:53:36 +0200 Subject: [PATCH] feat: heap memory size for all satellite (no specific version) --- src/constants/deploy.constants.ts | 1 - src/services/deploy.services.ts | 25 +++---------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/src/constants/deploy.constants.ts b/src/constants/deploy.constants.ts index 7244a390..46103557 100644 --- a/src/constants/deploy.constants.ts +++ b/src/constants/deploy.constants.ts @@ -1,4 +1,3 @@ -export const MEMORY_SIZE_ENDPOINT_VERSION = '0.0.14'; export const MEMORY_HEAP_WARNING = 900_000_000n; // Observed empirical value, the threshold might be higher, but at the time I wrote this, pagination there were a bit more than 700 files deployed on the Juno website without any issues. diff --git a/src/services/deploy.services.ts b/src/services/deploy.services.ts index b1d8e84e..a407bc6d 100644 --- a/src/services/deploy.services.ts +++ b/src/services/deploy.services.ts @@ -1,18 +1,12 @@ -import {satelliteMemorySize, satelliteVersion} from '@junobuild/admin'; +import {satelliteMemorySize} from '@junobuild/admin'; import type {Asset} from '@junobuild/core'; import {listAssets as listAssetsLib} from '@junobuild/core'; -import {yellow} from 'kleur'; -import {compare} from 'semver'; import {readJunoConfig} from '../configs/juno.config'; import {DAPP_COLLECTION} from '../constants/constants'; -import { - DEPLOY_LIST_ASSETS_PAGINATION, - MEMORY_HEAP_WARNING, - MEMORY_SIZE_ENDPOINT_VERSION -} from '../constants/deploy.constants'; +import {DEPLOY_LIST_ASSETS_PAGINATION, MEMORY_HEAP_WARNING} from '../constants/deploy.constants'; import type {SatelliteConfigEnv} from '../types/config'; import {configEnv} from '../utils/config.utils'; -import {NEW_CMD_LINE, confirmAndExit} from '../utils/prompt.utils'; +import {confirmAndExit} from '../utils/prompt.utils'; import {satelliteParameters} from '../utils/satellite.utils'; export const assertSatelliteMemorySize = async (args?: string[]) => { @@ -27,19 +21,6 @@ export const assertSatelliteMemorySize = async (args?: string[]) => { const satellite = await satelliteParameters({satellite: satelliteConfig, env}); - const currentVersion = await satelliteVersion({ - satellite - }); - - if (compare(currentVersion, MEMORY_SIZE_ENDPOINT_VERSION) < 0) { - console.log( - `Your satellite (${yellow( - `v${currentVersion}` - )}) is not up-to-date, and the memory size cannot be verified.${NEW_CMD_LINE}` - ); - return; - } - const maxMemorySize = assertions?.heapMemory !== undefined && typeof assertions.heapMemory !== 'boolean' ? BigInt(assertions.heapMemory)