BackfillUserDetailsFields: users - error 15.4.6 => 15.9.0

I performed the upgrade from version 11.7.12 to 15.9.0 according to the plan

[Upgrade Path (Upgrade Path)

And after upgrading from version 15.4.6 to 15.9.0, an error occurred in the Background Migrations: [BackfillUserDetailsFields: users ]

2023-02-24T13:22:05.773Z: {:message=>"BatchedJob transition", :batched_job_id=>31, :previous_state=>:running, :new_state=>:failed, :batched_migration_id=>67, :job_class_name=>"BackfillUserDetailsFields", :job_arguments=>[], :exception_class=>ActiveRecord::StatementInvalid, :exception_message=>"PG::UndefinedColumn: ERROR:  column \"linkedin\" does not exist\nLINE 1: ...HERE \"users\".\"id\" BETWEEN 1 AND 12 AND ((COALESCE(linkedin, ...\n                                  

With each version, I made sure all tasks were completed and last time when i did test migration from 11.7.12 to 15.8.X there was no such problem.

1 Like

Also i found this in gitlab-rails-db-migrate LOG

main: == 20220802200719 AddUserDetailsProfileFields: migrating ======================
main: -- add_column(:user_details, :linkedin, :text, {:null=>false, :default=>""})
main:    -> 0.0037s
main: -- add_column(:user_details, :twitter, :text, {:null=>false, :default=>""})
main:    -> 0.0021s
main: -- add_column(:user_details, :skype, :text, {:null=>false, :default=>""})
main:    -> 0.0012s
main: -- add_column(:user_details, :website_url, :text, {:null=>false, :default=>""})
main:    -> 0.0011s
main: -- add_column(:user_details, :location, :text, {:null=>false, :default=>""})
main:    -> 0.0011s
main: -- add_column(:user_details, :organization, :text, {:null=>false, :default=>""})
main:    -> 0.0011s
main: == 20220802200719 AddUserDetailsProfileFields: migrated (0.0105s) =============

I have the same issue with the same upgrade (15.4.615.9.0)

adding a string to a user’s linkedin field and it persists. This leads me to believe that there must be a linkedin column, but perhaps it is linked_in or something like that…

Sounds like a bug/regression, mind opening a new issue? Thanks!

I found Move out user profile related data to a separate table (#206913) · Issues · / GitLab · GitLab which could be a related effort that causes this behavior.

issue created: