[obs-commits] [openSUSE/open-build-service] 86201d: [webui][api] Fix ChangeRepositoriesRemoteProjectNa...
Branch: refs/heads/2.9 Home: https://github.com/openSUSE/open-build-service Commit: 86201d6a3c78e468faa9bf9b95e84dec70983508 https://github.com/openSUSE/open-build-service/commit/86201d6a3c78e468faa9bf... Author: Christian Bruckmayer <cbruckmayer@suse.com> Date: 2018-04-05 (Thu, 05 Apr 2018) Changed paths: A src/api/db/data/20170306084550_remove_duplicate_repositories.rb M src/api/db/migrate/20170306084558_change_repositories_remote_project_name_to_not_null.rb A src/api/spec/db/data/remove_duplicate_repositories_spec.rb Log Message: ----------- [webui][api] Fix ChangeRepositoriesRemoteProjectNameToNotNull migration The migration ChangeRepositoriesRemoteProjectNameToNotNull changes the default of remote_project_name to '' instead of NULL. This was necessary in order to make the combination of remote_project_name, db_project_id and name unique because MySQL does not consider rows with same column content but one NULL value as equal. The migration back then was removing duplicates, however, it also migrated repositories which are associated with remote projects. These repositories do not need to get migrated as they're anyway unique (there can not be a NULL value for these repositories). This commit splits this migration in a schema and a data migration and introduces specs for the data migration. The data migration gets changed to NOT migrate repositories of a remote project. If there is duplicate repository found, we simply destroy it as the data is already inconsistent and it is not possible to do a full migration. Fix #4761. Commit: 79170451071a1ceff7b4e525b27a4f6309522071 https://github.com/openSUSE/open-build-service/commit/79170451071a1ceff7b4e5... Author: Christian Bruckmayer <cbruckmayer@suse.com> Date: 2018-04-05 (Thu, 05 Apr 2018) Changed paths: M src/api/spec/support/database_cleaner.rb Log Message: ----------- [ci] Use truncation strategy for migration tests this is necessary when Mysql DDE statements (create/drop/truncate table) are used because these are not supported by transaction strategy otherwise it will raise an 'ActiveRecord::StatementInvalid: Mysql2::Error: SAVEPOINT active_record_1 does not exist: ROLLBACK TO SAVEPOINT active_record_1' exception. https://stackoverflow.com/questions/13161394/activerecord-error-savepoint-ac... Commit: 2867be8af6dc0f8a5e0a8ba3bdebc6bfc0d4570e https://github.com/openSUSE/open-build-service/commit/2867be8af6dc0f8a5e0a8b... Author: Christian Bruckmayer <cbruckmayer@suse.com> Date: 2018-04-05 (Thu, 05 Apr 2018) Changed paths: M src/api/db/data/20170306084550_remove_duplicate_repositories.rb Log Message: ----------- [webui][ci] Remove not necessary return statement Commit: 929b1a3043768f53605e28b41777d3a8cb07949c https://github.com/openSUSE/open-build-service/commit/929b1a3043768f53605e28... Author: Christian Bruckmayer <cbruckmayer@suse.com> Date: 2018-04-05 (Thu, 05 Apr 2018) Changed paths: M src/api/spec/db/data/remove_duplicate_repositories_spec.rb Log Message: ----------- [ci] Make comment more verbose Commit: 62440d0e3f78134cef127beeaed0c6db49ede2c7 https://github.com/openSUSE/open-build-service/commit/62440d0e3f78134cef127b... Author: Adrian Schröter <adrian@suse.de> Date: 2018-04-05 (Thu, 05 Apr 2018) Changed paths: M src/api/app/jobs/consistency_check_job.rb Log Message: ----------- [frontend] fix consistency check a project meta call with a package string will just crash Commit: 04b1ba1b10c88479de2cf1d45a2a8bc62f231f9a https://github.com/openSUSE/open-build-service/commit/04b1ba1b10c88479de2cf1... Author: Adrian Schröter <adrian@suse.de> Date: 2018-04-05 (Thu, 05 Apr 2018) Changed paths: M src/api/app/mailers/admin_mailer.rb Log Message: ----------- [frontend] don't crash with obs_url = nil ActionDispatch::Http::URL.url_for() will fail then Commit: 565efa17d9e6ceade5e49b0cbd42b55926a739b9 https://github.com/openSUSE/open-build-service/commit/565efa17d9e6ceade5e49b... Author: Christian Bruckmayer <cbruckmayer@suse.com> Date: 2018-04-05 (Thu, 05 Apr 2018) Changed paths: M ReleaseNotes-2.9.2 Log Message: ----------- [dist] Add ReleaseNotes for 2.9.2 Commit: 8b220bba1da6b1972c1e6a402132af0827f44a70 https://github.com/openSUSE/open-build-service/commit/8b220bba1da6b1972c1e6a... Author: Christian Bruckmayer <cbruckmayer@suse.com> Date: 2018-04-05 (Thu, 05 Apr 2018) Changed paths: M ReleaseNotes-2.9.2 M src/api/app/jobs/consistency_check_job.rb M src/api/app/mailers/admin_mailer.rb A src/api/db/data/20170306084550_remove_duplicate_repositories.rb M src/api/db/migrate/20170306084558_change_repositories_remote_project_name_to_not_null.rb A src/api/spec/db/data/remove_duplicate_repositories_spec.rb M src/api/spec/support/database_cleaner.rb Log Message: ----------- Merge pull request #4807 from ChrisBr/29/fix-dup-repos Fix duplicate repositories migration for 2.9 Compare: https://github.com/openSUSE/open-build-service/compare/fb809a55246b...8b220b...
participants (1)
-
Christian Bruckmayer