Repository navigation
fix: list people issues without a project group - #5437
Conversation
|
@skwowet I'm starting review 1 of this pull request now (started 2026-11-24 23:41 UTC using review agent v0.1.34). This usually takes a few minutes. I'll update this comment with the summary when I'm done. If there's no summary here after about 45 minutes, the review stopped: push a new commit, or post a comment that begins with a mention of me followed by Hi Yeganathan S, thanks for the clear description and the production timings. SummaryThis pull request makes the segment optional on Decision✅ Approved No findings. DetailsOverall impression: The change is focused on three files. A shared Documentation reminder: changed Other reviewers and CI checks: No other reviewer comments yet. Required check Rule files: read Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues |
[High impact] The endpoint can now return member issue results across all project segments. The code changes appear sound, but the updated JSDoc must follow the repository's comment policy before merging.
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified in the changes enabling cross-project data-quality queries while preserving segment-scoped queries.
No open issues 🎉
What changed in this PR
This PR lets CDP’s people data-quality endpoint list issues across all projects when no segment is supplied, while preserving segment-scoped queries.
Changes:
- Makes the segment optional through the API, service, and seven data-access queries.
- Uses
membersGlobalActivityCountto rank unscoped results without summing hierarchy-level counts. - Replaces the global duplicate-identity aggregation with per-member checks for “too many identities per platform.”
| File | Description |
|---|---|
services/libs/data-access-layer/src/data-quality/index.ts |
Adds optional segment handling, selects the appropriate activity-count source, and rewrites duplicate-platform identity checks. |
backend/src/services/dataQualityService.ts |
Makes the segment argument optional when fetching member issues. |
backend/src/api/dataQuality/dataQualityMember.ts |
Removes the required-segment rejection and uses the shared segment-request helper. |
Review effort: Balanced
lfx-one
left a comment
There was a problem hiding this comment.
No blocking, security or privacy findings. With a segment the queries behave as before; without one they fall back to membersGlobalActivityCount.
Documentation
This pull request changes behavior that may also be described outside this repository, such as product pages or an external docs site. I can't read those, so please check them; the author and maintainers own those updates. Changed here:
GET /data-quality/member(thesegmentsquery parameter is now optional; the 400 "Segment ID is required" response is removed)
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
a05ca6d to
b4f6897
Compare
| * | ||
| * @param {IDataQualityParams} params - The parameters for finding member issues, including the type of issue, limit, and offset. | ||
| * @param {string} segmentId - The ID of the segment where the members belong. | ||
| * @param {string} [segmentId] - The ID of the segment where the members belong. Searches all members when omitted. |
There was a problem hiding this comment.
The updated JSDoc describes behavior already clear from the optional segmentId argument and memberActivity. AGENTS.md forbids obvious JSDoc and comments that explain what the code does. Remove these descriptions before merging. The changed descriptions in services/libs/data-access-layer/src/data-quality/index.ts follow the same pattern.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: backend/src/services/dataQualityService.ts
Line: 28
Comment:
**JSDoc repeats the code**
The updated JSDoc describes behavior already clear from the optional `segmentId` argument and `memberActivity`. `AGENTS.md` forbids obvious JSDoc and comments that explain what the code does. Remove these descriptions before merging. The changed descriptions in `services/libs/data-access-layer/src/data-quality/index.ts` follow the same pattern.
**Context Used:** AGENTS.md ([source](https://github.com/linuxfoundation/crowd.dev/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| count: 'msa."activityCount"', | ||
| } | ||
| : { | ||
| join: `INNER JOIN "membersGlobalActivityCount" gac ON m.id = gac."memberId"`, |

GET /data-quality/memberno longer needs a segment. With a project group or project, the seven people issue lists return the same results as before. Without one, they list people across all of them.Without a segment, people are sorted by their activity count from
membersGlobalActivityCount, which holds one row per member.memberSegmentsAgghas a row per hierarchy level, so it can't be summed. People with no activity aren't listed, same as with a segment today."Too many identities per platform" now checks each member's identities one at a time, most active first, and stops at the page limit. Before, it counted duplicates across all 15.8M verified username identities before sorting. Without a segment it timed out after 60 s, and the plan with a segment was the same.
On production, first page, with no segment and with the two largest project groups:
Closes linuxfoundation/lfx-cdp-insights-ops#482