diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 0b8b5422da1..3c4d3902b6d 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/scripts", "displayName": "Scripts", - "version": "1.5.0", + "version": "1.5.1", "description": "A collection of terascope monorepo scripts", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/scripts#readme", "bugs": { diff --git a/packages/scripts/src/helpers/test-runner/services.ts b/packages/scripts/src/helpers/test-runner/services.ts index 99187959e0a..1558c5ac954 100644 --- a/packages/scripts/src/helpers/test-runner/services.ts +++ b/packages/scripts/src/helpers/test-runner/services.ts @@ -20,6 +20,7 @@ import { TestOptions } from './interfaces.js'; import { Service } from '../interfaces.js'; import * as config from '../config.js'; import signale from '../signale.js'; +import os from 'node:os'; const logger = debugLogger('ts-scripts:cmd:test'); @@ -625,8 +626,13 @@ async function checkElasticsearch(options: TestOptions, startTime: number): Prom const actual: string = body.version.number; const expected = config.ELASTICSEARCH_VERSION; - - if (semver.satisfies(actual, `^${expected}`)) { + if ( + semver.satisfies(actual, `^${expected}`) + // Or we may override semver match in this scenario + || (os.arch().includes('arm') + && expected.startsWith('6') && actual === '7.9.3' + && options.testPlatform.includes('kubernetes')) + ) { const took = toHumanTime(Date.now() - startTime); signale.success(`elasticsearch@${actual} is running at ${host}, took ${took}`); return true; @@ -837,6 +843,15 @@ async function startService(options: TestOptions, service: Service): Promise<() if (options.testPlatform === 'kubernetes' || options.testPlatform === 'kubernetesV2') { const kind = new Kind(config.K8S_VERSION, options.kindClusterName); + // Check for arm architecture and es6 combo, if so switch to es7 + if ( + service === 'elasticsearch' + && os.arch().includes('arm') + && version.startsWith('6') + ) { + signale.warn('Detected arm architecture with unsupported es6, switching to es7.9.3..'); + version = '7.9.3'; + } await kind.loadServiceImage( service, services[service].image,