feat: support multiple build task types in pipeline label selector - #182
Closed
robnester-rh wants to merge 6 commits into
Closed
feat: support multiple build task types in pipeline label selector#182robnester-rh wants to merge 6 commits into
robnester-rh wants to merge 6 commits into
Conversation
Rename pipeline_label_selector to pipeline_label_selectors returning a set of build types. Add _merged_required_task_list helper that resolves time-based entries independently per build type, then unions the task lists with max(effective_on). Fixes: EC-1763
Covers multi-type selector, required task union, missing type in data (silently skipped), and all types missing. Part of EC-1763.
The refactored pipeline_label_selectors uses set comprehensions directly instead of sets.to_set(), making the import unnecessary. Part of EC-1763. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix inaccurate "unions" comment to "concatenates" - Restore inline FBC comment on not is_fbc guards - Add test for current_required_pipeline_tasks (most_current mode) - Add test for required_task_list multi-type concatenation - Add test for single-type backward compatibility - Add test for multiple time entries per type
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The merged task list should deduplicate tasks that appear in multiple build types (e.g. clair-scan required by both docker and tkn-bundle). Changed _merged_required_task_list to use a set comprehension for all_tasks instead of an array comprehension. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pipeline_label_selectortopipeline_label_selectors, returning a set of build type strings instead of a single string_merged_required_task_listhelper that resolves time-based entries independently per build type, unions the task sets, and usesmax(effective_on)across typesrequired_task_listfor backward compatibility with downstream boolean existence checkspipeline-required-tasksdataFixes EC-1763: The
pipeline_label_selectorfunction failed when a pipeline had multiple build tasks with differentbuild_typelabels (e.g.dockerandtkn-bundle), causing required task validation to be silently skipped.The
max(effective_on)across types is a known conservative approximation — EC-1798 tracks the follow-up to migrate to per-taskeffective_onresolution.Test plan
tasks.regoandrequired_tasks.rego)max(effective_on)required_task_listundefined (falls through to defaults)current_required_pipeline_taskswithmost_currentmode excludes future entriesrequired_task_listraw concatenation for boolean existence checkmake quiet-test opa-check fmt-checkall pass🤖 Generated with Claude Code