Skip to content

Fix modular downstream_component parsing for branch mapping - #784

Open
fila43 wants to merge 1 commit into
packit:mainfrom
fila43:fix-modular-component-parsing
Open

Fix modular downstream_component parsing for branch mapping#784
fila43 wants to merge 1 commit into
packit:mainfrom
fila43:fix-modular-component-parsing

Conversation

@fila43

@fila43 fila43 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The Jira Downstream Component Name field (customfield_10669) stores module:stream/package (e.g. postgresql:16/postgis) for modular issues, but is_modular() and parse_module_stream() expect just the package name.
  • Adds extract_downstream_package() utility to version_utils.py that normalizes the raw field value: "postgresql:16/postgis""postgis", plain names like "curl" pass through unchanged.
  • Applies the extraction in triage_agent.py where state.downstream_component is set, so determine_target_branch correctly produces stream-postgresql-16-rhel-9.8.0 instead of falling through to rhel-9.8.0.
  • Updates TriageState.downstream_component field description to document the normalization.

Without this fix, modular issues get the wrong target branch in triage results and Jira comments.

Test plan

  • test_extract_downstream_package — covers modular, non-modular, None, and empty inputs
  • test_is_modular_requires_package_not_full_modular_string — proves raw value fails, extracted value works
  • test_parse_module_stream_requires_package_not_full_modular_string — same for stream parsing
  • test_map_version_to_module_branch_extracts_package_from_raw_field — end-to-end proof

Made with Cursor

The Jira Downstream Component Name field (customfield_10669) stores the
full modular string "module:stream/package" (e.g. "postgresql:16/postgis")
for modular issues, but is_modular() and parse_module_stream() expect
just the package name. Extract the package part so modular issues get
the correct stream-specific branch (e.g. stream-postgresql-16-rhel-9.8.0)
instead of falling through to the non-modular rhel-9.8.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant