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

Debugging deployOldUpgradableVersions.js #1281

Open
kronosapiens opened this issue Jul 30, 2024 · 2 comments
Open

Debugging deployOldUpgradableVersions.js #1281

kronosapiens opened this issue Jul 30, 2024 · 2 comments

Comments

@kronosapiens
Copy link
Member

kronosapiens commented Jul 30, 2024

After cloning a fresh network repo, the pesky build errors surrounding deployOldUpgradableVersions have re-appeared. I'm creating an issue here to keep better track of things, as I expect this file will periodically break over time.

@kronosapiens
Copy link
Member Author

kronosapiens commented Jul 30, 2024

Issue:

Network version glwss4 doesnt exist, attempting to generate
Cloning the network...
OperationalError: Command failed: cd colonyNetwork-glwss4 && npm install [email protected]

npm error Error: Cannot find module 'node-bin-darwin-arm64/package.json'

It seems that for M1/M2 MacBook Pros, only node 16+ can be installed through npm (see StackOverflow issue). Am currently investigating alternatives ways of installing node@14.

Solution:

Moving to nvm seems to work, but requires re-sourcing on every call to exec:

const nodeVersion = fs.readFileSync(`colonyNetwork-${versionTag}/.nvmrc`).toString().trim();
const cmdBase = `cd colonyNetwork-${versionTag} && source $HOME/.nvm/nvm.sh && nvm use ${nodeVersion}`;

Addressed in #1282

@kronosapiens kronosapiens changed the title Improving deployOldUpgradableVersions.js Debugging deployOldUpgradableVersions.js Jul 30, 2024
@kronosapiens
Copy link
Member Author

kronosapiens commented Aug 28, 2024

New issue -- I'm trying to add a new function for IMWSS:

module.exports.deployColonyVersionIMWSS = (colonyNetwork) => {
  return module.exports.deployOldColonyVersion(
    "Colony",
    "IMetaColony",
    [
      // eslint-disable-next-line max-len
      "Colony,ColonyDomains,ColonyExpenditure,ColonyFunding,ColonyRewards,ColonyRoles,ContractRecovery,ColonyArbitraryTransaction",
    ],
    "imwss",
    colonyNetwork,
  );
};

It runs up until deployViaHardhat and then hangs indefinitely. This is the command being executed:

Deploying upgradable version via hardhat...
cd colonyNetwork-imwss && . $HOME/.nvm/nvm.sh && nvm install 16 && nvm use 16 && INTERFACE_NAME=IMetaColony IMPLEMENTATION_NAMES=Colony,ColonyDomains,ColonyExpenditure,ColonyFunding,ColonyRewards,ColonyRoles,ContractRecovery,ColonyArbitraryTransaction npx hardhat run ./scripts/setupOldUpgradeableVersionHardhat.js --network development

It seems like it's hanging on const res = await implementations[idx].new(); which suggests that perhaps the artifacts are not being made globally available correctly. I'm not sure why that would all of a sudden become an issue in setupOldUpgradeableVersionHardhat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant