dojo: [SOZO] migrate plan/dry_run does nothing

when this is true sozo should perform a dry run of migration but currently its not being used.

https://github.com/dojoengine/dojo/blob/79278a62f66895cbe3bfaf822e3703309f8847b5/crates/sozo/src/commands/migrate.rs#L15-L17


#Edit

To tackle this issue, the idea is would be to introduce the dry-run flag in the ops related to migration here in sozo.

By having the dry-run passed as argument during the migration, sozo could output the operations, without actually doing them.

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Reactions: 2
  • Comments: 16 (1 by maintainers)

Most upvoted comments

can i take this

Hey @faytey for sure, do you have an idea how to start working on this? Don’t hesitate if you have questions.

@ameya-deshmukh thank you for your will to contribute. For the sake of order I’ll assign to @faytey, hopefully there’s a new issue you feel comfortable with.

Except if @faytey prefer to work on something else.

Appreciate your comprehension. 👍

@glihm wasn’t able to devote a lot of time to this unfortunately 😦 You can take it up! Will hopefully have many more opportunities to contribute to Dojo in the future 😄

Hey @glihm! Can you give me till this weekend to open a PR? Thanks!

No problem at all, and no pressure. 😃 Best of luck for the week and don’t hesitate is you have questions.

Hey @lambda-0x can I take this up?

@ameya-deshmukh you still available for this one?

Thank you @glihm i’d take it up, please i’d appreciate a clearer context thanks

Yup for sure. sozo is using dojo-world crate to get the migration strategy that contains everything that should be done: https://github.com/dojoengine/dojo/blob/64992c9ce2ca941ccdde91acea222725f13ed7f7/bin/sozo/src/ops/migration/mod.rs#L132

This strategy is the one being executed: https://github.com/dojoengine/dojo/blob/64992c9ce2ca941ccdde91acea222725f13ed7f7/bin/sozo/src/ops/migration/mod.rs#L136

In the dry mode sozo should output the strategy to be executed, without actually executing it.

So the task here would be you to implement a print function that pretty print the strategy that sozo would execute without the --dry-run option.

Sounds good to you?