Skip to content

Conversation

@patrickmann
Copy link
Contributor

@patrickmann patrickmann commented Dec 18, 2025

/nocl

Description

See issue for context.

Motivation and Context

Resolves #24516

How Has This Been Tested?

Local testing

Note that no meta-data is generated for rules that are not included in any pipeline!

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have requested a documentation update.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@laura-b-g laura-b-g requested review from gally47 and ousmaneo January 15, 2026 16:10
@patrickmann patrickmann marked this pull request as ready for review January 15, 2026 16:35
@patrickmann patrickmann requested a review from a team January 15, 2026 16:35
@kodjo-anipah kodjo-anipah self-requested a review January 19, 2026 10:24
Copy link
Contributor

@gally47 gally47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it, Frontend LGTM.

Copy link
Member

@kodjo-anipah kodjo-anipah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments.
I know its not part of the scope in terms of rules but a pipeline can be connected to a stream and since we are displaying that on the stream routing page like that we need to get those connections from PipelineStreamConnectionsService
image
image


@JsonProperty(FIELD_ROUTING_RULES)
// Maps rule ID to IDs of routed stream
public abstract Map<String, Set<String>> routingRules();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should rename both variables so it's clear what they are. e.g. streamsByRuleId and routedStreamTitlesById

if (args.getPreComputedValue(RouteToStream.ID_ARG) != null) {
String streamId = args.getPreComputedValue(RouteToStream.ID_ARG).toString();
try {
Stream stream = streamService.load(streamId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use streamService.streamTitleFromCache()

schema = @Schema(allowableValues = {"asc", "desc"}))
@DefaultValue(DEFAULT_SORT_DIRECTION) @QueryParam("order") SortOrder order) {

// Pagination is primarily for UX purposes - OK to fetch all and then paginate in memory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should do that. Pagination should run on the backend and against MongoDB even if that means that we can offer limited search and filtering. Also pagination is not being used in the frontend?
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the FE should use pagination. And we want to use the standard paginated entity table, so the response needs to conform to that pattern.
The problem is that the table entities do not correspond to mongo documents. A single entry in the pipeline_processor_rules_meta collection may map to multiple table entries. This is handled in the buildResponse method and is not exactly trivial.
If we want to perform pagination via mongo, I think we would need to modify the pipeline_processor_rules_meta collection so that it maps 1:1 to the UI table. The UI dictating the DB schema feels backward; especially since this collection is used for multiple purposes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about copying everything into that collection or if we can extend how the query works in the backend but i think frontend gets no filter and searches if it means doing that in memory. so having a data table that can only filter on one coloumn is what it is , or not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's not pretty. It needs to be paginated because the space in the UI is very limited. But we don't expect to ever have a very large number of entries here, so filtering and searching is not that important.
That said, we already have at least one instance of in-memory pagination (collections). We could re-use that code for filtering and searching if needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pagination is being used in the frontend. In the screenshot there are no entries, so then there is no pagination.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image vs: image not talking about how the search doesn't do anything for me. but since we only filter on the pipline we don't need to filter in memory, but suit yourself

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to perform pagination via mongo, I think we would need to modify the pipeline_processor_rules_meta collection so that it maps 1:1 to the UI table. The UI dictating the DB schema feels backward; especially since this collection is used for multiple purposes.

@patrickmann Is this something we could feasibly get done in this cooldown? Would the search bar work differently in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Covered by #24866

Copy link
Member

@kodjo-anipah kodjo-anipah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@patrickmann patrickmann merged commit 7ddd7de into master Jan 21, 2026
24 checks passed
@patrickmann patrickmann deleted the streamrules branch January 21, 2026 15:48
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.

Add pipelines list to stream data routing details view

6 participants