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

Extension Manager Upgrade Extensions #2416

Merged
merged 21 commits into from
Apr 17, 2021
Merged

Extension Manager Upgrade Extensions #2416

merged 21 commits into from
Apr 17, 2021

Conversation

rdig
Copy link
Member

@rdig rdig commented Mar 13, 2021

This PR adds in the ability for the Extension Manager to be able to upgrade currently installed extensions

In order to save time, this PR cherry-pick commits 0e3c3ff 54cd6d9 and 4acd0d2 from #2413

Changes

  • use the new version 4 of colonyJS
  • add ExtensionUpgrade subcomponent
  • add colonyExtensionUpgrade saga
  • add resolver to fetch the latest extension version from the network
  • refactor extension to display correct version

To test the extension version upgrade

(make sure to run npm i and `npm provision first)

ColonyNetwork:

  • After the stack was started
  • Checkout colonyNetwork to commit 840e378c (I used a separate repo, but I guess the one in src/lib/colonyNetwork works fine as well...)
  • yarn (to install packages)
  • run yarn run truffle exec ./scripts/deployOldExtensionVersions.js

Dapp:

  • inside src/modules/dashboard/sagas/extensions.ts, change line 96 from:
params: [getExtensionHash(extensionId), networkExtensionVersion],

to

params: [getExtensionHash(extensionId), 1],
  • install the "Voting Reputation" extension (either this or Coin Machine, they are the only ones that have version 2 available)
  • Enable it
  • Upgrade it
  • 🎉

Demo

Screenshot from 2021-03-13 21-20-28

Resolves DEV-257

@rdig rdig self-assigned this Mar 13, 2021
@linear
Copy link

linear bot commented Mar 13, 2021

DEV-257 Extensions Versions Upgrades

This issue will refactor both colonyJS and the Extensions Manager in order for them to support extensions contract upgrades.

On the colonyJS side, we need to introduce both a way to generate the new version abis and factories, as well as the logic to make the extension clients aware of versions.

On the Extension Manager side, we need some minor UI, resolvers and sagas in order to be able to upgrade the extension client to the new version.

@rdig rdig force-pushed the feature/extensions-update branch from d2880d9 to 850a75e Compare April 5, 2021 13:28
@rdig rdig requested a review from a team April 12, 2021 19:10
@rdig rdig marked this pull request as ready for review April 12, 2021 19:10
Copy link
Contributor

@alicjakujawa alicjakujawa left a comment

Choose a reason for hiding this comment

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

Looks and works well 🔥

Copy link
Contributor

@chinins chinins left a comment

Choose a reason for hiding this comment

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

It was tough to test but it's all working well and the code is good1

Copy link
Contributor

@ArmandoGraterol ArmandoGraterol left a comment

Choose a reason for hiding this comment

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

LGTM 👌

@rdig rdig merged commit e5ce24b into master Apr 17, 2021
@rdig rdig deleted the feature/extensions-update branch April 17, 2021 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants