Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: factory stops CI, final PR #1766

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
branches:
- staging
- trying
- kl-factory # adding this branch here to run CI on it regardless of the conflicts
- kl-factory-ci
- '!release-please--branches--**'

concurrency:
Expand Down
24 changes: 3 additions & 21 deletions infrastructure/zk/src/hyperchain_wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,12 @@ export interface BasePromptOptions {
skip?: ((state: object) => boolean | Promise<boolean>) | boolean;
}

// PLA:681
let isLocalhost = false;

// An init command that allows configuring and spinning up a new hyperchain network.
async function initHyperchain(envName: string, runObservability: boolean, validiumMode: boolean) {
await announced('Initializing hyperchain creation', setupConfiguration(envName, runObservability));
await init.initHyperCmdAction({ skipSetupCompletely: false, bumpChainId: true, runObservability, validiumMode });

// if we used matterlabs/geth network, we need custom ENV file for hyperchain compose parts
// This breaks `zk status prover` command, but neccessary for working in isolated docker-network
// TODO: Think about better implementation
// PLA:681
if (isLocalhost) {
env.modify(
'ETH_CLIENT_WEB3_URL',
'http://geth:8545',
`etc/env/l1-inits/${process.env.L1_ENV_NAME ? process.env.L1_ENV_NAME : '.init'}.env`
);
env.modify(
'DATABASE_URL',
'postgres://postgres:notsecurepassword@postgres:5432/zksync_local',
`etc/env/l1-inits/${process.env.L1_ENV_NAME ? process.env.L1_ENV_NAME : '.init'}.env`
);
}

// TODO: EVM:577 fix hyperchain wizard
env.mergeInitToEnv();

console.log(announce(`\nYour hyperchain configuration is available at ${process.env.ENV_FILE}\n`));
Expand Down Expand Up @@ -350,7 +331,7 @@ async function setHyperchainMetadata(runObservability: boolean) {

const environment = getEnv(results.chainName);

compileConfig(environment);
await compileConfig(environment);
env.set(environment);
// TODO: Generate url for data-compressor with selected region or fix env variable for keys location
// PLA-595
Expand Down Expand Up @@ -789,6 +770,7 @@ export const initHyperchainCommand = new Command('stack')

initHyperchainCommand
.command('init')
.option('--run-observability')
.option('--env-name <env-name>', 'chain name to use for initialization')
.description('Wizard for hyperchain creation/configuration')
.option('--validium-mode')
Expand Down
Loading