Apply filtering even if only one package is present in service
@@ -225,36 +225,35 @@ def process_glob_string(
# if we have individually queued this specific package, it's obvious that we want to build it specifically
# in this case, do not honor the omission list
if len(collected_directories) == 1:
- return filter_for_compatibility(collected_directories)
+ pkg_set_ci_filtered = filter_for_compatibility(collected_directories)
# however, if there are multiple packages being built, we should honor the omission list and NOT build the omitted
# packages
else:
- allowed_package_set = remove_omitted_packages(collected_directories, filter_type)
+ allowed_package_set = remove_omitted_packages(collected_directories)
+ pkg_set_ci_filtered = filter_for_compatibility(allowed_package_set)
+
+ # Apply filter based on filter type. for e.g. Docs, Regression, Management
+ pkg_set_ci_filtered = list(filter(omit_funct_dict.get(filter_type, omit_build), pkg_set_ci_filtered))
logging.info(
- "Target packages after filtering by omission list: {}".format(
- allowed_package_set
+ "Target packages after filtering by CI: {}".format(
+ pkg_set_ci_filtered
)
)
-
- pkg_set_ci_filtered = filter_for_compatibility(allowed_package_set)
logging.info(
"Package(s) omitted by CI filter: {}".format(
- list(set(allowed_package_set) - set(pkg_set_ci_filtered))
+ list(set(collected_directories) - set(pkg_set_ci_filtered))
)
)
-
return sorted(pkg_set_ci_filtered)
-def remove_omitted_packages(collected_directories, filter_type="Build"):
-
+def remove_omitted_packages(collected_directories):
packages = [
package_dir
for package_dir in collected_directories
if os.path.basename(package_dir) not in OMITTED_CI_PACKAGES
]
- packages = list(filter(omit_funct_dict.get(filter_type, omit_build), packages))
return packages
