Skip to content

Commit

Permalink
[NCL-8087] Remove check for incompatible BCs
Browse files Browse the repository at this point in the history
  • Loading branch information
jomrazek committed Oct 31, 2023
1 parent 50dbd90 commit 27eda5a
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,7 @@ private Project generateProject(String projectName) {
}
}

private List<BuildConfiguration> dropConfigsFromInvalidVersion(
List<BuildConfiguration> currentConfigs,
List<BuildConfig> newConfigs) {
private void dropConfigsFromInvalidVersion(List<BuildConfiguration> currentConfigs, List<BuildConfig> newConfigs) {
Map<String, BuildConfig> newConfigsByName = BuildConfig.mapByName(newConfigs);

currentConfigs.stream().filter(config -> !newConfigsByName.containsKey(config.getName())).forEach(config -> {
Expand All @@ -501,17 +499,6 @@ private List<BuildConfiguration> dropConfigsFromInvalidVersion(
"Failed to remove build config " + config.getId() + " from build group " + buildGroup.getId());
}
});

List<BuildConfiguration> incompatibleConfigs = currentConfigs.stream()
.filter(config -> newConfigsByName.containsKey(config.getName()))
.collect(Collectors.toList());
if (!incompatibleConfigs.isEmpty()) {
throw new RuntimeException(
"The following configurations should be updated "
+ "in an unsupported fashion, please drop or update them via PNC UI: " + incompatibleConfigs
+ ". Look above for the cause");
}
return incompatibleConfigs;
}

private List<BuildConfiguration> getCurrentBuildConfigs() {
Expand Down

0 comments on commit 27eda5a

Please sign in to comment.