-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Provide better story for individual migration results #16016
Comments
This was previously not an issue because the CLI did not print any message stating that the migration was successful or not. Now with V9 of the CLI, it always prints e.g. most of the time migrations have edge cases which cannot be handled automatically. In those cases user action is required and it does not make sense to make the user think that the migration was successful/complete. |
If a migration can stop midway, it shouldn't print this indication though:
This is incorrect because many packages can be updated at the same time. In this example it is only correct to use The update procedure itself should indicate how to resume from an interrupted migration, and show the full command to resume all un-fully-migrated packages. |
I don't quite follow why that would be incorrect. The migration coming from Agreed that this is something the CLI could do, but at the time of writing this is not available and we achieved something similar by printing such a message. We did this in version 8 too. |
It's incorrect because the original command was So running |
Why would the migrations from If you are saying that the The way you are describing the issue is that followed migrations will be interrupted. This is not the goal and not the case currently. The goal is:
|
Ah I see. Yes I did think that the last migration interrupted the process and prevented the remaining ones from executing. So that does sound right. We should somehow indicate that some migrations need extra attention and might require action. |
The problem is that if you are handling an error gracefully, it means that the migration was successful. Because a migration fails when either a workflow event of type error or an exception were triggered. My 2 cents on the way forward here would be;
|
…eted". (angular#16016) We don't actually know for certain that the migration was successful, only that it finished. This updates the messaging to be more clear about this distinction.
…eted". (angular#16016) We don't actually know for certain that the migration was successful, only that it finished. This updates the messaging to be more clear about this distinction. I also removed the check mark and green coloring which implied success.
…eted". (angular#16016) We don't actually know for certain that the migration was successful, only that it finished. This updates the messaging to be more clear about this distinction. I also removed the check mark and green coloring which implied success.
…ngular#16016) We don't actually know for certain that the migration was successful, only that it finished. This updates the messaging to be more clear about this distinction. I also removed the check mark and green coloring which implied success.
…ngular#16016) We don't actually know for certain that the migration was successful, only that it finished. This updates the messaging to be more clear about this distinction. I also removed the check mark and green coloring which implied success.
Talked about this in the planning meeting today, decision for now is to simply rename "Migration succeeded." to "Migration completed." to be more clear that we don't necessarily know that it was successful. Sent out a PR to change this. Longer term, we'll have to look in to a broader redesign which allows some migrations to fail and more clearly communicate them to the user (something like Karma where some tests pass and other fail). |
…16016) We don't actually know for certain that the migration was successful, only that it finished. This updates the messaging to be more clear about this distinction. I also removed the check mark and green coloring which implied success.
Message change was merged to |
Yeah this looks as good a place to track it as any. |
@alan-agius4 I feel differently. An example is that a migration cannot handle all patterns automatically and requests the developer to manually take action. In those case the migration is not successful nor complete. This is actually quite common since migrations most of the time are limited by the possibilities of static analysis. I agree that we could rethink how errors are handled (e.g. not gracefully exiting), but in terms of this issue, it seems to unveil the general issue where the CLI makes an assumption. It's wrong to assume that a migration is complete or successful if it didn't throw. There should be an API to communicate back to the CLI what the status is (for purposes like printing how to rerun the migration). In any case though (except when an error is thrown), the CLI should not make any assumption IMO. |
A larger expansion and refactoring is planned and will include a structured migration system. However, at the current juncture the migrations will need to work within the current confines of the system. This unfortunately means that the migrations themselves will need to contain more boilerplate and infrastructure than should ideally be needed. But this will improve as update is updated. |
This issue impacts 9.0.0-rc.0 and happened while updating https://github.com/johannesjo/super-productivity and https://github.com/SAP/cloud-commerce-spartacus-storefront.
A failed update will show a message saying both the individual migration and the update failed:
The update below did not finish successfully however, and instead just shows the last migration as successful (@devversion confirms this). In this case the migration shows an error that it seems to suggest was actually recovered from, but it fact the intent is that the migration was interrupted and should later be resumed.
A completely successful migration will look the same as the migration above though:
We should confirm the update finished, was successful, or if it was interrupted midway and should later be continued.
The text was updated successfully, but these errors were encountered: