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

Remove historic whitespace from strings/text in Contacts data #372

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

WorkSutton
Copy link

@WorkSutton WorkSutton commented Dec 16, 2020

Trello 86 - whitespace removal - CONTACTS

Simplified version.

Will close PR 366

Tested with same data as previous PR

All data and names here are entirely fictitious and are not in any way related to real people. On the odd chance they were, these were made up out of the authors imagination!

Valid Test Data

  task valid_data: :environment do
      ActiveRecord::Base.connection.execute(
      "
      UPDATE contacts SET first_name = 'Macy',     middle_names = 'Lana',                 surname = '  Bergstrom   '                WHERE id = 98;
      UPDATE contacts SET first_name = 'Danielo  ',     middle_names = 'Gerlach',              surname = ' Nikolaus '                    WHERE id = 99;

      UPDATE contacts SET first_name = 'Laurel',         middle_names = 'Windler',              surname = 'Brekke'              WHERE id = 100;
      UPDATE contacts SET first_name = 'Noah',           middle_names = 'Kris',                 surname = 'Kuvalis    '         WHERE id = 101;
      UPDATE contacts SET first_name = '    Demetrius ', middle_names = 'Ryan',                 surname = '          Barrows  ' WHERE id = 102;
      UPDATE contacts SET first_name = '    Shirley ',   middle_names = 'Cassin',               surname = '     Ward    '       WHERE id = 103;
      UPDATE contacts SET first_name = '    Rickie ',    middle_names = 'Vandervort',           surname = 'Lind    '            WHERE id = 104;
      UPDATE contacts SET first_name = ' Mckinley   ',   middle_names = 'Pfannerstill',         surname = ' Pagac'              WHERE id = 105;
      UPDATE contacts SET first_name = ' Kathlene   ',   middle_names = 'Zieme',                surname = '     Johnston'       WHERE id = 106;
      UPDATE contacts SET first_name = ' Refugio   ',    middle_names = 'Bergstrom',            surname = '  Casper           ' WHERE id = 107;
      UPDATE contacts SET first_name = '  Keren    ',    middle_names = 'Heaney',               surname = '   Greenholt '       WHERE id = 108;
      UPDATE contacts SET first_name = '   Carley    ',  middle_names = 'Muller',               surname = '   Effertz  '        WHERE id = 109;
      UPDATE contacts SET first_name = '  Arlyne',       middle_names = 'Swaniawski',           surname = '  Wolf  '            WHERE id = 110;
      UPDATE contacts SET first_name = '   Elna ',       middle_names = 'Bernier',              surname = 'Cassin '             WHERE id = 111;
      UPDATE contacts SET first_name = '   Barney  ',    middle_names = 'Berge',                surname = '  Shanahan'          WHERE id = 112;
      UPDATE contacts SET first_name = '   Stan   ',     middle_names = 'Baumbach',             surname = '  Terry   '          WHERE id = 113;
      UPDATE contacts SET first_name = '  Missy    ',    middle_names = 'Cronin',               surname = ' Olson '             WHERE id = 114;
      UPDATE contacts SET first_name = ' Timmy',         middle_names = 'Becker',               surname = '   Hackett'          WHERE id = 115;
      UPDATE contacts SET first_name = ' Jeneva',        middle_names = 'Wuckert',              surname = '  OConnell'          WHERE id = 116;
      UPDATE contacts SET first_name = '   Johnnie',     middle_names = 'Ankunding',            surname = ' Macejkovic   '      WHERE id = 117;
      UPDATE contacts SET first_name = '    Julius',     middle_names = 'Bauch',                surname = 'Jakubowski  '        WHERE id = 118;
      UPDATE contacts SET first_name = 'Marketta  ',     middle_names = 'Harris',               surname = 'Dach        '        WHERE id = 119;
      UPDATE contacts SET first_name = 'Arnulfo  ',      middle_names = 'Breitenberg',          surname = 'Littel '             WHERE id = 120;
      UPDATE contacts SET first_name = 'Leigha ',        middle_names = 'Legros',               surname = '    Rohan'           WHERE id = 121;
      UPDATE contacts SET first_name = ' Jarred ',       middle_names = 'Cormier',              surname = '    Mraz   '         WHERE id = 122;
      UPDATE contacts SET first_name = 'Laurence  ',     middle_names = 'Schmeler',             surname = 'Herman '             WHERE id = 123;
      UPDATE contacts SET first_name = 'Katy   ',        middle_names = 'Turcotte',             surname = ' Buckridge'          WHERE id = 124;
      UPDATE contacts SET first_name = 'Donovan   ',     middle_names = 'Metz',                 surname = '  Schiller'          WHERE id = 125;
      UPDATE contacts SET first_name = 'Trinity    ',    middle_names = 'Schmeler',             surname = '  Abbott   '         WHERE id = 126;
      UPDATE contacts SET first_name = '   Kelli',       middle_names = 'Block',                surname = 'Ondricka   '         WHERE id = 127;
      UPDATE contacts SET first_name = '  Olivia',       middle_names = 'Wilkinson',            surname = 'Schaden  '           WHERE id = 128;
      UPDATE contacts SET first_name = ' Claudia ',      middle_names = 'Schuster',             surname = 'Crist   '            WHERE id = 129;
      UPDATE contacts SET first_name = 'Tiffanie  ',     middle_names = 'Metz',                 surname = 'Macejkovic'          WHERE id = 130;
      UPDATE contacts SET first_name = '  Guy ',         middle_names = 'Jaskolski',            surname = '    Leannon'         WHERE id = 131;
      UPDATE contacts SET first_name = '    Irving    ', middle_names = 'Klein',                surname = '  Brown     '        WHERE id = 132;
      UPDATE contacts SET first_name = 'Seth',           middle_names = 'Walter',               surname = 'Daugherty   '        WHERE id = 133;
      UPDATE contacts SET first_name = '    Danilo',     middle_names = 'Gerlach',              surname = ' Nikolaus '          WHERE id = 134;
      "
      ) # 35 records
    end

Invalid Test Data

  task invalid_data: :environment do
    ActiveRecord::Base.connection.execute(
    "
    UPDATE contacts SET first_name = 'Sarah    ',     middle_names = 'Lana',                 surname = '  Bergstrom   '                WHERE id = 98;
    UPDATE contacts SET first_name = 'Davide ',     middle_names = 'Gerlach',              surname = ' Nikolaus '                    WHERE id = 99;

    UPDATE contacts SET first_name = 'Laurel',         middle_names = 'Windler',              surname = 'Brekke'              WHERE id = 100;
    UPDATE contacts SET first_name = 'Noah',           middle_names = 'Kris',                 surname = 'Kuvalis    '         WHERE id = 101;
    UPDATE contacts SET first_name = '    Demetrius ', middle_names = 'Ryan',                 surname = '          Barrows  ' WHERE id = 102;
    UPDATE contacts SET first_name = '    Shirley ',   middle_names = 'Cassin',               surname = '     Ward    '       WHERE id = 103;
    UPDATE contacts SET first_name = '    Rickie ',    middle_names = 'Vandervort',           surname = 'Lind    '            WHERE id = 104;
    UPDATE contacts SET first_name = ' Mckinley   ',   middle_names = 'Pfannerstill',         surname = ' Pagac'              WHERE id = 105;
    UPDATE contacts SET first_name = ' Kathlene   ',   middle_names = 'Zieme',                surname = '     Johnston'       WHERE id = 106;
    UPDATE contacts SET first_name = ' Refugio   ',    middle_names = 'Bergstrom',            surname = '  Casper           ' WHERE id = 107;
    UPDATE contacts SET first_name = '  Keren    ',    middle_names = 'Heaney',               surname = '   Greenholt '       WHERE id = 108;
    UPDATE contacts SET first_name = '   Carley    ',  middle_names = 'Muller',               surname = '   Effertz  '        WHERE id = 109;
    UPDATE contacts SET first_name = '  Arlyne',       middle_names = 'Swaniawski',           surname = '  Wolf  '            WHERE id = 110;
    UPDATE contacts SET first_name = '   Elna ',       middle_names = 'Bernier',              surname = 'Cassin '             WHERE id = 111;
    UPDATE contacts SET first_name = '   Barney  ',    middle_names = 'Berge',                surname = '  Shanahan'          WHERE id = 112;
    UPDATE contacts SET first_name = '   Stan   ',     middle_names = 'Baumbach',             surname = '  Terry   '          WHERE id = 113;
    UPDATE contacts SET first_name = '  Missy    ',    middle_names = 'Cronin',               surname = ' Olson '             WHERE id = 114;
    UPDATE contacts SET first_name = ' Timmy',         middle_names = 'Becker',               surname = '   Hackett'          WHERE id = 115;
    UPDATE contacts SET first_name = ' Jeneva',        middle_names = 'Wuckert',              surname = '  OConnell'          WHERE id = 116;
    UPDATE contacts SET first_name = '   Johnnie',     middle_names = 'Ankunding',            surname = ' Macejkovic   '      WHERE id = 117;
    UPDATE contacts SET first_name = '    Julius',     middle_names = 'Bauch',                surname = 'Jakubowski  '        WHERE id = 118;
    UPDATE contacts SET first_name = 'Marketta  ',     middle_names = 'Harris',               surname = 'Dach        '        WHERE id = 119;
    UPDATE contacts SET first_name = 'Arnulfo  ',      middle_names = 'Breitenberg',          surname = 'Littel '             WHERE id = 120;
    UPDATE contacts SET first_name = 'Leigha ',        middle_names = 'Legros',               surname = '    Rohan'           WHERE id = 121;
    UPDATE contacts SET first_name = ' ',       middle_names = 'Cormier',              surname = '    Mraz   '         WHERE id = 122;
    UPDATE contacts SET first_name = 'Laurence  ',     middle_names = 'Schmeler',             surname = 'Herman '             WHERE id = 123;
    UPDATE contacts SET first_name = '',        middle_names = 'Turcotte',             surname = ' Buckridge'          WHERE id = 124;
    UPDATE contacts SET first_name = 'Donovan   ',     middle_names = 'Metz',                 surname = '  Schiller'          WHERE id = 125;
    UPDATE contacts SET first_name = 'Trinity    ',    middle_names = 'Schmeler',             surname = '  Abbott   '         WHERE id = 126;
    UPDATE contacts SET first_name = '   Kelli',       middle_names = 'Block',                surname = 'Ondricka   '         WHERE id = 127;
    UPDATE contacts SET first_name = '  Olivia',       middle_names = 'Wilkinson',            surname = 'Schaden  '           WHERE id = 128;
    UPDATE contacts SET first_name = ' Claudia ',      middle_names = 'Schuster',             surname = 'Crist   '            WHERE id = 129;
    UPDATE contacts SET first_name = 'Tiffanie  ',     middle_names = 'Metz',                 surname = 'Macejkovic'          WHERE id = 130;
    UPDATE contacts SET first_name = '  Guy ',         middle_names = 'Jaskolski',            surname = '    Leannon'         WHERE id = 131;
    UPDATE contacts SET first_name = '    Irving    ', middle_names = 'Klein',                surname = '  Brown     '        WHERE id = 132;
    UPDATE contacts SET first_name = 'Seth',           middle_names = 'Walter',               surname = 'Daugherty   '        WHERE id = 133;
    UPDATE contacts SET first_name = '    Danilo',     middle_names = 'Gerlach',              surname = ' Nikolaus '          WHERE id = 134;
    "
    ) # 35 records
  end

Output - local testing

  1. Check timestamps and run the temporary data setup rake task (removed in published code)
beacon$ docker-compose exec app bash
root@ade7bbfe0efd:/app# date
Wed Dec 16 22:54:49 UTC 2020
root@ade7bbfe0efd:/app# bundle exec rake strip_whitespace:backup_setup_data
root@ade7bbfe0efd:/app# exit
exit
  1. List the contacts altered by the data setup task (note timestamps - rails updated_at)
beacon$ docker-compose exec app bin/rails c
Running via Spring preloader in process 1564
Loading development environment (Rails 6.0.2.2)
[1] pry(main)> Time.now.utc
=> 2020-12-16 22:55:14 UTC
[2] pry(main)> Time.now
=> 2020-12-16 22:55:18 +0000
[3] pry(main)> Contact.where(id: 98..134).map{|c| [c.id, c.updated_at, c.first_name, c.middle_names, c.surname]}
  Contact Load (0.7ms)  SELECT "contacts".* FROM "contacts" WHERE "contacts"."id" BETWEEN $1 AND $2  [["id", 98], ["id", 134]]
=> [[98, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "", "Lana", "  Bergstrom   "],
 [99, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "", "Gerlach", " Nikolaus "],
 [100, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Laurel", "Windler", "Brekke"],
 [101, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Noah", "Kris", "Kuvalis    "],
 [102, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "    Demetrius ", "Ryan", "          Barrows  "],
 [103, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "    Shirley ", "Cassin", "     Ward    "],
 [104, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "    Rickie ", "Vandervort", "Lind    "],
 [105, Wed, 16 Dec 2020 21:57:01 UTC +00:00, " Mckinley   ", "Pfannerstill", " Pagac"],
 [106, Wed, 16 Dec 2020 21:57:01 UTC +00:00, " Kathlene   ", "Zieme", "     Johnston"],
 [107, Wed, 16 Dec 2020 21:57:01 UTC +00:00, " Refugio   ", "Bergstrom", "  Casper           "],
 [108, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "  Keren    ", "Heaney", "   Greenholt "],
 [109, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "   Carley    ", "Muller", "   Effertz  "],
 [110, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "  Arlyne", "Swaniawski", "  Wolf  "],
 [111, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "   Elna ", "Bernier", "Cassin "],
 [112, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "   Barney  ", "Berge", "  Shanahan"],
 [113, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "   Stan   ", "Baumbach", "  Terry   "],
 [114, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "  Missy    ", "Cronin", " Olson "],
 [115, Wed, 16 Dec 2020 21:57:01 UTC +00:00, " Timmy", "Becker", "   Hackett"],
 [116, Wed, 16 Dec 2020 21:57:01 UTC +00:00, " Jeneva", "Wuckert", "  OConnell"],
 [117, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "   Johnnie", "Ankunding", " Macejkovic   "],
 [118, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "    Julius", "Bauch", "Jakubowski  "],
 [119, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Marketta  ", "Harris", "Dach        "],
 [120, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Arnulfo  ", "Breitenberg", "Littel "],
 [121, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Leigha ", "Legros", "    Rohan"],
 [122, Wed, 16 Dec 2020 21:57:01 UTC +00:00, " Jarred ", "Cormier", "    Mraz   "],
 [123, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Laurence  ", "Schmeler", "Herman "],
 [124, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Katy   ", "Turcotte", " Buckridge"],
 [125, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Donovan   ", "Metz", "  Schiller"],
 [126, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Trinity    ", "Schmeler", "  Abbott   "],
 [127, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "   Kelli", "Block", "Ondricka   "],
 [128, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "  Olivia", "Wilkinson", "Schaden  "],
 [129, Wed, 16 Dec 2020 21:57:01 UTC +00:00, " Claudia ", "Schuster", "Crist   "],
 [130, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Tiffanie  ", "Metz", "Macejkovic"],
 [131, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "  Guy ", "Jaskolski", "    Leannon"],
 [132, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "    Irving    ", "Klein", "  Brown     "],
 [133, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Seth", "Walter", "Daugherty   "],
 [134, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "    Danilo", "Gerlach", " Nikolaus "]]
[4] pry(main)> exit
  1. Run cleanup task - in batches of 50
beacon$ docker-compose exec app bash
root@ade7bbfe0efd:/app# date
Wed Dec 16 22:55:37 UTC 2020
root@ade7bbfe0efd:/app# bundle exec rake strip_whitespace:data_cleanup
root@ade7bbfe0efd:/app# date
Wed Dec 16 22:55:56 UTC 2020
root@ade7bbfe0efd:/app# exit
exit

Output - WITH errors
Rake-task-output-with-errors

Output - ZERO errors
Rake-task-output-zero-errors

  1. Check timestamps and output of task (confirms timestamps for updated_at do NOT change)
beacon$ docker-compose exec app bin/rails c
Running via Spring preloader in process 1714
Loading development environment (Rails 6.0.2.2)
[1] pry(main)> Time.now
=> 2020-12-16 22:56:09 +0000
[2] pry(main)> Contact.where(id: 98..134).map{|c| [c.id, c.updated_at, c.first_name, c.middle_names, c.surname]}
  Contact Load (0.6ms)  SELECT "contacts".* FROM "contacts" WHERE "contacts"."id" BETWEEN $1 AND $2  [["id", 98], ["id", 134]]
=> [[98, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "", "Lana", "  Bergstrom   "],
 [99, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "", "Gerlach", " Nikolaus "],
 [100, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Laurel", "Windler", "Brekke"],
 [101, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Noah", "Kris", "Kuvalis"],
 [102, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Demetrius", "Ryan", "Barrows"],
 [103, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Shirley", "Cassin", "Ward"],
 [104, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Rickie", "Vandervort", "Lind"],
 [105, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Mckinley", "Pfannerstill", "Pagac"],
 [106, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Kathlene", "Zieme", "Johnston"],
 [107, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Refugio", "Bergstrom", "Casper"],
 [108, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Keren", "Heaney", "Greenholt"],
 [109, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Carley", "Muller", "Effertz"],
 [110, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Arlyne", "Swaniawski", "Wolf"],
 [111, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Elna", "Bernier", "Cassin"],
 [112, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Barney", "Berge", "Shanahan"],
 [113, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Stan", "Baumbach", "Terry"],
 [114, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Missy", "Cronin", "Olson"],
 [115, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Timmy", "Becker", "Hackett"],
 [116, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Jeneva", "Wuckert", "OConnell"],
 [117, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Johnnie", "Ankunding", "Macejkovic"],
 [118, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Julius", "Bauch", "Jakubowski"],
 [119, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Marketta", "Harris", "Dach"],
 [120, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Arnulfo", "Breitenberg", "Littel"],
 [121, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Leigha", "Legros", "Rohan"],
 [122, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Jarred", "Cormier", "Mraz"],
 [123, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Laurence", "Schmeler", "Herman"],
 [124, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Katy", "Turcotte", "Buckridge"],
 [125, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Donovan", "Metz", "Schiller"],
 [126, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Trinity", "Schmeler", "Abbott"],
 [127, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Kelli", "Block", "Ondricka"],
 [128, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Olivia", "Wilkinson", "Schaden"],
 [129, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Claudia", "Schuster", "Crist"],
 [130, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Tiffanie", "Metz", "Macejkovic"],
 [131, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Guy", "Jaskolski", "Leannon"],
 [132, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Irving", "Klein", "Brown"],
 [133, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Seth", "Walter", "Daugherty"],
 [134, Wed, 16 Dec 2020 21:57:01 UTC +00:00, "Danilo", "Gerlach", "Nikolaus"]]
[3] pry(main)> exit

@futuregov futuregov temporarily deployed to fg-beacon-pi-rake-task--cchq4k December 16, 2020 23:03 Inactive
BATCH_SIZE = 1000
# Process in batches set by the batch size 1000 is default.
Contact.find_in_batches(batch_size: BATCH_SIZE) do |contact|
puts contact.size
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we have 5 100 records we will have:
1000
1000
1000
1000
100

We can just have some ids output like:
12,13,14,15....
to show the progress

Copy link
Author

Choose a reason for hiding this comment

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

There was a progress meter in the previous one. I just made this super simple. Maybe too simple. @go8soft what about failures? There should be none, but how do you propose to display those?

This was why in the closed PR I wrote a sql statement to execute so we knew that only records that needed updating are targeted. It should in theory be a small subset of the total number of records (hopefully)

Copy link
Collaborator

@go8soft go8soft Dec 18, 2020

Choose a reason for hiding this comment

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

about failures a good point, thanks! Can we do save! instead of save?

Copy link
Author

Choose a reason for hiding this comment

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

@go8soft Actioned as requested

Copy link
Collaborator

@go8soft go8soft left a comment

Choose a reason for hiding this comment

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

LGTM 👍 minor output log comment, but not mandatory
@userman123 please double check we have backup before exec on prod

@WorkSutton
Copy link
Author

@go8soft Good call on the backup prior to execution. I should have put that in the PR description at the top.

Copy link
Collaborator

@go8soft go8soft left a comment

Choose a reason for hiding this comment

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

Please log the id before save and use save! instead of save. Thanks!

@WorkSutton WorkSutton force-pushed the rake-task-simple-whitespace-stripper-on-existing-data branch from 6faa4f7 to 4f88e28 Compare December 23, 2020 06:55
@WorkSutton WorkSutton force-pushed the rake-task-simple-whitespace-stripper-on-existing-data branch 2 times, most recently from ebfe0aa to c54aa1e Compare December 23, 2020 07:26
@userman123
Copy link
Contributor

Happy with this - I want to test it locally and on staging before I merge in though - given it's not going to cause any conflicts, there is no rush to merge in. Will set aside some time in the new year.

@WorkSutton WorkSutton force-pushed the rake-task-simple-whitespace-stripper-on-existing-data branch 2 times, most recently from 8078af3 to e7fe187 Compare January 12, 2021 10:05
@WorkSutton WorkSutton force-pushed the rake-task-simple-whitespace-stripper-on-existing-data branch from e7fe187 to ccd153b Compare January 12, 2021 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants