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

flow migrate issue with duplicate deployments #1471

Closed
jribbink opened this issue Mar 25, 2024 · 0 comments
Closed

flow migrate issue with duplicate deployments #1471

jribbink opened this issue Mar 25, 2024 · 0 comments
Assignees
Labels

Comments

@jribbink
Copy link
Contributor

Problem

An issue/question was recently encountered with the flow migrate state command. It is as follows: what should the behaviour be if the user has configured their flow.json with multiple deployments for the same contract? Currently, all of the migration commands (i.e. flow migrate stage-contract, flow migrate state) only make an assumption that a contract will only be deployed to one account: this is not true.

It is possible that contracts -> deployments is a one to many relationship & not one to one. In the current form, the first match is chosen & subsequent deployments entries will be skipped. However, this behaviour may not be desirable for some.

Steps to Reproduce

Make flow.json with a contract that appears twice in the deployments section, try using these commands.

Acceptance Criteria

There should be some mechanism in place to handle these conflicts. Some options are as follows:

  1. Apply these commands to every account with the contract's name in their deployments. Logically, this makes sense - if you have an updated version of the contract code, why wouldn't you simply want to update/stage the update for all accounts using this contract?
  2. Require more granular specification of accounts when they are ambiguous --> (i.e. require acct1:Contract syntax if many accounts with this deployment exist?)
  3. Any other ideas? :)

Context

https://discordapp.com/channels/613813861610684416/1123314820763111465/1220759822065078383

@jribbink jribbink moved this to Cadence 1.0 Triage in 🌊 Flow 4D Mar 25, 2024
@jribbink jribbink assigned jribbink and unassigned chasefleming Mar 28, 2024
@gregsantos gregsantos moved this from Cadence 1.0 Triage to 🔖 Ready for Pickup in 🌊 Flow 4D Mar 28, 2024
@gregsantos gregsantos moved this from 🔖 Ready for Pickup to ✅ Done in 🌊 Flow 4D Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants