nomad-xyz/monorepo

feat: versioning for deploys

Opened this issue ยท 8 comments

Package

deploy, contracts-core, contracts-bridge, contracts-router

Describe the feature you would like

need to design how we will handle versioning between contracts-core, contracts-bridge, contracts-router, and deploy packages

As the contract code changes, the deploy script must sometimes also change (namely, if constructor / initialize / setup function interfaces change)

However, these packages are used in different places which each have different needs

Use cases:

  • production deploys: always want to deploy from tagged contract version
  • development + staging deploys: probably want to deploy from tagged contract version?
  • local environment testing: by default, want the local workspace version; may also want to be able to choose tagged versions too

We cannot just update the package.json of deploy package to choose which contracts to use, as we also need to use the right version of the deploy package itself

Additional context

Relevant: all comments / discussion on this PR: #312

from @prestwich #312 (comment)

ya, for any given commit, CI should guarantee that the version of deploy in that commit is compatible with its dependency. So when we tag a contract release, we need to bump the deploy script dependency version. If we always do that correctly, we should keep things in sync I guess? ๐Ÿค”

my response is.. hmmmm.. wdyt @Imti ๐Ÿ˜…

@prestwich logistically how would we check whether version of deploy is compatible with version of contracts-* deps? there may be multiple versions on each side that are compatible with each other

in other words, it's not a 1:1 mapping between deploy and contracts-* package versions - what's the suggested way to log compatibilities
(we may tag a new contracts release which doesn't change the deploy script; or we may update the deploy script without changing the contracts)

I'm saying that CI already will fail to build if deploy specifies a contracts-* version that deploy's code is type-system incompatible with

I'm saying that CI already will fail to build if deploy specifies a contracts-* version that deploy's code is type-system incompatible with

ah, yes. this is true.

but.. how do we deploy from past versions? i guess just check out that version in a branch.

but.. how do we deploy from past versions? i guess just check out that version in a branch.

yes

Imti commented

I agree with @prestwich, basically following the convention for npm packages releases. Let me know if you need help setting this up.

I think we have fixed this @anna-carroll ?