Branch: refs/heads/fix_flag_validation
Home: https://github.com/openSUSE/open-build-service
Commit: 6968bb16e9bc923517cd8b570aaca30cf7ff142f
https://github.com/openSUSE/open-build-service/commit/6968bb16e9bc923517cd8b...
Author: Stephan Kulow
Date: 2019-01-04 (Fri, 04 Jan 2019)
Changed paths:
M src/api/app/models/flag.rb
A src/api/db/data/20181214100207_remove_duplicated_flags.rb
Log Message:
-----------
Fix flag validation catching duplicates
This has been broken since the introduction as
where('repo = ?', repo) for nil values compares with NULL,
which never exists. On top of that this also checked if
status was duplicated, which means you could have an
enabled and disabled status for the same field, which doesn't
make much sense
We have a lot of duplicated flags by now, so we need
a data migration
Fixes #6615
Co-authored-by: Ana María Martínez Gómez
Commit: d2d5767c85355874deb533d345d29ae40df4d9f7
https://github.com/openSUSE/open-build-service/commit/d2d5767c85355874deb533...
Author: Stephan Kulow
Date: 2019-01-04 (Fri, 04 Jan 2019)
Changed paths:
M src/api/test/unit/build_flag_test.rb
M src/api/test/unit/debug_flag_test.rb
M src/api/test/unit/publish_flag_test.rb
Log Message:
-----------
Replace invalid unit test duplicating flags
The test duplicated flags without expecting it.
Commit: 4be2b39156c5b9bb7c707fe048ee056e56c91ba1
https://github.com/openSUSE/open-build-service/commit/4be2b39156c5b9bb7c707f...
Author: Stephan Kulow
Date: 2019-01-04 (Fri, 04 Jan 2019)
Changed paths:
M src/api/db/data/20181214100207_remove_duplicated_flags.rb
M src/api/db/data_schema.rb
Log Message:
-----------
Fix migration to really pluck
I put this in comments, but forgot to really do it
(to be squashed)
Compare: https://github.com/openSUSE/open-build-service/compare/6968bb16e9bc^...4be2b39156c5
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.