fix: QP Qualities are now a Replace instead of Add

Qualities are very high-stakes: They are error prone to modify across
multiple configuration files. The user is not able to control ordering
that way. To reduce the chances of users shooting themselves in the
foot, we only allow 1 file to uniformly set qualities.
json-serializing-nullable-fields-issue
Robert Dailey 1 year ago
parent 63591edeb5
commit 987d599e1c

@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Print error information about HTTP 401 instead of "Unable to determine".
- Improved wording of remote service error messages.
### Changed
- `qualities` (inside `quality_profiles`) is now a "Replace" merge operation instead of "Add". This
means only one YAML file manages the full list of qualities. Either an include does it, or you
override the full list in your configuration file. There is no longer any combination.
## [5.4.1] - 2023-09-12
### Fixed

@ -80,7 +80,7 @@ public abstract class ServiceConfigMerger<T> where T : ServiceConfigYaml
.Distinct(StringComparer.InvariantCultureIgnoreCase)
.ToList()))
}),
Qualities = Combine(a.Qualities, b.Qualities, (a1, b1) => a1.Concat(b1).ToList())
Qualities = b.Qualities ?? a.Qualities
};
}
}

@ -498,12 +498,6 @@ public class ServiceConfigMergerTest
},
Qualities = new[]
{
new QualityProfileQualityConfigYaml
{
Enabled = true,
Name = "quality1",
Qualities = new[] {"quality"}
},
new QualityProfileQualityConfigYaml
{
Enabled = false,

Loading…
Cancel
Save