mulesoft / mule-migration-assistant

Migration Framework
BSD 3-Clause "New" or "Revised" License
26 stars 35 forks source link

Missing "dryRun" or "cancelOnError" option for Testmigrations #493

Closed holiday-sunrise closed 3 years ago

holiday-sunrise commented 3 years ago

Currently, the MMA does not abort the migration when an error occurs. This is not useful in an environment with about 300 API's and an automated migration (Migrate, create new API instance, create a migration branch, deployment on a test stage).

With an option "dryRun" you could perform a test migration so that the MMA does not abort. Also an option "cancelOnError" is conceivable. Without one of these options the MMA is not usable in a DEVOPS process and makes too much rework.

Option 1. (Default true)

-dryRun true -muleVersion 4.3.0 -projectBasePath /Users/rdrexler/git/csd/s4b2c/s4b2c-finance-sapi -destinationProjectBasePath /Users/rdrexler/git/csd/s4b2c/s4b2c-finance-sapi-mule4

Option 2 (Default false)

-cancelOnError true  -muleVersion 4.3.0 -projectBasePath /Users/rdrexler/git/csd/s4b2c/s4b2c-finance-sapi -destinationProjectBasePath /Users/rdrexler/git/csd/s4b2c/s4b2c-finance-sapi-mule4
afelisatti commented 3 years ago

Hi, @holiday-sunrise. Thanks for the suggestion; it makes total sense. We will review it and see how easy it would be to implement. Cheers!

holiday-sunrise commented 3 years ago

We have implemented it already. Shall we share it. Which option did you like.

Without the "dryRun" the MMA works as without the Option. with "dryRun" false the MMA fails if a Task throws an error.

afelisatti commented 3 years ago

Wow, @holiday-sunrise, thanks! I liked cancelOnError better given the current behavior because I'd expect a dryRun option to be false by default instead of true. What do you think?

holiday-sunrise commented 3 years ago

We are also welcome to take the option "cancelOnError". I will change the PR if desired. See https://github.com/mulesoft/mule-migration-assistant/pull/501

afelisatti commented 3 years ago

Yes, I just reviewed it and requested the change. Everything else looks good. Thanks!

afelisatti commented 3 years ago

Thanks for your contribution, @holiday-sunrise!