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

Improve address name migration task output #3982

Merged

Conversation

kennyadsl
Copy link
Member

@kennyadsl kennyadsl commented Mar 9, 2021

Description

It now has a similar output to the other task provided to upgrade to v2.11, and improves some messages.

Before

> bin/rails solidus:upgrade:two_point_eleven
Migrating default billing addresses to address book ... Success
Your DB contains 6 addresses that may be affected by this task.
do you want to proceed? [Y, N] Y
Data migration will happen in batches. The default value is 100_000, which should take less than 20 seconds on mysql or postgresql.
Please enter a different batch size, or press return to confirm the default
We're going to migrate 6 records in batches of 100000
do you want to proceed? [Y, N] Y
Updating 6 records in batches of 100000, this may take a while...
batch took 0 seconds
Your Solidus install is ready for Solidus 2.11

After

> bin/rails solidus:upgrade:two_point_eleven
Migrating default billing addresses to address book ... Success
Combining addresses' firstname and lastname into name ...
  Your DB contains 6 addresses that may be affected by this task.
  Data migration will happen in batches. The default value is 100_000, which should take less than 20 seconds on mysql or postgresql.
  Please enter a different batch size, or press return to confirm the default:  1
  We're going to migrate 6 records in 6 batches of 1.
  Do you want to proceed? [Y, N] Y
  Updating 6 records in batches of 1, this may take a while...
  Batch 1/6 done in 0 seconds.
  Batch 2/6 done in 0 seconds.
  Batch 3/6 done in 0 seconds.
  Batch 4/6 done in 0 seconds.
  Batch 5/6 done in 0 seconds.
  Batch 6/6 done in 0 seconds.
Your Solidus install is ready for Solidus 2.11

This PR is also removing the output produced by the task when running specs. We won't see deprecation warnings this way but I think we are covered since we have behavior = :raise when tests are run in the CI.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

@kennyadsl kennyadsl added changelog:solidus_core Changes to the solidus_core gem Needs Backport labels Mar 9, 2021
@kennyadsl kennyadsl added this to the 2.11 milestone Mar 9, 2021
@kennyadsl kennyadsl self-assigned this Mar 9, 2021
@kennyadsl kennyadsl force-pushed the kennyadsl/uniform-update-task-output branch from 573f803 to 6be86f3 Compare March 9, 2021 14:27
Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kennyadsl thanks!

Copy link
Member

@aldesantis aldesantis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kennyadsl I left a couple of comments about possible improvements, but they're both non-blocking so I'm approving anyway!

core/lib/tasks/migrations/migrate_address_names.rake Outdated Show resolved Hide resolved
core/lib/tasks/migrations/migrate_address_names.rake Outdated Show resolved Hide resolved

Verified

This commit was signed with the committer’s verified signature.
kennyadsl Alberto Vena
It has a similar output to the other task provieded to upgrade
to v2.11, and improve some messages.
@kennyadsl kennyadsl force-pushed the kennyadsl/uniform-update-task-output branch from 6be86f3 to a4d278c Compare March 10, 2021 07:54
@kennyadsl kennyadsl merged commit 5368e8a into solidusio:master Mar 10, 2021
@kennyadsl kennyadsl deleted the kennyadsl/uniform-update-task-output branch March 10, 2021 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_core Changes to the solidus_core gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants