Skip to content
Snippets Groups Projects

Add a safe migration mode to the wiki migrator.

Merged gitlab-qa-bot requested to merge github/fork/DanKnox/add_safe_wiki_migration into 5-0-stable

Created by: DanKnox

The safe migrate mode can be invoked by setting the safe_migrate environment variable to 'true' on the command line when running the task.

RAILS_ENV=production rake gitlab:wiki:migrate safe_migrate=true

This branch was created off of the 5-0-stable branch. I am targeting that branch in this pull request as well.

This should fix issue #3312 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: bigeagle

    I still meet the same problem with this patch,

    # sudo -u git -H RAILS_ENV=production rake gitlab:wiki:migrate safe_migrate=true --trace
    
    ** Invoke gitlab:wiki:migrate (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    ** Execute gitlab:wiki:migrate
    
    Migrating Wiki for 'server/wsnrouter'
      Creating page 'GPRS 协议规范'...
    rake aborted!
    incompatible character encodings: UTF-8 and ASCII-8BIT
    /home/git/gitlab/vendor/bundle/ruby/1.9.1/bundler/gems/grit-c40a32432616/lib/grit/index.rb:176:in `%'
    /home/git/gitlab/vendor/bundle/ruby/1.9.1/bundler/gems/grit-c40a32432616/lib/grit/index.rb:176:in `block in write_tree'
    /home/git/gitlab/vendor/bundle/ruby/1.9.1/bundler/gems/grit-c40a32432616/lib/grit/index.rb:171:in `each'
    /home/git/gitlab/vendor/bundle/ruby/1.9.1/bundler/gems/grit-c40a32432616/lib/grit/index.rb:171:in `write_tree'
    /home/git/gitlab/vendor/bundle/ruby/1.9.1/bundler/gems/grit-c40a32432616/lib/grit/index.rb:123:in `commit'
    /home/git/gitlab/vendor/bundle/ruby/1.9.1/bundler/gems/gollum-5dcd3c8c8f68/lib/gollum/committer.rb:163:in `commit'
    /home/git/gitlab/vendor/bundle/ruby/1.9.1/bundler/gems/gollum-5dcd3c8c8f68/lib/gollum/wiki.rb:327:in `write_page'
    /home/git/gitlab/app/models/gollum_wiki.rb:74:in `create_page'
    /home/git/gitlab/app/models/wiki_page.rb:168:in `save'
    /home/git/gitlab/app/models/wiki_page.rb:127:in `create'
    /home/git/gitlab/lib/wiki_to_gollum_migrator.rb:71:in `create_page_and_revisions'
    /home/git/gitlab/lib/wiki_to_gollum_migrator.rb:52:in `block in create_pages'
    /home/git/gitlab/lib/wiki_to_gollum_migrator.rb:51:in `each'
    /home/git/gitlab/lib/wiki_to_gollum_migrator.rb:51:in `create_pages'
    /home/git/gitlab/lib/wiki_to_gollum_migrator.rb:19:in `block in migrate!'
    /home/git/gitlab/lib/wiki_to_gollum_migrator.rb:16:in `each'
    /home/git/gitlab/lib/wiki_to_gollum_migrator.rb:16:in `migrate!'
    /home/git/gitlab/lib/tasks/gitlab/migrate_wiki.rake:23:in `block (3 levels) in <top (required)>'
    

    By Administrator on 2013-04-25T08:35:44 (imported from GitLab project)

    By Administrator on 2013-04-25T08:35:44 (imported from GitLab)

  • Created by: bigeagle

    After executing RAILS_ENV=production rake gitlab:wiki:rollback and re-exec safe_migration, everything works.

    Thanks for the patch!

    By Administrator on 2013-04-25T08:38:40 (imported from GitLab project)

    By Administrator on 2013-04-25T08:38:40 (imported from GitLab)

  • Created by: dzaporozhets

    thank you!

    By Administrator on 2013-04-26T09:05:27 (imported from GitLab project)

    By Administrator on 2013-04-26T09:05:27 (imported from GitLab)

Please register or sign in to reply
Loading