Repository navigation
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the PCC sync creation-planning update.
No open issues 🎉
What changed in this PR
Updates PCC sync creation planning to account for the project and sub-project automatically created with a new project group, aligning dry-run counts and conflict checks with backend behavior.
Changes:
- Include the group’s automatic child segments when planning a new group with a distinct PCC project.
- Check those segments for slug or name conflicts without changing existing-group behavior.
- Update expected segment counts and add regression tests for conflicts and existing groups.
| File | Description |
|---|---|
services/apps/pcc_sync_worker/src/consumer/creationPlan.ts |
Plans and checks the child segments automatically created with a new group. |
services/apps/pcc_sync_worker/src/consumer/creationPlan.test.ts |
Covers expanded plans, conflict detection, existing groups, and summary counts. |
Review effort: Balanced
Refs linuxfoundation/lfx-cdp-insights-ops#180 Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
189f7a5 to
d3068f5
Compare
PR SummaryMedium Risk Overview That fixes dry-run Tests in Reviewed by Cursor Bugbot for commit d3068f5. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
@ulemons I'm starting review 1 of this pull request now (started 2026-11-23 16:13 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 @ulemons, thanks for the clear write-up and the production dry-run numbers. SummaryThis change makes Decision✅ Approved DetailsOverall impression: When the group is missing and the target project is a different PCC project, the plan adds the group's project and sub-project and blocks on Other reviewers and CI checks: The required Rule files: read Questions, problems, or feedback: https://github.com/linuxfoundation/lfx-review-agent/issues |
lfx-one
left a comment
There was a problem hiding this comment.
Approved. The plan now includes the project and sub-project the backend creates with a new group, and conflicts on them block the plan with SLUG_OR_NAME_TAKEN. I found no blocking or minor issues. The required DCO check passed.
gaspergrom
left a comment
There was a problem hiding this comment.
Looks good to me, LGTM.
What
The creation plan now includes the project and the sub-project that the backend creates
together with a new project group, and checks them for conflicts.
Why
POST /segment/projectGroupcreates the group, a project and a sub-project with the same nameand slug. For a standalone project the plan already had the three levels. For a new group that
has projects under it, the plan listed the group only, so:
and the backend would reject the call later.
How
planCreationadds thegroup's project and sub-project to the plan and runs the usual checks on them. A conflict
blocks the plan with
SLUG_OR_NAME_TAKEN.buildCreationStepsneeds no change: it already skips the levels a project group callcreates.
Effect on production data
Checked against the dry run of 2026-11-20: 33 new groups have projects under them. None of
them has a conflict in
segmentsorinsightsProjects, so creatable (709) and blocked (48)projects stay the same. Segments to create go from 1,419 to 1,485.
The only visible change after deploy is
segmentsToCreatein the job log.Tests
creationPlan.test.ts: one test updated, three added (project with the slug of a new group,sub-project with its name, no block when the group already exists).
Refs linuxfoundation/lfx-cdp-insights-ops#180
🤖 Generated with Claude Code