Repository navigation
fix(planner): resolve aggregate workers by component type (cherry-pick #11578) #12779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -210,6 +210,15 @@ def get_component_from_type_or_name( | |||||||||||||||||||||||||||||||||||||||||
| component_names = [name for name, _ in matching_components] | ||||||||||||||||||||||||||||||||||||||||||
| raise DuplicateSubComponentError(component_type.value, component_names) | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| if not matching_components and component_type == SubComponentType.DECODE: | ||||||||||||||||||||||||||||||||||||||||||
| generic_workers = [ | ||||||||||||||||||||||||||||||||||||||||||
| (name, component) | ||||||||||||||||||||||||||||||||||||||||||
| for name, component in components.items() | ||||||||||||||||||||||||||||||||||||||||||
| if get_component_type(component) == V1BETA1_GENERIC_WORKER_COMPONENT_TYPE | ||||||||||||||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||||||||||||||
| if len(generic_workers) == 1: | ||||||||||||||||||||||||||||||||||||||||||
| matching_components = generic_workers | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+213
to
+220
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Explicitly configured decode worker can be ignored in favour of a differently-named worker The lone generic worker is picked as the decode worker ( Precedence between type-based fallback and explicit component nameIn A safer ordering is to try the explicit name first and only use the sole-generic-worker fallback when no usable explicit name is given.
Suggested change
Was this helpful? React with 👍 or 👎 to provide feedback. |
||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| if not matching_components and component_name in components: | ||||||||||||||||||||||||||||||||||||||||||
| component = components[component_name] | ||||||||||||||||||||||||||||||||||||||||||
| if not _can_use_explicit_component_name(component, component_type): | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reviewed commit has no
Signed-off-by:trailer, so it violates the repository requirement to sign every commit withgit commit -sand will not satisfy DCO validation. Recreate this commit with the required sign-off before merging.AGENTS.md reference: AGENTS.md:L131-L138
Useful? React with 👍 / 👎.