git.delta.rocks / unique-network / refs/commits / 307e69b41531

difftreelog

skip worflow if already upgraded

Max Andreev2023-06-12parent: #058c022.patch.diff
in: master
- fix manual migration script: use dirname
- update envs

3 files changed

modified.envdiffbeforeafterboth
17KARURA_BUILD_BRANCH=release-karura-2.17.017KARURA_BUILD_BRANCH=release-karura-2.17.0
18MOONRIVER_BUILD_BRANCH=runtime-230218MOONRIVER_BUILD_BRANCH=runtime-2302
19SHIDEN_BUILD_BRANCH=v5.4.019SHIDEN_BUILD_BRANCH=v5.4.0
20QUARTZ_MAINNET_BRANCH=release-v94105520QUARTZ_MAINNET_BRANCH=release-v941056
21QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:44321QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443
2222
23UNIQUEWEST_MAINNET_BRANCH=release-v0.9.4223UNIQUEWEST_MAINNET_BRANCH=release-v0.9.42
24WESTMINT_BUILD_BRANCH=parachains-v942024WESTMINT_BUILD_BRANCH=parachains-v9420
25OPAL_MAINNET_BRANCH=release-v94105525OPAL_MAINNET_BRANCH=release-v942057
26OPAL_REPLICA_FROM=wss://ws-opal.unique.network:44326OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443
2727
28UNIQUEEAST_MAINNET_BRANCH=release-v0.9.4228UNIQUEEAST_MAINNET_BRANCH=release-v0.9.42
modifiedtests/src/migrations/942057-appPromotion/lockedToFreeze.tsdiffbeforeafterboth
1// import { usingApi, privateKey, onlySign } from "./../../load/lib";1// import { usingApi, privateKey, onlySign } from "./../../load/lib";
2import * as fs from 'fs';2import * as fs from 'fs';
3import {usingPlaygrounds} from '../../util';3import {usingPlaygrounds} from '../../util';
4import path from 'path';4import path, {dirname} from 'path';
5import {isInteger, parse} from 'lossless-json';5import {isInteger, parse} from 'lossless-json';
6import {fileURLToPath} from 'url';
67
78
8const WS_ENDPOINT = 'ws://localhost:9944';9const WS_ENDPOINT = 'ws://localhost:9944';
3233
33 // 3. Parse data to migrate34 // 3. Parse data to migrate
34 console.log('3. Parsing chainql results...');35 console.log('3. Parsing chainql results...');
36 const dirName = dirname(fileURLToPath(import.meta.url));
35 const parsingResult = parse(fs.readFileSync(path.resolve('src', 'migrations', '942057-appPromotion', 'output.json'), 'utf-8'), undefined, customNumberParser);37 const parsingResult = parse(fs.readFileSync(path.resolve(dirName, 'output.json'), 'utf-8'), undefined, customNumberParser);
3638
37 const chainqlImportData = parsingResult as {39 const chainqlImportData = parsingResult as {
38 address: string;40 address: string;
modifiedtests/src/util/frankenstein.tsdiffbeforeafterboth
105 }105 }
106}106}
107
108async function skipIfAlreadyUpgraded() {
109 await usingPlaygrounds(async (helper) => {
110 const specVersion = await getSpecVersion(helper.getApi());
111 if(`v${specVersion}` === DESTINATION_SPEC_VERSION) {
112 console.log('\n🛸 Current version equal DESTINATION_SPEC_VERSION 🛸');
113 console.log("\n🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸");
114 }
115 }, REPLICA_FROM);
116}
107117
108const raiseZombienet = async (): Promise<void> => {118const raiseZombienet = async (): Promise<void> => {
119 await skipIfAlreadyUpgraded();
109 const isUpgradeTesting = !!NEW_RELAY_BIN || !!NEW_RELAY_WASM || !!NEW_PARA_BIN || !!NEW_PARA_WASM;120 const isUpgradeTesting = !!NEW_RELAY_BIN || !!NEW_RELAY_WASM || !!NEW_PARA_BIN || !!NEW_PARA_WASM;
110 /*121 /*
111 // If there is nothing to upgrade, what is the point122 // If there is nothing to upgrade, what is the point