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

Feat: Adapt create data script for previous colony versions #2685

Merged

Conversation

iamsamgibbs
Copy link
Contributor

@iamsamgibbs iamsamgibbs commented Jul 10, 2024

Description

This PR adapts the create-data.js script to make it easier to generate colonies on the previous colony version.

Note: This will only actually work if you have deployed the previous colony version. Many thanks to @area for making this super easy.

Testing

  • Step 1 - Run npm run dev and npm run frontend as per usual
  • Step 2 - Before running the create-data script, run npm run hardhat to open the hardhat console.
  • Step 3 - Paste the following into the hardhat console:
deployHMWSS = require('./scripts/deployOldUpgradeableVersion.js').deployColonyVersionHMWSS
cn = await artifacts.require("IColonyNetwork").at("0x777760996135F0791E2e1a74aFAa060711197777")
await deployHMWSS(cn)

This will take some time to complete.

If you want to confirm both colony versions are available you can run the following commands in the hardhat console:
await cn.getColonyVersionResolver(14)
await cn.getColonyVersionResolver(15)

  • Step 4 - Once the colony version has finished deploying, run the create-data script with this new flag: node scripts/create-data.js --usePreviousColonyVersion
  • Step 5 - Once the script has finished running, open the app in your browser. The colonies should now be on the previous version and the upgrade banner should appear at the top of the window. Feel free to test upgrading a colony if you've never seen this before!

Diffs

New stuff

  • New --usePreviousColonyVersion flag for the create-data script

TODO

  • Put these testing steps somewhere useful like notion

@iamsamgibbs iamsamgibbs self-assigned this Jul 10, 2024
@iamsamgibbs iamsamgibbs marked this pull request as ready for review July 11, 2024 15:22
@iamsamgibbs iamsamgibbs requested review from a team as code owners July 11, 2024 15:22
@iamsamgibbs iamsamgibbs force-pushed the feat/adapt-create-data-script-for-previous-colony-versions branch from 92cd0cf to fd6b8ec Compare July 11, 2024 15:23
@mmioana mmioana self-requested a review July 12, 2024 08:17
Copy link
Contributor

@mmioana mmioana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You smashed this one @iamsamgibbs 🚀

After running the create-data script I could see the version upgrade banner
Screenshot 2024-07-12 at 11 00 22

Created an Version Upgrade action
Screenshot 2024-07-12 at 11 00 52

And after the action was completed, the banner was no longer showing up
Screenshot 2024-07-12 at 11 00 58

Copy link
Contributor

@bassgeta bassgeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me, nice going, this is gonna make our lives quite easier!
image
Uploading image.png…

Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, very nice. Tested both resolvers via hardhat, the script and the actual version that shows up in the CDapp, everything as expected.

Screenshot from 2024-07-15 23-54-10
Screenshot from 2024-07-15 23-55-57
Screenshot from 2024-07-15 23-55-11
Screenshot from 2024-07-15 23-56-06
Screenshot from 2024-07-16 00-00-21
Screenshot from 2024-07-16 00-00-37
Screenshot from 2024-07-16 00-00-55

Only thing I can nitpick about is that your style changes made it harder to determine what the actual change was, and what was merely a stylistic change.

Don't get me wrong I'm fine with all the changes, including styles, just had to find something to complain about :P

Lastly, the only thing that gives me pause, is people not remembering the block of code to deploy the old resolvers, in a few months. So we'll just need to remember to point them at this PR.

@iamsamgibbs iamsamgibbs merged commit 900cce0 into master Jul 16, 2024
4 of 6 checks passed
@iamsamgibbs iamsamgibbs deleted the feat/adapt-create-data-script-for-previous-colony-versions branch July 16, 2024 07:19
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

Successfully merging this pull request may close these issues.

5 participants