felixmosh / bull-board

🎯 Queue background jobs inspector
MIT License
2.14k stars 343 forks source link

flow children with groups are not visible in bullboard #770

Open apizzini opened 3 weeks ago

apizzini commented 3 weeks ago

When using flows and groups (which is a bullmq pro feature), flow children jobs are not visible.

For example adding a flow like this (without children.*.opts.group):

      await this.searchBulkFlowProducer.add({
        name: "renovate-interior",
        queueName: "search-bulk",
        children: [
          { name: "paint", queueName: "search-bulk" },
          { name: "paint", queueName: "search-bulk" },
          { name: "fix", queueName: "search-bulk" },
        ],
      });

results in: Screenshot 2024-06-09 alle 17 28 30

But adding a flow with children.*.opts.group like this:

      await this.searchBulkFlowProducer.add({
        name: "renovate-interior",
        queueName: "search-bulk",
        children: [
          { name: "paint", queueName: "search-bulk" },
          { name: "paint", queueName: "search-bulk" },
          { name: "fix", queueName: "search-bulk" },
        ].map((item) => ({
          ...item,
          opts: {
            group: { id: "group1" },
          },
        })),
      });

results in this

Screenshot 2024-06-09 alle 17 30 43

Bullmq processes all jobs, flow children are simply not visible in bullboard.

Are pro features out of context in bullboard or is there interest to have that handled?

I'll be more than happy to open a PR to fix this if bullboard intend to support this feature :)

judsd commented 2 weeks ago

Hello,

I ran into the same issue earlier. In our case, we are not using FlowProducer but just groups along with priority.

group: {
    id: campaignId,
    priority: priority
}

I can confirm the issue remains even if the priority is removed.

I didn't dig deeper, but I assume since the library is using the standard bullmq library, those jobs are not returned by the library.

I think a PR would be great if you already have a fix; otherwise, I can take a look at it by the end of the week.

On a side note, I checked the official UI at taskforce.sh, and it appears they have the same limitation at this time. the data is presented under groups.

Cheers,
Jud